Home
Documents:
Contents
1. OTOTUT oyezzed ugtotzed Squemeo 5 equernbrs 5 es SOYA NOISIWSNVuL VI ad OLVWHOS 2 5 S661 eTeqes IVHHSNHO 14 oxeue ue eiquonoue s sopeor dur soAesue 56 8 oxeupu Te uoo epeorgrauepr 93se enb oqunfpe oxeue ue 5 seredrourad xeW L 02 UIN 0006 gt oxeunu uotstoead ep ese o osed uoo uo eoseouou SOJUSTNSTS uoo ou oquerueuoroung ep efesed un ered openoepv HI W S VIONVdSH SILNSHSADWLSNI 3 ou oquerueuoroun
2. ejos ejse Jes nd osed ep sejue e qejse ees e 21405 opeysodap enb eJedse ejse esind es OpueND BASVYLNOD 30 07135 OLNAFNOD im Wu VW Xu V sojoquiis sejueinBis so uoo ueoyijuepi es seJopes nd so ej ep A seuo oun se uejueseJdeJ enb seJopes nd sop ue ejsIsuoo 3 3 OdVIOSL v eullojeje d ej epezijeeJ e ep Jo ea Je e4puejueur es oenbojq ep 2199 e opues ng ej ep oenbojg SeAIseons sele Jenjoeje ejqisod sy e ejuejsixe osed je JejseJ ep e qejse ees osed enb e eJe e opues nd ewJoJeje d e egos opeysodap oje qo osed ep ug OBJedo eun Jenjoaje ajqisod sy ZS e enp eJ es amp Jepenb sosia euuojeje d e ep ojefqo es opueng yunoiJ uw E A E 1 gt By 5 AAA a 12 es e qe s9 Bas osed ue osed enb 05 JOSIA ue BY 06 ep osed un euuojeje d e
3. 36 5 17 home pablo Developing Qt QtScale src productdialog cpp File Reference 36 S73 ooo yog m RR EORR eR Rex onc RU xe pe y eme x Rs 36 5 18 home pablo Developing Qt QtScale src productdialog h File Reference 37 5 18 1 aus kou d ooa m A A a 37 5 19 home pablo Developing Qt QtScale src productstruct h File Reference 37 519 1 Detailed Description ou mace m kh da eS wR EER EGRE EoX 37 5 20 home pablo Developing Qt QtScale src serialscale cpp File Reference 38 5 20 1 Detailed Description 2 24424 0844 e Rom poko x eom Rex eek m 38 5 21 home pablo Developing Qt QtScale src serialscale h File Reference 38 5 21 1 Detailed Description ee be m RR mo m o n n m o RR n RR Rm ms 38 5 22 home pablo Developing Qt QtScale src tabledialog cpp File Reference 39 5 224 DetaledDeschpUpIT cuu n xke Romo ee ee 39 5 23 home pablo Developing Qt QtScale src tabledialog h File Reference 39 5 23 1 Detailed Description mr 39 Index 41 Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen Chapter 1 Hierarchical Index 1 1 Class Hierarchy This inheritance list is sorted roughly but not completely alphabetically COMMANG E a nee RI E Ribes ebd Qu D
4. 35 USD 30 41 USD 45 USD 59 USD 65 USD Comment Large Community Large Community ODROID U3 offers the best value but it is clear that with its specifications and lack of stock GPIOs it is intended as a lightweight workstation Nevertheless it can be considered for industrial computer applications On the other hand the ODROID U3 is overpowered for the application described in this work The BeagleBone Black or the A10 OLinuXino are better suited for the intended application in this sense Out of the two previously mentioned development boards the BeagleBone Black is considered the best solution for the intended application Despite the BeagleBone Black having slightly less features than the ODROID U3 it has a larger community and more support which should not be overlooked when choosing a hardware platform as it can reduce development times and ease operating system and package support 1 Report 9 PABLO CHOLBI ALENDA SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o It should be noted that the BeagleBone Black is considered the best hardware solution for this project the application shall be develop on a Texas Instruments TMDSSK3358 AM335x Starter Kit as this board was physically available for use at the Universitat Polit cnica de Valencia at the time of writing The Texas Instruments TMDSSK3358 AM335x Starter Kit
5. A ee NOIOVWWHDONd 57 0 ofeq TRues HSW E Tose TOI 2 Posng I LIE fp ue 57 O SW s 5 PPE asa Z MAUS IN 5 I 25 0594 O LIE I oleg osed 95 HOY TOIT I 5 osed 851 0 cup OST osed un su e3ruUsuez2 enb lt G0S 0122 5 Tear osed gt osod gt SbeII gt SOI92 s 44 eae nn emet reuroepexeH ue 5 er1pod euro opexey us egenbed i UTA 27210 50792 umu C 5 SYTA PNE Z UQroeuroyur 4 shea HSW C HIHHIN dera or IG osed 51 0 HTHHIN 4 3 fy OFS RO fy ry
6. Lulun es JOSIA eyBip eulessis eujejsis 502161 soj ep 359 ep oseooJd UN es jse ojueuinJisul Jouejsod ayed ej ue ep Jojdn ejul je opuesnd 5 Jepueouj OLNSWNYLSNI 130 VHOWVIA 3 VLSANd Z y AA 0 vavanoo18 VUVL VAYL y 5199135 OS3d H M o VCI VS3d 4 20 epeenbo q e A e ejqejse osed je euruiu epesed e 0129 spa 9 ep oun epeo 9 Jod eise osed ep JOSIA 9 140 be al OCOD wg 999 2L lt 002102095 12 31 5 211618312 872 30 j 012 811 30 53900 57 OvaranoNvis3 30 Add 510 VOV Id IVINOY3 sayoavsind viniyuva es ou e eunBulu ejsixe ou IS eJe ep ejoa e Jes nd e osed eenbojqsep
7. abeo cies 41 Figure 5 1 16 licenseDialog EIDWONU s uii e tee rp el oia 42 Figure 5 1 17 licenseDialog UL esc ost eto rant add 42 Figure 5 1 18 Application Using Japanese Database essere 44 Figure 5 2 1 Database Schema oa AA e b AE ARA t Bead GR tee 48 Figure 5 2 2 SQLite Database BroWSOE s aer ito i ront rige Uribe Pee DR as 51 1 Report 3 PABLO CHOLBI ALENDA E EEEE SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o 4 1 Report QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX APPLICATION FOR AN INDUSTRIAL SCALE 1 Background In recent years there has been an increase in the number of smartphones and tablets This change has not only brought new types of applications and programming philosophy to meet the new needs of the population but it has also pushed the development of embedded processors Users demand relatively high computational power with a low energy consumption maintain a long battery life ARM processors now dominate the mobile phone space due to their lower power requirements with 9896 of mobile phones having an ARM processor Roberts Hoffman 2009 and is expanding its market in set top boxes ans smart TVs ARM processors dominate these markets because they are more efficient than their x86 counterparts and have a very competitive price It should also be noted tha
8. 4 gt pr Wen 1 Stable weight 2 Unstable weight 3 Out of Range scale overloaded 4 Out of Range scale underloaded Vendverbatim class serialScale 1 public serialScale serialScale errorCode openConnection void closeConnection void sendData const char data int length int receiveData const char data int maxData void update O bool buffScan char buff int numData int msgEnd void process char buff int size float getWeight bool isStable void loopbackTest protected bool port lt Serial port found bool connection lt Connection established bool stable lt Stability of weight bool signal lt Show warning char buffer bufferSize Serial reception buffer int totalData lt Position in buffer double weight lt Weight of product private QSerialPort serial messageDialog message endif SERIALSCALE H end of file 81 30 tabledialog cpp file tabledialog cpp 0brief Class implementation of tableDialog This class displays table showing the accumulated sales of the products in the database date March 2014 author Pablo Cholbi This file is part of QtScale QtScale is free software you can redistribute it a
9. Qt version 014 8 3 Sitara v Manage Qt mkspec Cancel Apply Figure 4 1 5 Kit Configuration 21 PABLO CHOLBI ALENDA SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o 4 2 Target System This section focuses on creating and configuring a bootable image for the target system such that the target system is set up and ready to be developed on The board used in this work is a Texas Instruments TMDSSK3358 AM335x Starter Kit But the set up and configuration described in this section is valid for other TI systems based around the AM335x processor family 4 2 1 Creating SD Card Image TI provides a straightforward script with which to create SD card images within the SDK To create a bootable SD card insert a mini SD card of at least 2GB of capacity into a card reader on the host computer and execute the following commands user debian cd opt ti sdk am335x evm 06 00 00 00 bin user debian opt ti sdk am335x evm 06 00 00 00 bin create sdcard sh The script allows for various combinations but the following options are suggested in this work given set up Select SD card drive Select the 2 partition scheme Yes continue e Install pre built images from SDK Finally before removing the mini SD card the following command should be executed to force changed blocks to disk and update the super block
10. 4 2 2 2 Disabling the Default Matrix GUI Application This section describes how to disable the TI Matrix GUI from starting on boot if it is not needed or undesired First it is necessary to determine which is the default runlevel which varies among different Linux distributions root am335x evm runlevel The previous command returns the current runlevel which is assumed to be the default on boot In this case the default runlevel seems to be runlevel 5 To list the services which are started or stopped on runlevel 5 the following command is executed root am335x evm ls l etc rc5 d From the previous command it is possible to determine that S97matrix gui 2 0 starts the Matrix GUI service Finally to disable the starting of this service on boot on the default runlevel root am335x evm cd etc rc5 d root am335x evm etc rc5 d mv S97matrix gui 2 0 K97matrix gui 2 0 4 2 2 3 Static IP Address This section describes how to assign the device a static IP address to make is easily accessible and identifiable over a network Before modifying the network interface configuration file it is advisable to make a backup root am335x evm cp etc network interfaces etc network interfaces bak Now it is safe configure the network interfaces root am335x evm vi etc network interfaces 1 Report 23 PABLO CHOLBI ALENDA SUPERVI
11. RM ee deis mem 11 3 6 Options Dialog cae 12 A 13 3 8 License 14 4 User Manual 1 PABLO CHOLBI ALENDA SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o Illustration Index Figure 2 2 1 Figure 3 2 1 Figure 3 3 1 Figure 3 4 1 Figure 3 5 1 Figure 3 6 1 Figure 3 7 1 Figure 3 8 1 SQLite Database 6 Main Windows Interface an ntf AA 8 Product Dialog 9 Message Dialog oec tetto edi que e ED 10 Accumulated Sales Dialog Interface dec tertie is irt eben uds 11 Options Dialog a e eret eer tet perve EF EXTUS as 12 About Dialog Interaccion ita 13 License Dialog Interface iii aii pese eller e aeta d 14 4 User Manual UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM USING LINUX POUTEGNICA APPLICATION FOR AN INDUSTRIAL SCALE 1 Requirements The end user s host computer used for the installation and management of the application may run any of the following operational systems Mac OSX Windows The minimum recommended requirements are listed below Management e 128 MB of
12. argc Argument count argv Argument vector This function starts the application creates the main window and handles the the restart of the application if re quested by a child Returns Exit status of the application Definition at line 43 of file main cpp Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 5 11 home pablo Developing Qt QtScale src mainwindow cpp File Reference 5 11 home pablo Developing Qt QtScale src mainwindow cpp File Reference Class implementation of MainWindow include lt QApplication gt include lt QString gt include lt QStringList gt include lt QList gt include lt cstdlib gt include mainwindow h include ui mainwindow h include errorcode h include commandline h include database h include optionsdialog h include productdialog h include tabledialog h include productstruct h 5 11 1 Detailed Description Class implementation of MainWindow This class displays the main product selection window Date March 2014 Author Pablo Cholbi Definition in file mainwindow cpp 5 12 home pablo Developing Qt QtScale src mainwindow h File Reference Class definition of MainWindow include lt QMainWindow gt include lt QApplication gt include lt QList gt include commandline h include database h include optionsdialog h include productdialog h include tabledialog h include productst
13. in reality negative weights would not be processed 77 if weight 0 0 1 stable false buying not allowed only show message once if signal 1 message new messageDialog message gt errorMessage scaleError message gt delete message signal false Y Y break unstable measure case D const char buff 3 if p sign 1 else sign 1 ptt jump minus sign extract weight sscanf p 41f amp weight weight weight sign stable false break case p if 1 1 scale overloaded else 1 scale underload break disregard unstable and or out of range values default weight 0 0 stable false break Obrief Get weight from scale Oreturns Weight in kilograms 78 float serialScale getWeight 1 return float weight Obrief Get stability of scale measurement Oreturns Stability of most recent measurement bool serialScale isStable 1 return stable brief Test serial port This functions can be used to test the serial port on the system by loopback If the industrial scale ts not connected to the system and the system s serial port pin RX is connected the to its TX pin all data sent is redirected as input data This allows to simulate data stream transmission from the scale Currently there are 3 examples streams already defin
14. date March 2014 author Pablo Cholbi This file is part of QtScale QtScale is free software you can redistribute it and or modify 4 under the terms of the GNU General Public License as published by the Free Software Foundation version 3 QtScale is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details Copyright C 2014 Pablo Cholbi Alenda You should have received a copy of the GNU General Public License along with QtScale If not see lt http www gnu org licenses gt ifndef PRODUCTSTRUCT H define PRODUCTSTRUCT H include lt QIcon gt include lt QString gt include messagedialog h Qbrief Product data structure This data structure encapsulated variables to be used in the product dialog struct productStruct 1 QString name Name of product QIcon icon lt Icon of product int id Id of product float price lt Product price per unit of weight float weight lt Weight received from the scale ttendit PRODUCTSTRUCT_H end of file 68 26 QtScale pro PPPS SS SSS Rae See See SS ROO A Project created by Pablo Cholbi 2014
15. gt ee sign of weight space or gt 9 characters for the weight IS 1 il 1 12 13 14 Ik 9 gt 2 characters for state kK lt 1 gt space space lt 2 gt D space space 3 gt I OxOD lt 4 gt I 0 0 lt 1 Stable weight 2 Unstable weight 3 Out of Range scale overloaded 4 Out of Range scale underloaded Definition at line 77 of file serialscale h 4 10 2 Constructor amp Destructor Documentation 4 10 2 1 serialScale serialScale Class constructor of serialScale object This function creates an instance of serialScale class and initializes the class variables Definition at line 43 of file serialscale cpp 4 10 2 2 serialScale serialScale Class destructor of serialScale object This function destroys an instance of serialScale class Definition at line 57 of file serialscale cpp 4 10 3 Member Function Documentation 4 10 3 1 bool serialScale buffScan char buff int numData int x msgEnd Scan buffer for measurements This is the function searched for the start and end characters in the buffer If they are found the possi
16. or hide back button if page 0 1 ui gt backButton gt setVisible false else ui gt backButton gt setVisible true show or hide forward button if vector size lt page 1 6 ui gt forwardButton gt setVisible false else ui gt forwardButton gt setVisible true set up toolButtons 1 if page 6 0 lt vector size ui gt toolButton_1 gt setVisible true int ID vector at page 6 0 ui gt toolButton_1 gt setIcon db icon ID ui gt toolButton_1 gt setIconSize QSize 75 75 ui gt toolButton_1 gt setToolButtonStyle Qt ToolButtonTextUnderIcon ui gt toolButton_1 gt setText QString number ID db name ID else ui gt toolButton_1 gt setVisible false set up toolButtons 2 if 1 lt vector size ui gt toolButton_2 gt setVisible true int ID vector at page 6 1 ui gt toolButton_2 gt setIcon db icon ID ui gt toolButton_2 gt setIconSize QSize 75 75 31 ui gt toolButton_2 gt setToolButtonStyle Qt ToolButtonTextUnderIcon ui gt toolButton_2 gt setText QString number ID g u db name ID else ui gt toolButton_2 gt setVisible false set up toolButtons 3 if page 6 2 lt vector size ui gt toolButton_3 gt setVisible true int ID vector at page 6 2 ui gt toolButton_3 gt setIcon db icon ID ui gt toolButton_3 gt setIconSize QSiz
17. version Display application version information path dir Set database location It should be noted that argument qws is an internal Qt argument and is parsed before this function is executed Parameters argumentList Argument vector Returns Error code being SUCCESS if all arguments were parsed correctly or argumentError otherwise Definition at line 74 of file commandline cpp The documentation for this class was generated from the following files home pablo Developing Qt QtScale src commandline h home pablo Developing Qt QtScale src commandline cpp 4 3 Database Class Reference this class encapsulates the methods and variables necessary to manage the SQLite database include database h Public Member Functions Database Class constructor of Database void setDatabase QString database Set database path Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 10 Class Documentation errorCode openDatabase Open database void closeDatabase Close database QList int list List database records Qlcon icon int ID Get product icon QString name int ID Get product name float price int ID Get product price Get product price void clearAccum Reset accumulated sales Protected Attributes QSqlDatabase db Database object 4 3 1 Detailed Description void updateAccum float weight int ID this class enc
18. ID Product index number ID field in database Returns Price of specified product Definition at line 171 of file database cpp 4 3 3 8 void Database setDatabase QString database Set database path This function sets the path the SQLite database Parameters database Path to SQLite database Definition at line 59 of file database cpp 4 3 3 9 void Database updateAccum float weight int ID Get product price This function updates the accumulated sales in the product database record Parameters weight Sale to add to accumulated sales ID Product index number ID field in database Definition at line 189 of file database cpp The documentation for this class was generated from the following files home pablo Developing Qt QtScale src database h home pablo Developing Qt QtScale src database cpp Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 4 4 licenseDialog Class Reference 13 4 4 licenseDialog Class Reference this class displays the license information of the application The information is static and defined in the UI file include lt licensedialog h gt Inheritance diagram for licenseDialog licenseDialog Public Member Functions licenseDialog QWidget 0 Class constructor of licenseDialog object licenseDialog Class destructor of licenseDialog object 4 4 1 Detailed Description this class displays
19. QtScale 15 distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details Copyright C 2014 Pablo Cholbi Alenda You should have received a copy of the GNU General Public License along with QtScale If not see lt http www gnu org licenses gt ifndef COMMANDLINE_H define COMMANDLINE_H include lt QString gt include lt QStringList gt include errorcode h Vbrief this class encapsulates the methods and variables necesary to parse the commandline arguments that are supported class Command 1 Fs public Command errorCode parseArguments QStringList argumentList QString databasePath protected QString basePath Database name QString database lt Database path endif COMMANDLINE_H end of file 12 6 database cpp file database cpp brief Class implementation of Database This class contains the methods and members that enable interaction with SQLite databases date March 2014 author Pablo Cholbi This file is part of QtScale QtScale is free software you can redistribute it and or modify 4 under the terms of the GNU General Public Lice
20. e 3 Sale button This button accepts the current transaction updates the accumulated sales of the product in the database and return to the main window A sale can only be performed if the weight on the scale is grater than 0 00 kg and stable 4 Cancel button This button exist from the current dialog and returns to the main window without making the sale 4 User Manual 9 PABLO CHOLBI ALENDA SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o 3 4 Message Dialog Error Cannot establish serial connection 1x Acknowledg E Figure 3 4 1 Message Dialog Interface This dialog is displayed when an error en encountered and it must be acknowledged by the user before continuing This dialog displays a warning in function of what error has been encountered The different parts that constitute this dialog are explains below 1 Warning message This part of the dialog displays the warning message associated with the error which has occurred 2 Acknowledgement button This button must be clicked by the user to acknowledge that an error has occurred 10 4 User Manual QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX APPLICATION FOR AN INDUSTRIAL SCALE Name Strawberry Pear Peach Orange Lemon Grape Cherry Banana Figure 3 5 1 Accumulated Sales Dialog Interface This dialog displays a scrollable table with all the accumulated
21. 1 delete ui F brief Show error message This function displays an error message for the defined errors in errorCode Oparam error Error to me informed of void messageDialog errorMessage errorCode error 1 ui gt Title gt setText Error switch error 1 case argumentError ui gt Message gt setText Unknown command line argument fprintf stderr Error Unknown command line argumentYn break case databaseError ui Message setText Cannot open requested database fprintf stderr Error Cannot open requested database n break case queryError ui Message setText Cannot open requested database fprintf stderr Error Cannot open requested database n break case serialError ui gt Message gt setText Cannot establish serial connection fprintf stderr Error Cannotyjestablish serial connection n break case scaleError ui gt Message gt setText Scale needs calibration fprintf stderr Error Scale needs calibration n break default gt gt An unexpected jerror joccurred fprintf stderr Error jAn unexpected error joccurred Nn break ui gt pushButton gt setText Acknowledge ui gt pushButton gt setIcon QIcon Buttons Buttons warning png ui gt pushButton gt setIconSize 05122 24 24 F brief Show generic message This function displays a generic message on screen Opar
22. lt property gt lt widget gt lt item gt lt layout gt lt widget gt lt resources gt lt connections gt lt connection gt lt sender gt closeButton lt sender gt lt signal gt clicked lt signal gt lt receiver gt licenseDialog lt receiver gt lt slot gt close lt slot gt lt hints gt lt hint type sourcelabel gt lt x gt 328 lt x gt lt y gt 197 lt y gt lt hint gt lt hint type destinationlabel gt lt x gt 189 lt x gt lt y gt 109 lt y gt lt hint gt lt hints gt lt connection gt lt connections gt lt ui gt 26 12 main cpp file main cpp brief Start QtScale application date March 2014 author Pablo Cholbi This file is part of QtScale QtScale is free software you can redistribute it and or modify 4 under the terms of the GNU General Public License as published by the Free Software Foundation version 3 QtScale 15 distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details Copyright C 2014 Pablo Cholbi Alenda You should have received a copy of the GNU General Public License along with QtScale If not see lt http www gnu org licenses gt include lt QApplication gt include lt QStringList gt include lt QProcess gt include mainwindow
23. lt property gt lt layout class QVBoxLayout name verticalLayout gt lt item gt lt widget class QLabel name label_about gt lt property name text gt lt string notr true amp lt html amp gt amp lt head E amp gt amp lt body amp gt amp lt p amp gt amp lt span style quot font size 16pt font weight 600 amp quot kgt QtScale 1 00 1 span amp gt amp 1lt p amp gt amp lt p amp gt amp lt span style amp quot font size 11pt quot amp gt GUI application for bulk product commerce by weight amp lt br amp gt using an industrial RS 232 scale amp lt span amp gt amp lt p amp gt amp lt p amp gt amp lt span style amp quot font size iipt amp quot amp gt This application is intended to work with the Microgram ie21 scaleklt br amp gt from Microgram Instruments Espa ola S A amp lt span amp gt amp lt p amp gt amp lt p amp gt amp lt span style quot font size 1ipt amp quot amp gt Pablo Cholbi Alenda amp lt spankgt amp lt p amp gt amp lt p amp gt amp lt span style amp quot font size 11pt 4quot 4gt Copyright 2014 amp 1t span amp gt amp lt p amp gt amp lt body amp gt amp lt html amp gt string lt property gt lt property name alignment gt lt set gt Qt AlignCenter lt set gt lt property gt lt property name openExternalLinks gt lt bool gt true lt bool gt lt property gt lt property name textInteractionFlags gt lt set gt Qt TextBrowserInteraction lt set gt
24. worldwide royalty free non sublicensable non exclusive irrevocable license to exercise the Licensed Rights in the Licensed Material to A reproduce and Share the Licensed Material in whole or in part and B produce reproduce and Share Adapted Material Exceptions and Limitations For the avoidance of doubt where Exceptions and Limitations apply to Your use this Public License does not apply and You do not need to comply with its terms and conditions Term The term of this Public License is specified in Section 6 a Media and formats technical modifications allowed The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created and to make technical modifications necessary to do so The Licensor waives and or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights including technical modifications necessary to circumvent Effective Technological Measures For purposes of this Public License simply making modifications authorized by this Section 2 a 4 never produces Adapted Material Downstream recipients A Offer from the Licensor Licensed Material Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License B Additional offer from the Licensor Adapted Ma
25. lt height gt 30 lt height gt lt rect gt lt property gt lt property name font gt lt font gt lt pointsize gt 12 lt pointsize gt lt font gt lt property gt lt property name text gt lt string gt id lt string gt lt property gt lt widget gt widget class QLabel name weightLabel gt lt property name geometry gt lt rect gt lt x gt 310 lt x gt lt y gt 110 lt y gt lt width gt 150 lt width gt lt height gt 30 lt height gt lt rect gt lt property gt lt property name font gt lt font gt lt pointsize gt 12 lt pointsize gt lt font gt lt property gt lt property name text gt lt string gt weight lt string gt lt property gt lt widget gt widget class QLabel name Cost gt lt property name geometry gt lt rect gt lt x gt 260 lt x gt lt y gt 150 lt y gt lt width gt 200 lt width gt lt height gt 40 lt height gt lt rect gt lt property gt lt property name font gt lt font gt lt pointsize gt 24 lt pointsize gt 66 lt font gt lt property gt lt property name text gt lt string gt purchase cost lt string gt lt property gt lt widget gt lt widget gt lt resources gt lt connections gt lt ui gt 67 25 productstruct h file productstruct h brief Data structure type productStruct This file contains the implementation of the productStruct data structure
26. occupational disease and cessation of activity month 41 3 1 41 3 412 30 398 28 The cost derived from self employed work under Spanish legislation with the aforementioned characteristics is 412 30 month This project constitutes 0 966 months of work and therefore the total cost of this section for this project is 398 28 3 Budget 7 PABLO CHOLBI ALENDA SUPERVISOR DR ANGEL PERLES IVARS 2 3 Total Cost of Labour Concept Cost Bare Cost of Labour 5950 Cost derived from self employment 398 28 6348 28 Total cost of labour 6348 28 Escuela T cnica Superior de Ingenieria del Dise o 3 Budget QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX APPLICATION FOR AN INDUSTRIAL SCALE 3 General Expenses As discussed above the budget of the project is carried out assuming that the designer is an independent engineer This entails some additional cost that must be taken into account for the final calculation of the cost of this project Concept Units Cost Quantity Total Office Laboratory Rental 25m month 350 0 966 338 10 Electrical supply month 45 0 966 43 47 Water supply month 10 0 966 9 66 Municipal Garbage Recollection month 10 0 966 9 66 Phone Line and Internet Access month 61 25 0 966 59 17 Total Cost 46026 Total cost of general expenses 460 06 3 Budget 9 PABLO CHOLBI ALENDA E EEE
27. this class displays about information of the application The information is static and defined in the UI file include lt aboutdialog h gt Inheritance diagram for aboutDialog aboutDialog Public Member Functions aboutDialog QWidget parent 0 Class constructor of aboutDialog object aboutDialog Class destructor of aboutDialog object 4 1 1 Detailed Description this class displays about information of the application The information is static and defined in the UI file Definition at line 42 of file aboutdialog h 4 1 2 Constructor amp Destructor Documentation 4 1 2 1 aboutDialog aboutDialog QWidget parent 0 explicit Class constructor of aboutDialog object This function creates an instance of aboutDialog class and initializes the widget Definition at line 39 of file aboutdialog cpp 8 Class Documentation 4 1 2 2 aboutDialog aboutDialog Class destructor of aboutDialog object This function destroys an instance of aboutDialog class Definition at line 61 of file aboutdialog cpp The documentation for this class was generated from the following files home pablo Developing Qt QtScale src aboutdialog h home pablo Developing Qt QtScale src aboutdialog cpp 4 2 Command Class Reference this class encapsulates the methods and variables necesary to parse the commandline arguments that are sup ported include lt commandline h gt Public Member Functions C
28. user debian opt ti sdk am335x evm 06 00 00 00 bin sudo sync 4 2 2 Initial Configuration Before powering up the device it is necessary to insert the mini SD card and connect a network cable to a router or switch on the same network as the host computer If using the AM335x Starter Kit the network cable should be connected to the RJ45 jack farthest from the female micro USB jack This on the TI image created previously is interface ethO which is enabled on start up The other RJ45 jack is interface which is neither configured nor enabled on start up and therefore is not useful at the moment Once boot up is complete the TI Matrix GUI should be visible on screen 4 2 2 1 Login To check the IP address of the device tap on Settings Network Settings The IP address should be listed under the ethO interface section For example the IP address could be 192 168 1 33 22 1 Report QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE Once the IP address of the device is know it is possible to start a SSH session from the host computer By default the root user does not have a password When asked for the password just hit return to log on user debian ssh 192 168 1 33 1 root root 192 168 1 33 s password root am335x evm For security reasons it is advisable to set a password for the root user root am335x evm passwd
29. 1 QSqlQuery query QList lt int gt index list for int i 0 i lt index size 1 1 query UPDATE _ Products SET Accumulated 0 0 WHERE ID QString number index at i query next 16 end of file 17 file brief date author This database h database h Class definition of Database March 2014 Pablo Cholbi file 13 part of QtScale QtScale is free software you can redistribute it and or modify 4 under the terms of the GNU the Free Software Foundation version 3 QtScale 15 distributed in the hope that but WITHOUT ANY WARRANTY General Public License as published by it will be useful without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details Copyright C 2014 Pablo Cholbi Alenda You should have received a copy of the GNU General Public License along with QtScale If not see lt http www gnu org licenses gt ifndef DATABASE_H define DATABASE_H include include include include include include orief manage lt QList gt lt QIcon gt lt QString gt lt QSqlDatabase gt lt QSqlQueryModel gt errorcode h this class encapsulates the methods the SQLite da
30. 11 name 11 openDatabase 11 price 12 setDatabase 12 updateAccum 12 databaseError errorcode h 31 databasePath Command 9 errorCode errorcode h 30 errorMessage 42 INDEX messageDialog 16 errorcode h argumentError 31 databaseError 31 queryError 31 SUCCESS 31 scaleError 31 serialError 31 errorcode h errorCode 30 genericMessage messageDialog 16 getWeight serialScale 22 icon Database 11 isStable serialScale 22 licenseDialog 13 licenseDialog 13 licenseDialog 13 licenseDialog 13 list Database 11 loopbackTest serialScale 22 main main cpp 32 main cpp main 32 MainWindow 13 MainWindow 14 MainWindow 14 MainWindow 14 redraw 15 setup 15 messageDialog 15 messageDialog 16 errorMessage 16 genericMessage 16 messageDialog 16 messageDialog 16 name Database 11 openConnection serialScale 22 openDatabase Database 11 optionsDialog 16 optionsDialog 17 optionsDialog 17 optionsDialog 17 parseArguments Command 9 price Database 12 process serialScale 23 productDialog 17 productDialog 18 productDialog 18 productDialog 18 setup 18 productStruct 19 queryError errorcode h 31 receiveData serialScale 23 redraw MainWindow 15 SUCCESS errorcode h 31 scaleError errorcode h 31 sendData serialScale 23 serialError errorcode h 31 serialScale 19 serialScale 21 buffScan 21 closeConnection 22 getWeight 22 isStabl
31. 4 0 Zu On ep UOD odrnbe HOP HIP A HEE Y HOE sel O PA SOT Y USpuodsa1109 IID2SV onb 0 Se qqiN SOT ep oun opueoTJTpoo es 5 A ep ozeunN 0 5 ep OOCI O 0096 uorsiusue1ij 5 se3fH ep se UQTSTUSULIZ e3 q eT Tse s tq doas pepraed dogs zedur sojzep 5278 UOD IIDSV Se UQTSTUSULIZ eT CSHIVHANSOD SVOLLSIWHLDOWVHVO I S HINIS IVNVO SOLVU ad NOISIWSNVUL 5 20 015 HIR HEE 77 eqep ou ue PubrDURY 9289 opueno IOTI ue sopeuorouou sbeT g 4 osed onb ezed odrnbe 5 ep NOISIWSNVHL E S I 2 epeiqusg eIqe385H osed sou Te ug Posng ESH LIE GEF 6 114 I
32. 54 57 61 63 25 productstruct h 26 QtScale pro 27 Resources qrc 28 serialscale cpp 29 serialscale h 30 tabledialog cpp 31 tabledialog h 32 tabledialog ui 67 68 71 79 81 84 86 1 aboutdialog cpp file aboutdialog cpp brief Class implementation of aboutDialog This class displays information about the application date March 2014 author Pablo Cholbi This file is part of QtScale QtScale is free software you can redistribute it and or modify 4 under the terms of the GNU General Public License as published by the Free Software Foundation version 3 QtScale 15 distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details Copyright C 2014 Pablo Cholbi Alenda You should have received a copy of the GNU General Public License along with QtScale If not see lt http www gnu org licenses gt include aboutdialog h include ui aboutdialog h include licensedialog h brief Class constructor of aboutDialog object This function creates an instance of aboutDialog class and initializes the widget aboutDialog aboutDialog QWidget parent QDialog parent ui new Ui aboutDialog ui gt setupUi this set to fullscreen and frameless this gt setWindowFlags
33. Cancel Apply xi Figure 4 1 3 Configuring Debugger 19 PABLO CHOLBI ALENDA E SUPERVISOR DR ANGEL PERLES 5 Escuela T cnica Superior de Ingenier a del Disefic 4 1 3 4 Set up Target Click on the Tools gt Options from the top menubar On the left side vertical menubar click Devices Click Add in the top right and select Generic Linux device and click on Start Wizard Change the name to AM335x EVM This can be done by modifying the Name field Type in the IP address of the embedded Linux device Type in the password of the user Type in the user on the target for SSH connection Click Next and click Finish Qt creator will attempt to connect to the embedded Linux device to check if correctly configured Options x ilter Devices Environment Devices Text Editor Device AM335x EVM default for Generic Linux Y Add 176 Fakevim General Bomove Name AM335x EVM O hu Linux Test to detected No Show Running Processes 4 Qt Quick Currentstate Unknown Deploy Public Key B Bulld amp Run Type Specific a Debugger Machine type Physical Device A Designer Authentication type Password Key Host name 192 168 1 100 SSH port 22 Analyzer ED 38 P Free ports 10000 10100 Timeout 10s d Version Control Usemame root Q Android Password 00000000 Show password Y BlackBerry Create New GDB server execut
34. Class constructor of optionDialog object optionsDialog Class destructor of optionsDialog object 4 7 1 Detailed Description this class encapsulates the methods and variables necesary to display and execute configuration options Definition at line 42 of file optionsdialog h 4 7 2 Constructor Destructor Documentation 4 7 2 1 optionsDialog optionsDialog QWidget x parent 0 explicit Class constructor of optionDialog object This function creates an instance of optionsDialog class and initializes the widget Definition at line 41 of file optionsdialog cpp 4 7 2 2 optionsDialog optionsDialog Class destructor of optionsDialog object This function destroys an instance of optionsDialog class Definition at line 70 of file optionsdialog cpp The documentation for this class was generated from the following files home pablo Developing Qt QtScale src optionsdialog h home pablo Developing Qt QtScale src optionsdialog cpp 4 8 productDialog Class Reference this class encapsulates the methods and variables necessary to display product weight and information include lt productdialog h gt Inheritance diagram for productDialog Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 18 Class Documentation productDialog Public Member Functions productDialog QWidget parent 0 Class constructor of productDialog object productDialog Class destructor of pro
35. Finally every program is threatened constantly by software patents States should not allow patents to restrict development and use of software on general purpose computers but in those that do we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary To prevent this the GPL assures that patents cannot be used to render the program non free The precise terms and conditions for copying distribution and modification follow TERMS AND CONDITIONS 0 Definitions This License refers to version 3 of the GNU General Public License Copyright also means copyright like laws that apply to other kinds of works such as semiconductor masks Program refers to any copyrightable work licensed under this License Each licensee is addressed as you Licensees and recipients may be individuals or organizations To modify a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission other than the making of an exact copy The resulting work is called a modified version of the earlier work or a work based on the earlier work A covered work means either the unmodified Program or a work based on the Program To propagate a work means to do anything with it that without permission would make you directly or secondarily liable for infringement under applicable copyright law except executing it on a computer or modifying a private
36. Major Functional Blocks of the TMDSSK33958 eese 10 Figure 4 1 1 Configuring os coi epp eee pe 17 Figure 4 1 2 Configuring CO css eon idt od bee leiten aate tbv etidm beni ds 18 Figure 4 1 3 Configuring eerte se be te sa boe re B 19 Figure 4 1 4 Configuring aia 20 Figure 4 1 5 Kit 21 Figure 4 3 1 Application sor ad 27 Figure 4 3 2 Test Ai societe 28 Figure 5 1 1 Application ein 29 Figure 5 1 2 Application SUCIA iii iii 30 ET LT E OW CHAN rbi eoe Rte AA et ida ligase dda UAR ee T do vat 32 Figure 5 1 4 Main Window Flow Charla pot 33 Figure 5 1 5 MainWindow LL o eo cuoc cadet de b A A Eee E cet tees 34 Figure 5 1 6 productDialog Flowchart iecit enr erit t hh e nn Fa eta e e ooa n neis 35 Homes 7 prod ctDialog ota EO revu OE Repo 36 Figure 5 1 8 messageDialog Blow Hart A 37 Figure 5 1 9 messageDialog Uli 38 Figure 5 1 10 tableDialog Plow 39 Estres ea VOTO ANOS MI Soap Fo do dias 39 Figure 5 1 12 optionsDialog Flowehatto eire s rete RUE REF A es 40 bieure 5 1 13 optionsDialog avs oper o depre RA 40 Figure 5 1 14 aboutDialog Flowchart oerte io Doa 41 Figure
37. Qt FramelessWindowHint this gt setFixedHeight 272 this gt setFixedWidth 480 add icons to buttons ui gt licenseButton gt setIcon QIcon Buttons Buttons certificate png ui gt licenseButton gt setIconSize QSize 24 24 ui gt closeButton gt setIcon QIcon Buttons Buttons cancel png ui gt closeButton gt setIconSize QSize 24 24 Obrief Class destructor of aboutDialog object This function destroys an instance of aboutDialog class aboutDialog aboutDialog delete ui brief open licenseDialog This slot opens the a license dialog void aboutDialog on_licenseButton_clicked 1 license new licenseDialog license gt exec delete license Obrief exit aboutDialog This slot closes destroys current about dialog void aboutDialog on_closeButton_clicked this gt close end of file AS 2 aboutdialog h file aboutdialog h 0brief Class definition of aboutDialog date March 2014 author Pablo Cholbi This file is part of QtScale QtScale is free software you can redistribute it and or modify 4 under the terms of the GNU General Public License as published by the Free Software Foundation version 3 QtScale 15 distributed in the hope that it will be useful but WI
38. data int maxData Receive data over serial void update Try to get new measurement bool buffScan char xbuff int numData int msgEnd Scan buffer for measurements void process char buff int size Process possible data stream float getWeight Get weight from scale bool isStable Get stability of scale measurement void loopbackTest Test serial port Protected Attributes bool port Serial port found bool connection Connection established bool stable Stability of weight bool signal Show warning char buffer bufferSize Serial reception buffer int totalData Position in buffer double weight Weight of product Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 4 10 serialScale Class Reference 21 4 10 1 Detailed Description this class encapsulates the methods and variables necessary to manage the communication with the industrial scale This class manages the serial communication between the industrial scale and the application Communication is carried put over RS 232 The string processing carried out in this class is intended to work with the Microgram ie21 from Microgram Instru ments Espa ola S A String processing functions must be modified if other hardware is to be used The data stream encoding for this scale is shown here Pa SSS SSS gt Data stream start character s gt lt
39. eJqos Jod osed 1 sns euuoJeje d e ue opeoojoo oje qo jap osed ezijensiA euJejsis 13 ejueuiejduuis Le NOIOVSH3dO z eulbed 21 T 0 S3NOIOVOINnWOO 9035 Z 5032p 5919 L 0026 sorpneg Oggi E E SSAYAY UOTSTUSUBIA SPLOTISTIOJ D IPO SOJGUSTNMSTS 521 artes odrnbo TH eora3guo2ne LI I20 opuemoo o e osed 6I 20 J Top eI 10d 18277287 opond es un ep osed odrnb Tap oquergmeuor2ung ue oquend un odrnba opueno 001 EPLI xod zod epend odrnbe TH ue soquond S 50 ep spueuop op PT ns rs apuodsaz
40. hi ha hagut un gran augment dels productes de consum basat en ARM Aquest increment ha estat motivat per l eficiencia i el baix cost d aquests processadors que els fan adequats per a dispositius de baixa potencia i aplicacions que no fan un us intensiu de la CPU Aquest treball examina la viabilitat d implementar una aplicaci amb interficie grafica t ctil per a una bascula industrial en una placa de desenvolupament Texas Instruments AM335x ARM a diferencia dels sistemes basats en x86 Aquest treball tamb t la intenci de servir com una refer ncia general per a la implementaci d aplicacions multiplataforma amb el marc de treball Qt per a sistemes Linux encastat que s executa en un maquinari basat en AM335x En concret l aplicaci a desenvolupar s una aplicaci amb interf cie grafica tactil intuitiva que interactua amb una b scula industrial Microgram EI21 de Microgram Instruments Espafiola SA mitjan ant RS 232 i una base de dades relacional SQLite per al comer de productes granel al pes La informaci sobre el producte i les vendes es recupera i s emmagatzema a la base de dades Paraules Clau Linux encastat ARM Cortex A Qt b scula industrial UNIVERSITAT POLIT CNICA EBENEN DE VALENCIA Escuela T cnica Superior de Ingenieria del Dise o Universitat Polit cnica de Val ncia Escuela T cnica Superior de Ingenier a del Dise o Bachelor s Degree in Industrial Electronics and Automation Engineer
41. home pablo Developing Qt QtScale src serialscale cpp File Reference Class implementation of serialScale include lt QtSerialPort QSerialPort gt include lt QtSerialPort QSerialPortInfo gt include lt string h gt include lt stdio h gt include serialscale h include errorcode h 5 20 1 Detailed Description Class implementation of serialScale This class manages the serial communication with the industrial scale Date March 2014 Author Pablo Cholbi Definition in file serialscale cpp 5 21 home pablo Developing Qt QtScale src serialscale h File Reference Class definition of serialScale include lt QtSerialPort QSerialPort gt include QtSerialPort QSerialPortInfo include errorcode h include messagedialog h Classes class serialScale this class encapsulates the methods and variables necessary to manage the communication with the industrial scale Macros define bufferSize 2048 Size of serial reception buffer 5 21 1 Detailed Description Class definition of serialScale Date March 2014 Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 5 22 lhome pablo Developing Qt OtScale src tabledialog cpp File Reference 39 Author Pablo Cholbi Definition in file serialscale h 5 22 home pablo Developing Qt QtScale src tabledialog cpp File Reference Class implementation of tableDialog include lt QSqlQueryModel gt include
42. lt item gt lt layout gt lt widget gt widget class QWidget name verticalLayoutWidget 2 lt property name geometry gt lt rect gt lt x gt 10 lt x gt lt y gt 10 lt y gt lt width gt 221 lt width gt lt height gt 131 lt height gt lt rect gt lt property gt layout class QVBoxLayout name verticalLayout 1 lt item gt lt widget class QPushButton name restartButton gt lt property name font gt lt font gt lt pointsize gt 10 lt pointsize gt lt font gt lt property gt lt property name layoutDirection gt lt enum gt Qt LeftToRight lt enum gt lt property gt lt property name text gt lt string gt Restart QtScale lt string gt lt property gt lt widget gt lt item gt lt item gt lt widget class QPushButton name exitButton gt lt property name font gt lt font gt lt pointsize gt 10 lt pointsize gt lt font gt lt property gt lt property name layoutDirection gt lt enum gt Qt LeftToRight lt enum gt lt property gt lt property name text gt lt string gt Exit QtScale lt string gt 56 lt property gt lt widget gt lt item gt lt layout gt lt widget gt lt widget class QPushButton name aboutButton gt lt property name geometry gt lt rect gt lt x gt 20 lt x gt lt y gt 227 lt y gt lt width gt 90 lt width gt lt height gt 35 lt height gt lt rect gt lt property gt lt property
43. tabledialog h include ui tabledialog h 5 22 1 Detailed Description Class implementation of tableDialog This class displays a table showing the accumulated sales of the products in the database Date March 2014 Author Pablo Cholbi Definition in file tabledialog cpp 5 23 home pablo Developing Qt QtScale src tabledialog h File Reference Class definition of tableDialog include lt QDialog gt include lt QSqlQueryModel gt include database h Classes class tableDialog this class encapsulates the methods and variables necessary to display the accumulated sales of all products in the database 5 23 1 Detailed Description Class definition of tableDialog Date March 2014 Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 40 File Documentation Author Pablo Cholbi Definition in file tabledialog h Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen Index MainWindow MainWindow 14 aboutDialog aboutDialog 7 licenseDialog licenseDialog 13 messageDialog messageDialog 16 optionsDialog optionsDialog 17 productDialog productDialog 18 serialScale serialScale 21 tableDialog tableDialog 25 home pablo Developing Qt QtScale src aboutdialog 27 home pablo Developing Qt OtScale src aboutdialog h 27 home pablo Developing Qt OtScale src commandline 28 home pablo Developing Qt OtScale src commandline h 28 home pablo
44. 1 Detailed Description Class definition of Database Date March 2014 Author Pablo Cholbi Definition in file database h 5 7 home pablo Developing Qt QtScale src errorcode h File Reference Definition of errorCode data type Enumerations enum errorCode SUCCESS argumentError databaseError queryError serialError scaleError Error code signaling data type 5 7 1 Detailed Description Definition of errorCode data type This file contains the implementation of the errorCode enumerated data type Date March 2014 Author Pablo Cholbi Definition in file errorcode h 5 7 2 Enumeration Type Documentation 5 7 2 1 enum errorCode Error code signaling data type This data type is used as a return in various functions to signal if the function exited successfully or if an error oc curred If an error occurs errorCode also gives information on the error type such that it can be handled accordingly and or warning can be displayed printed Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 5 8 home pablo Developing Qt GtScale src licensedialog cpp File Reference 31 Enumerator SUCCESS function exited successfully argumentError failed to parse command line argument databaseError failed to open close database queryError query failed to execute successfully serialError serial connection could not be established scaleError scale is sending unexpected values Calibration needed Definition at line
45. 25 41122 cdabteDial g ooo be Poh Roo mom Rm Go ms 25 5 File Documentation 27 5 1 home pablo Developing Qt QtScale src aboutdialog cpp File Reference 27 S1 BetaledbBescnplion ons Rm Re nem Rm me E 27 5 2 home pablo Developing Qt QtScale src aboutdialog h File Reference 27 5 21 Detailed Description 2 RR ox Rx a xm 28 5 3 home pablo Developing Qt QtScale src commandline cpp File Reference 28 921 28 5 4 home pablo Developing Qt QtScale src commandline h File Reference 28 5 41 Detailed Description s acs iocis s moo 222 2 29 5 5 home pablo Developing Qt QtScale src database cpp File Reference 29 SOT Bi bee eee RO RR 29 5 6 home pablo Developing Qt QtScale src database h File Reference 29 56 Detaled Descnphon xui RO ORCS 9 3 E 30 5 7 home pablo Developing Qt QtScale src errorcode h File Reference 30 5 51 2 2 2 2 222 24 BUE m 30 5 7 2 Enumeration Type Documentation 30 ME OU 222222252 30 5 8 home pablo Developing Qt QtScale src licensedialog cpp File Reference 31 51 BetaledLDescnplloi ous ROI Ro xs mox Y ww 31 Generated on Tue May
46. 3 QtScale is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details Copyright C 2014 Pablo Cholbi Alenda You should have received a copy of the GNU General Public License along with QtScale If not see lt http www gnu org licenses gt include lt QApplication gt include lt QString gt include lt QStringList gt include lt QList gt include lt cstdlib gt include mainwindow h include ui_mainwindow h include errorcode h include commandline h include database h include optionsdialog h include productdialog h include tabledialog h include productstruct h brief Class constructor of MainWindow object This function creates an instance of MainWindow class initializes the class variables and the widget MainWindow MainWindow QWidget parent QMainWindow parent ui new Ui MainWindow 1 ui gt setupUi this 29 set to fullscreen and frameless this gt setWindowFlags Qt FramelessWindowHint this gt setFixedHeight 272 this gt setFixedWidth 480 initialize variables page 0 add icons to buttons ui gt backButton gt setIcon QIcon Buttons Buttons previous png ui gt backButton gt setIconSize QSize 32 32 ui gt forwardButton gt setIcon QIcon Buttons Buttons ne
47. 6994 89 The global cost of the project is six thousand nine hundred ninety four euro and eighty nine cent 3 Budget 13 PABLO CHOLBI ALENDA E EEEE SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o 14 3 Budget UNIVERSITAT POLIT CNICA EBENEN DE VALENCIA Escuela T cnica Superior de Ingenieria del Dise o Universitat Polit cnica de Val ncia Escuela T cnica Superior de Ingenier a del Dise o Bachelor s Degree in Industrial Electronics and Automation Engineering Final Year Engineering Project QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX APPLICATION FOR AN INDUSTRIAL SCALE 4 User Manual Author Pablo Cholbi Alenda Supervisor Dr Angel Perles Ivars May 2014 UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM USING LINUX O CNICA DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE Table of Contents T seite de oa 3 ener AAA A 5 2 1 Application astra 5 2 2 Database amp 2 one qe eere 6 Bp Application iut en ciate d or etae pc uct 7 3 1 Command 7 SPAN WOW raid 8 33 Produc bine 9 3 4 Message DIE idest ced io 10 3 5 Accumulated Sales tese e ei eae
48. A8 USING LINUX O CNICA DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE 6 Conclusions and Future Work Taking into account that in recent years there has been an increase in the number of devices that use an ARM Cortex A processor because they are a cost effective and power efficient solution for applications where the task to be performed is not CPU intensive and that their performance continues to improve year by year It is possible to conclude that an increase in the number of industrial computers running on ARM processors with embedded Linux will be seen in the coming years due to its advantages for low power applications This project highlights that with the Qt C framework it is possible to easily develop cross platform applications in C for embedded Linux that can be ported to industrial computers running on more traditional x86 processors This fulfils part of the project requirements which were to have this report serve as reference as a general reference for developing industrial applications for the TI AM335x processor family running embedded Linux Having a wider range of hardware options is always an advantage In the developing of the application for the industrial scale a greater understanding of SQL databases and industrial communications has been attained as well as the deepening of the knowledge of embedded Linux systems The project as a whole has also served as valuable experience in the development of industrial p
49. E axe axL GUNT 9 SID 8 SLO SLO 8 L SIW IND 5 s s 1 6 4U I 6 uoueo iopeuopiQ 95910 euojeoreg 14630 1 5 02680 22 08 56 OF OF 227 26 tex 91 ejossoy efeseq ejuesiuo jeuisnpu 0 6000 OWN Z saunjeuBls WHO34 INFO 4 eunou un ejiuuojuoo ep aun sane jueuiejnes 158 er e q Ajuuajuo JO ejeounie JuO Sf uogerejoep Siu f ouusiuefi un Jod OPAIWE ep opeoiume uoo epijeA ojos 58 2153 enbujoeje ejunaeg junges 330 626 pepunbag e Ayijiqneduioo 2 339 92 68 pepyignedwog e SOJUEAINS 39 sep seoueDixe xne je 3309 80 06 SANIANG e ep seoueBixe xne 4 ep 32 uomegoidde p suep p ne puodseuoo SeAgoeup 93 94 Jo 5 eu oj pue se 935 788 06 JAJIMA jiounog Jo sjueueJinba ay oj pue ejeayiue jenoudde ad 93 ay u
50. RAM e 100 MB of free disk space 1 Ethernet port Ethernet network or switch 4 User Manual PABLO CHOLBI ALENDA E EEEE SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o 4 4 User Manual UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX O CNICA 0 DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE 2 Installation and Management 2 1 Application Installation This section is a walkthrough of the installation process of the application and the application database The process of updating the application binary file or the application database is the same as there is no installer or package manager involved it is a manual process This section focuses on the installation of a pre compiled binary of the application and the transfer of an exiting database to the target system The first step is to make sure that the required directories exist on the target system To do this log in as root user on the target system form the host computer with SSH if the project report was followed the default IP address of the target system is 192 168 1 100 user host S ssh root 192 168 1 100 Once logged in the following commands shall create the directory for the application binary file and the database if they do not already exist Please note that these commands create the default directories for these files according the project report which
51. Serif font size 9pt font weight 400 font style normal amp quot amp gt amp 1lt p align quot center quot style kquot margin top 12px margin bottom 12px margin left Opx margin right 0px qt block indent 0 text indent Opx amp quot amp gt amp lt span style amp quot font family MS Shell Dlgij2 font size 10pt amp quot amp gt amp lt span amp gt amp lt span style amp quot font size 10pt amp quot amp gt Copyright C 2014 Pablo Cholbi Alenda amp lt span amp gt amp lt p amp gt 1 align amp quot center amp quot style amp quot qt paragraph type empty margin top 0px margin bottom 0px margin left 0px margin right 0px qt block indent 0 text indent 0px font size i0pt amp quot amp gt amp lt br amp gt amp lt p amp gt 1 align amp quot justify amp quot style amp quot margin top 0px margin bottom 0px margin left Opx margin right 0px qt block indent 0 text indent 0px amp quot amp gt amp lt span style amp quot font size 10pt amp quot amp gt This program is free Software you can redistribute it and or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 3 amp 1t span amp gt amp 1t p amp gt 1 align amp quot justify amp quot style amp quot qt paragraph type empty margin top 0px margin bottom 0px margin left 0px margin right 0px qt block indent 0 text indent 0px font size i0pt amp quot a
52. This function creates an instance of messageDialog class and initializes the widget Definition at line 42 of file messagedialog cpp 4 6 2 2 messageDialog messageDialog _ Class destructor of messageDialog object This function destroys an instance of messageDialog class Definition at line 58 of file messagedialog cpp 4 6 3 Member Function Documentation 4 6 3 1 void messageDialog errorMessage errorCode error Show error message This function displays an error message for the defined errors in errorCode Parameters error Error to me informed of Definition at line 70 of file messagedialog cpp 4 6 3 2 void messageDialog genericMessage QString msg Show generic message This function displays a generic message on screen Parameters msg Message to be displayed Definition at line 112 of file messagedialog cpp The documentation for this class was generated from the following files home pablo Developing Qt QtScale src messagedialog h home pablo Developing Qt QtScale src messagedialog cpp 4 7 optionsDialog Class Reference this class encapsulates the methods and variables necesary to display and execute configuration options include optionsdialog h Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 4 8 productDialog Class Reference 17 Inheritance diagram for optionsDialog optionsDialog Public Member Functions optionsDialog QWidget parent 0
53. a del Dise o Bachelor s Degree in Industrial Electronics and Automation Engineering Final Year Engineering Project QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX APPLICATION FOR AN INDUSTRIAL SCALE 3 Budget Author Pablo Cholbi Alenda Supervisor Dr Angel Perles Ivars May 2014 UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX POLIT CNICA DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE Table of Contents G OS IE eiectus EE E E Era E ee 3 INDIES A 5 E A A A 7 211 Bare SC orum DRE ete a ER 7 2 2 Costs Derived From Self Employed Work Under Spanish Legislation 7 Total CosEOL E 8 Oy General EXpenses P 9 4 AMOorti zalo Neee 11 2 General 11 42 Hardware Amortizatidrios b tb Bde pude bres datu das 11 4 3 Software c ioo ie mi tene 11 Total CospaEATIOPTZSEIOTE sr ecc bte ta tiro uere ons etra t essc is 11 A 13 3 Budget 1 PABLO CHOLBI ALENDA E EEEE SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o 2 3 Budge
54. additional I O such as GPIOs and or HDMI USB or any combination of these or any other valid media interface VGA DVI etc In any case the hardware platform must have the I O capability for the selected screen It is worth noting that the touchscreen can be a generic screen or one made specifically for the hardware platform An example of the later are the many third party BeagleBone LCD capes for the Texas Instruments BeagleBone Black The system is also required to interface with an industrial scale over RS 232 Modern embedded systems are likely to not have a RS 232 15V DB 9 or DB 25 port present therefore USB to serial adapter shall be used in this project This implies that the hardware platform must have at least 1 available USB host port As the data transfer rates of RS 232 is much smaller than that of the USB protocol a USB 1 1 or USB 2 0 port is sufficient A USB 3 0 or USB 3 1 port is not required As the system is required to have a static IP address for easy database management and system maintenance it is implied that the hardware platform must have at least 1 Ethernet Port The purpose of this port is to establish an SSH or SFTP For the expected loads high data transfer rate is not required and therefore a Gigagit Ethernet port is not required A 100Mb s Ethernet port is sufficient The software shall be designed to be cross platform from the standpoint of the operating system and the hardware architecture Th
55. any other third party entities provide aboutDialog productDialog tableDialog Figure 5 1 2 Application Structure 30 1 Report UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX O CNICA DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE e main The main function is not a class It is the top level function whose purpose is to initiate application wide parameters create and execute a MainWindow class and restart the application if MainWindow returns from execution a restart code The main function starts the whole e MainWindow This class encapsulates the methods and variables necessary to display the main product selection window MainWindows is main UI It displays buttons with the icon ID number and name of the products in groups of 6 and the buttons necessary to navigate forward and backwards through the product list It also provides buttons to execute the advanced options dialog and the accumulated sales dialog e tableDialog This class encapsulates the methods and variables necessary to display the accumulated sales of all products in the database The tableDialog class displays a scrollable table with all the products on the database and the current accumulated sales in the predefined mass unit kg by default From this class it is also possible to clear all the accumulated sales e Database This class encapsulates the methods and variables necessary to manage the SQLite da
56. are usr local bin for the application binary file and home root QtScale for the database file root target if e usr local bin then mkdir usr local bin fi root target if e home root QtScale then mkdir home root QtScale fi After creating the directories it is possible to close the SSH session as the rest of the process shall be performed from the host computer root target exit To install the application binary file navigate to the directory where the binary file is located on the host computer and execute the following command This command will transfer the binary to usr local bin user host scp QtScale root 192 168 1 100 usr local bin To transfer the application database file navigate to the directory where the database file is located on the host computer and execute the following command This command will transfer the database to home root QtScale user host scp QtScale sqlite root 192 168 1 100 home root QtScale With this the installation or update of the application binary and or the database is complete However that does not mean that the system as a whole behaves exactly as the specifications demand For further configuration please consult the project report 4 User Manual 5 PABLO CHOLBI ALENDA gt SUPERVISOR DR NGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o As an alterna
57. char buff int numData int msgEnd t bool msgFound false attempt to find message string ending for int 1 0 i lt numData i if buff i 1 x0D amp amp buff i x0A msgFound true msgEnd i break if found find begining of message if msgFound 1 for int i msgEnd i gt 0 i 76 if buff i S 1 process message process buffti 1 1 break F return msgFound d brief Process possible data stream This function takes a possible data stream and processes it to either discard it or extract from it the weight and stability values that the scale is sending over RS 232 This function is intended to work with the Microgram ie21 industrial scale from Microgram Instruments Espaola S A For more information on the ie21 data stream coding please consult the serialScale class documentation and the annex which includes the manufacturers datasheet void serialScale process char buff int size 1 check size if size 18 1 return check start of message if strncmp const char buff S 1 0 1 const char p const char buff 1 switch p 1 int sign stable measure case const char buff 3 if p sign 1 else sign 1 ptt jump minus sign extract weight sscanf p 41f amp weight weight weight sign stable true
58. connections gt lt ui gt 87 Annex 1 Documentation Licence Author Creative Commons The documentation of this project is licensed under the Creative Commons Attribution ShareAlike 4 0 International Public License The terms and conditions for use reproduction and distribution of documentation subject to this license are the following By exercising the Licensed Rights defined below You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution ShareAlike 4 0 International Public License Public License To the extent this Public License may be interpreted as a contract You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions Section 1 Definitions b d e f 5 i j Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated altered arranged transformed or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor For purposes of this Public License where the Licensed Material is a musical work performance or sound recording Adapted Material is always prod
59. endverbatim void optionsDialog on_rebootButton_clicked 1 QProcess execute shutdown r now Obrief Shutdown system 51 This slot makes starts an external process to halt the system uverbatim shutdown h now endverbatim void optionsDialog on shutdownButton clicked 1 QProcess execute shutdown h now Obrief open aboutDialog This slot opens the an About dialog void optionsDialog on_aboutButton_clicked 1 about new aboutDialog about exec delete about Obrief exit optionsDialog This slot closes destroys current options dialog void optionsDialog on_closeButton_clicked 1 this close end of file 52 20 optionsdialog h file optionsdialog h brief Class definition of optionsDialog date March 2014 author Pablo Cholbi This file is part of QtScale QtScale is free software you can redistribute it and or modify 4 under the terms of the GNU General Public License as published by the Free Software Foundation version 3 QtScale 15 distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details Copyright C 2014 Pablo Cholbi Alenda You should have received a copy of the GNU General Public License along with Qt
60. eoe 86 32 tabledialog ui lt xml version 1 0 encoding UTF 8 7 gt lt ui version 4 0 gt lt class gt tableDialog lt class gt widget class QDialog name tableDialog gt lt property name geometry gt lt rect gt lt x gt 0 lt x gt lt y gt 0 lt y gt lt width gt 480 lt width gt lt height gt 272 lt height gt lt rect gt lt property gt lt property name windowTitle gt lt string gt Dialog lt string gt lt property gt widget class QTableView name tableView gt lt property name geometry gt lt rect gt lt x gt 10 lt x gt lt y gt 10 lt y gt lt width gt 360 lt width gt lt height gt 252 lt height gt lt rect gt lt property gt lt widget gt lt widget class QPushButton name clearButton gt lt property name geometry gt lt rect gt lt x gt 380 lt x gt lt y gt 73 lt y gt lt width gt 90 lt width gt lt height gt 35 lt height gt lt rect gt lt property gt lt property name text gt lt string gt Clear lt string gt lt property gt lt widget gt lt widget class QPushButton name closeButton gt lt property name geometry gt lt rect gt lt x gt 380 lt x gt lt y gt 164 lt y gt lt width gt 90 lt width gt lt height gt 35 lt height gt lt rect gt lt property gt lt property name text gt lt string gt Close lt string gt lt property gt lt widget gt lt widget gt lt resources gt lt
61. established cubic power performance trade offs Blem 2013 The previous graphs suggest that if the task a computer must perform is not CPU intensive and or can be subdivided into smaller tasks to run concurrently it is advantageous from the point of view of efficiency to use an ARM based distributed system or cluster This hypothesis has been analysed in various studies in recent years Ou 2012 and Vidal 2012 both conclude that ARM based clusters for server applications web and web file and database respectively is a viable and power efficient solution Likewise Abdurachmanov 2014 concludes that an ARM based cluster is a viable and power efficient solution for scientific computation at the CERN The results of the aforementioned studies suggest that the use of ARM processors in industrial computers could also be advantageous It is worth noting that ARM processors are not only efficient but there are cost effective solutions on the market A good example of this is the BeagleBone Black a 45 community supported development platform with 512MB of RAM TI AM3359 1 0GHz processor and a power consumption lt 2W The disadvantage that ARM based systems present versus x86 industrial PCs is binary incompatibility x86 systems are well established and have been the standard for many years Much software has been developed for these systems most of which can not be easily ported to the ARM architecture due to copyright reasons and or framewo
62. gt iconLabel gt setPixmap product gt 150 150 QIcon Normal QIcon 0n set ID name and price labels ui idLabel setText QString number product id ui gt nameLabel gt setText product gt name ui gt priceLabel gt setText QString number product gt price f 2 4 currencyUnit massUnit set initial value for remaining labels ui gt weightLabel gt 5 0 000 massUnit ui gt Cost gt setText 0 00 currencyUnit serial new serialScale errorCode error serial gt openConnection if error SUCCESS message new messageDialog 59 message gt errorMessage error message gt delete message return false timer new QTimer this connect timer SIGNAL timeout this SLOT update timer gt start 200 return true ds Obrief Update values This function makes the serial object evaluate incoming data and updates the weight and cost values accordingly void productDialog update 1 serial gt update product gt weight serial gt getWeight ui gt weightLabel gt setText QString number product gt weight f 3 massUnit ui gt Cost gt setText QString number product gt weight product gt price f 2 currencyUnit Loopback test Attention please read documentation Do NOT uncomment if unsure of what you ar
63. has more features overall and has a higher price but the BeagleBone Black and the TMDSSK3358 AM335x Starter Kit both have an AM335x processor and therefore the procedures to develop applications and the resulting binaries are the same in both platforms GPIO pco MCASP1 GPIO AM335X bons MDC MDI Contr LCD with Touch 5 Figure 3 1 1 Major Functional Blocks of the TMDSSK3358 3 2 Alternatives for the Programming Language There are a lot options for selecting a programming language but this section will focus on comparing three of the most popular and predominant languages used to develop cross platform applications 3 2 1 Java Pros Cons e Simple and powerful e Slower than low level languages e Very popular Less efficient than native compiled languages Many vulnerabilities Requires a virtual machine 10 1 Report UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM USING LINUX DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE Java applications run on top of virtual machines which makes them slower and much more resource hungry than native compiled languages Aside from efficiency there are many security risks involved in using Java s virtual environment Because of the aforementioned reasons Java has not been considered an appropriate solution for this project although it is a valuable option The rise of the android operating
64. if it doesn t exist if e dev input touchscreenO then export QWS MOUSE PROTO Tslib dev input touchscreenO Check if the SD card is mounted and the first partition is vfat If so let s write the pointercal file there so that if someone messes up calibration they can just delete the file from any system and reboot the board mount grep media mmcblkOpi grep vfat gt dev null 2 gt 81 if nao I no then tsfile media mmcb1k0p1 pointercal export TSLIB_CALIBFILE tsfile 1 Report 45 PABLO CHOLBI ALENDA SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o fi if f tsfile then echo n Calibrating touchscreen first time only ts calibrate echo n If we create a pointercal file and it was not in etc pointercal let s copy it there as well if it does not already exist if f etc pointercal a f tsfile 1 then cp tsfile etc pointercal fi fi fi echo Starting QtScale usr local bin QtScale qws path home root QtScale stop echo Stopping QtScale killall QtScale echo Usage etc init d QtScale init sh start stop exit 1 esac exit 0 After saving and exiting vi the script must be made executable root am335x evm chmod 755 etc init d QtScale init sh To register the script the following command is executed Note that the 99 is to try to set back the execution of
65. implementation of messageDialog 34 home pablo Developing Qt OtScale src messagedialog h MessageDialog class definition 34 home pablo Developing Qt QtScale src optionsdialog cpp Class implementation of optionsDialog 35 home pablo Developing Qt QtScale src optionsdialog h Class definition of optionsDialog 35 home pablo Developing Qt QtScale src productdialog cpp Class implementation of productDialog 36 home pablo Developing Qt QtScale src productdialog h Class definition of productDialog 37 home pablo Developing Qt QtScale src productstruct h Data structure type productStruct 37 File Index home pablo Developing Qt QtScale src serialscale cpp Class implementation of serialScale 38 home pablo Developing Qt QtScale src serialscale h Class definition of serialScale 38 home pablo Developing Qt QtScale src tabledialog cpp Class implementation oftableDialog 39 home pablo Developing Qt QtScale src tabledialog h Class definition of tableDialog 39 Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen Chapter 4 Class Documentation 41 aboutDialog Class Reference
66. it was designed for Moreover due to the characteristics of the applications to be developed none of the disadvantages of this database file suppose a limitation According to Allen 2010 One advantage of having a database server inside your program is that no network configuration or administration is required no firewalls or address resolution to worry about and no time wasted on managing intricate permissions and privileges Both client and server run together in the same process This reduces overhead related to network calls simplifies database administration and makes it easier to deploy your application Everything you need is compiled right into your program 1 Report 13 PABLO CHOLBI ALENDA E EEEE SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o 14 1 Report UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX Ill POLIT CNICA S DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE 4 Development Environment Set up This section is a reference on how to set up a development environment to develop and debug Qt applications targeted to AM335x processors Texas Instruments TT provides an SDK with everything necessary to develop Qt applications for this target 4 1 Host Computer Development must be done on a x86 Linux computer TI strongly recommends to install the SDK and develop on an Ubuntu LTS release as this is the environment t
67. line argument was passed e Database error failed to open close database The specified database could not be found e Query error query failed to execute successfully Query is malformed or database is corrupt Serial error serial connection could not be established Specified serial port could not be opened Scale error scale is sending unexpected values Scale Calibration needed It is possible to distinguish that argument error and database error are malignant errors and if encountered at run time the application should close immediately and output an error message through standard error 1 Report 29 PABLO CHOLBI ALENDA SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o Database error is a malignant error because the application should never start if the database file cannot be found as no product information could be read or written This would render the application useless as no transaction could be performed successfully e Argument error is a malignant error because the application should not start if an argument could not be interpreted Otherwise the user might be under the impression that the application is executing as specified through the command line interface when in reality the invalid arguments are ignored On the other hand query error serial error and scale error are benign errors because if encountered during execu
68. lt x gt lt y gt 227 lt y gt lt width gt 90 lt width gt lt height gt 35 lt height gt lt rect gt lt property gt lt property name font gt lt font gt lt pointsize gt 10 lt pointsize gt lt font gt lt property gt lt property name text gt lt string gt Close lt string gt lt property gt lt widget gt widget class QWidget name verticalLayoutWidget gt lt property name geometry gt lt rect gt lt x gt 249 lt x gt lt y gt 10 lt y gt lt width gt 211 lt width gt lt height gt 131 lt height gt lt rect gt lt property gt layout class QVBoxLayout name verticalLayout 2 item widget class QPushButton name rebootButton gt lt property name font gt lt font gt lt pointsize gt 10 lt gt lt font gt lt property gt lt property name layoutDirection gt lt enum gt Qt LeftToRight lt enum gt lt property gt lt property name text gt lt string gt Reboot System lt string gt 55 lt property gt lt widget gt lt item gt lt item gt lt widget class QPushButton name shutdownButton gt lt property name font gt lt font gt lt pointsize gt 10 lt pointsize gt lt font gt lt property gt lt property name layoutDirection gt lt enum gt Qt LeftToRight lt enum gt lt property gt lt property name text gt lt string gt Shutdown System lt string gt lt property gt lt widget gt
69. sales for each product in units of mass kg by default Accumulated sales may also be cleared from this dialog The different parts that constitute this dialog are explains below e 1 Product table This part of the window displays a scrollable table representing th product ID the product name and the accumulated sales of all the products in the database in units of mass Products are ordered by ID number e 2 Clear Button This button resets all the accumulated sales of all the product in the database to 0 00 e 3 Close button This button exist from the current dialog and returns to the main window without clearing the accumulated sales 4 User Manual 11 PABLO CHOLBI ALENDA SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o 3 6 Options Dialog lt P Restart QtScale Reboot System 3 Be exit QtScale 2 Shutdown System n omy Figure 3 6 1 Options Dialog Interface This dialog gives the user various options on the restarting and stoping of the application and the target system amongst others The different parts that constitute this dialog are explains below 1 Restart application This button restarts the application with the same arguments as the current instance was called If the current instance was started remotely clicking this button will free the shell 2 Exit application This button closes the current instance of QtScale 3 Restart system This but
70. section must be accompanied by the Installation Information But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product for example the work has been installed in ROM The requirement to provide Installation Information does not include a requirement to continue to provide support service warranty or updates for a work that has been modified or installed by the recipient or for the User Product in which it has been modified or installed Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network Corresponding Source conveyed and Installation Information provided in accord with this section must be in a format that is publicly documented and with an implementation available to the public in source code form and must require no special password or key for unpacking reading or copying 7 Additional Terms Additional permissions are terms that supplement the terms of this License by making exceptions from one or more of its conditions Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License to the extent that they are valid under applicable law If additional permissions apply only to part of the Program that part may be used separately under th
71. slower than other database engines such as MySQL but it is much more feature rich It also conforms with the SQL standard and is specially appropriate if there is a possibility of later moving to Oracle DB or many other closed source database systems as for the most part code which runs PostgreSQL will run on these systems On the other hand it is harder to set up there is less documentation and it has a smaller community It is intended for systems larger than the application to be developed Because of the aforementioned reasons PostgreSQL is not considered and appropriate solution for this project 3 3 3 SQLite Pros Cons e Fast set up e Not many performance features Rapid development Slow write operations e Good for embedding Does not scale well Single file database e Does not have user management e Easy backup Not appropriate for large databases Many supported programming languages e Not appropriate for high concurrency overhead e Fast read operations SQLite was not designed to compete with MySQL PostgreSQL or Oracle DB Although it can be used for example on websites that do not have a very high traffic 109 hits day but it excels in embedding small databases into application Due to it s efficiency ease of use and low maintenance this server less single file database seems the best alternative with which to develop the application described in this work as it is one of the situations
72. source code under the terms of section 4 provided that you also meet all of these conditions a The work must carry prominent notices stating that you modified it and giving a relevant date b The work must carry prominent notices stating that it is released under this License and any conditions added under section 7 This requirement modifies the requirement in section 4 to keep intact all notices You must license the entire work as a whole under this License to anyone who comes into possession of a copy This License will therefore apply along with any applicable section 7 additional terms to the whole of the work and all its parts regardless of how they are packaged This License gives no permission to license the work in any other way but it does not invalidate such permission if you have separately received it d If the work has interactive user interfaces each must display Appropriate Legal Notices however if the Program has interactive interfaces that do not display Appropriate Legal Notices your work need not make them do so A compilation of a covered work with other separate and independent works which are not by their nature extensions of the covered work and which are not combined with it such as to form a larger program in or on a volume of a storage or distribution medium is called an aggregate if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilat
73. system in recent years is a good example of the potential of Java for the industry as the are a wide rage of hardware architectures running Android and they all use the same package system and binaries which may simplify the maintainability and distribution of applications 3 2 2 Python Pros Cons Simple e Slower than low level languages e Very popular Less efficient than native compiled languages y pop Prone to errors at development stage Python is currently a very popular language that has a large community but it was designed to be used as a scripting language which inherently makes it much slower than compiled languages Also being an interpreted language many common error which would otherwise be detected at compile time are not detected until the application is run and debugged this makes development times longer for large applications Because of the aforementioned reasons like Java Python has not been considered an appropriate solution for this project but is also a valuable option 3 2 3 C Pros Cons e Very efficient Applications compiled for specific architecture and operating system e libraries p 5 Sy e Complex syntax C is widely accepted in the field of programming and given the amount of documentation and the efficiency of the resulting applications is a good alternative with which to develop the application described in this work There are interesting frameworks o
74. the GNU General Public License you may choose any version ever published by the Free Software Foundation If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used that proxy s public statement of acceptance of a version permanently authorizes you to choose that version for the Program Later license versions may give you additional or different permissions However no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version 15 Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM TO THE EXTENT PERMITTED BY APPLICABLE LAW EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND OR OTHER PARTIES PROVIDE THE PROGRAM AS IS WITHOUT WARRANTY OF ANY KIND EITHER EXPRESSED OR IMPLIED INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU SHOULD THE PROGRAM PROVE DEFECTIVE YOU ASSUME THE COST OF ALL NECESSARY SERVICING REPAIR OR CORRECTION 16 Limitation of Liability IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER OR ANY OTHER PARTY WHO MODIFIES AND OR CONVEYS THE PROGRAM AS PERMITTED ABOVE BE LIABLE TO YOU FOR DAMAGES INCLUDING ANY GENERAL SPECIAL INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INA
75. the Licensor has been advised of the possibility of such losses costs expenses or damages Where a limitation of liability is not allowed in full or in part this limitation may not apply to You The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that to the extent possible most closely approximates an absolute disclaimer and waiver of all liability Section 6 Term and Termination b This Public License applies for the term of the Copyright and Similar Rights licensed here However if You fail to comply with this Public License then Your rights under this Public License terminate automatically Where Your right to use the Licensed Material has terminated under Section 6 a it C d reinstates 1 automatically as of the date the violation is cured provided it is cured within 30 days of Your discovery of the violation or 2 upon express reinstatement by the Licensor For the avoidance of doubt this Section 6 b does not affect any right the Licensor may have to seek remedies for Your violations of this Public License For the avoidance of doubt the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time however doing so will not terminate this Public License Sections 1 5 6 7 and 8 survive termination of this Public License Section 7 Other Terms and Condit
76. work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996 or similar laws prohibiting or restricting circumvention of such measures When you convey a covered work you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work and you disclaim any intention to limit operation or modification of the work as a means of enforcing against the work s users your or third parties legal rights to forbid circumvention of technological measures 4 Conveying Verbatim Copies You may convey verbatim copies of the Program s source code as you receive it in any medium provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice keep intact all notices stating that this License and any non permissive terms added in accord with section 7 apply to the code keep intact all notices of the absence of any warranty and give all recipients a copy of this License along with the Program You may charge any price or no price for each copy that you convey and you may offer support or warranty protection for a fee 5 Conveying Modified Source Versions You may convey a work based on the Program or the modifications to produce it from the Program in the form of
77. 0 lt height gt lt rect gt lt property gt lt property name font gt lt font gt lt family gt Sans Serif lt family gt lt pointsize gt 12 lt pointsize gt lt weight gt 50 lt weight gt lt bold gt false lt bold gt lt font gt lt property gt lt property name text gt lt string gt Product ID lt string gt lt property gt lt widget gt lt widget class QLabel name nameLabel gt lt property name geometry gt lt rect gt lt x gt 260 lt x gt lt y gt 50 lt y gt lt width gt 200 lt width gt lt height gt 30 lt height gt lt rect gt lt property gt lt property name font gt lt font gt lt pointsize gt 18 lt pointsize gt lt font gt lt property gt lt property name text gt lt string gt name lt string gt lt property gt lt widget gt widget class QLabel name priceLabel gt lt property name geometry gt lt rect gt lt x gt 310 lt x gt lt gt 80 lt gt lt width gt 150 lt width gt lt height gt 30 lt height gt lt rect gt lt property gt 65 lt property name font gt lt font gt lt pointsize gt 12 lt pointsize gt lt font gt lt property gt lt property name text gt lt string gt price lt string gt lt property gt lt widget gt lt widget class QLabel name idLabel gt lt property name geometry gt lt rect gt lt x gt 350 lt x gt lt gt 20 lt gt lt width gt 110 lt width gt
78. 02 27 E This file is part of QtScale QtScale is free software you can redistribute it and or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 3 QtScale is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details Copyright C 2014 Pablo Cholbi Alenda You should have received a copy of the GNU General Public License along with QtScale If not see lt http w u org l gt dk HH dk dt dt dt HH HH CONFIG serialport DEFINES appVersion 1 00 RESTART 255 QT core gui sql greaterThan QT_MAJOR_VERSION 4 QT widgets TARGET QtScale TEMPLATE app target path usr local bin INSTALLS target SOURCES main cpp commandline cpp database cpp mainwindow cpp messagedialog cpp optionsdialog cpp productdialog cpp tabledialog cpp serialscale cpp licensedialog cpp aboutdialog cpp 69 HEADERS commandline h errorcode h database h mainwindow h messagedialog optionsdialog productdial
79. 04 06 00 11 make ARCH arm CROSS COMPILE arm linux gnueabihf uImage At this point before the compilation begins as the USB to serial flag was set the make executable will ask whether or not to enable support for a variety of devices For the purpose of this project only the USB SERIAL PL2303 is enabled Finally it is necessary to install the kernel Installation is done by moving the kernel image to the location where it is read on the target system With the following sequence a backup of the current kernel is made the new kernel is transferred over to the target system and the target system is then 1 Report 25 PABLO CHOLBI ALENDA SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o rebooted root am335x evm cp media mmcblk0pl uImage media mmcb1k0p1 uImage bak user debian opt ti sdk am335x evm 06 00 00 00 board support linux 3 2 0 psp04 06 00 11 scp arch arm boot uImage root 192 168 1 100 media mmcb1k0p1 uImage root am335x evm boot shutdown r now If everything has gone well the system will come up as normal To check if the new kernel is running the following command can be executed The date in the output of the command is the compilation date of the kernel that is currently running root am335x evm uname a At this point if the USB to serial adapter is connected then the following command is executed
80. 2 output with a USB to serial adapter However the kernel currently installed on the target system does not have the drivers for these devices It is necessary to compile a kernel with USB to serial adapter support There are many adapters on the market with different chips In this project the Prolific PL2303 chip is used as it is the integrated circuit used inside the USB to serial adapter used in the development of this project Therefore this section is centred around obtaining support for this device but similar steps must be taken with other devices The following section is a commented extract with slight modifications of part of the Texas 24 1 Report UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX POLIT CNICA DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE Instruments Document AMSDK Linux User s Guide TI Wiki 2 In order to build the Linux kernel you will need a cross compiler installed on your system which can generate object code for the ARM core in your Sitara device To add the compiler to the path the following command is executed user debian export PATH opt ti sdk am335x evm 06 00 00 00 1inux devkit sysroots i686 arago linux usr bin SPATH user debian cd opt ti sdk am335x evm 06 00 00 00 board support linux 3 2 0 psp04 06 00 11 Prior to compiling the Linux kernel it is often a good idea to make sure that the kernel sources are clean and that there
81. 40 of file errorcode h 5 8 home pablo Developing Qt GtScale src licensedialog cpp File Reference Class implementation of licenseDialog include licensedialog h include ui licensedialog h 5 8 1 Detailed Description Class implementation of licenseDialog This class displays the license of the application Date March 2014 Author Pablo Cholbi Definition in file licensedialog cpp 5 9 home pablo Developing Qt QtScale src licensedialog h File Reference Class definition of licenseDialog include lt QDialog gt Classes class licenseDialog this class displays the license information of the application The information is static and defined in the UI file 5 9 1 Detailed Description Class definition of licenseDialog Date March 2014 Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 32 File Documentation Author Pablo Cholbi Definition in file licensedialog h 5 10 home pablo Developing Qt QtScale src main cpp File Reference Start QtScale application include lt QApplication gt include lt QStringList gt include lt QProcess gt include mainwindow h Functions int main int argc char argv Start application 5 10 1 Detailed Description Start QtScale application Date March 2014 Author Pablo Cholbi Definition in file main cpp 5 10 2 Function Documentation 5 10 21 int main int argc char argv Start application Parameters
82. 6 2014 19 45 48 for QtScale by Doxygen vi CONTENTS 5 9 home pablo Developing Qt QtScale src licensedialog h File Reference 31 S91 Detaled concen a Ro m kom mom um eR ae 31 5 10 home pablo Developing Qt QtScale src main cpp File Reference 32 5 10 1 Detaled DescnbpDI 2 2222 22 CR R cm Ge RR 32 5102 Fanclon DOCUMENTO s sou nce A 40 Rm ee a 32 och ad ba ke ________ 32 5 11 home pablo Developing Qt QtScale src mainwindow cpp File Reference 33 541 1 2 EA A 2 33 5 12 home pablo Developing Qt QtScale src mainwindow h File 33 512 1 Detaled Descrniphon xoa asar a Go o A Rx 34 5 13 home pablo Developing Qt QtScale src messagedialog cpp File Reference 34 549 1 Detailed 2o opm Root Rex Pee Gee 3 34 5 14 home pablo Developing Qt QtScale src messagedialog h File Reference 34 5 14 1 Detailed Description 2 RR m xk m o9 Room 3 ym 35 5 15 home pablo Developing Qt QtScale src optionsdialog cpp File Reference 35 5 15 1 2022 2 35 5 16 home pablo Developing Qt QtScale src optionsdialog h File Reference 35 5 16 1 Detailed Description 2 2
83. BILITY TO USE THE PROGRAM INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES 17 Interpretation of Sections 15 and 16 If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee Annex 3 IE 21 Scale Manual Author Microgram Instruments Espafiola S A euibed 2 al vanolid e T E gt Jesed ep ej e3pod JopeJedo e ej ue epejueseudeJ e eJezi ensie es opeureJBoJd ewop Jeqet ou ep oseo ug ue sopeureJDoud ap oJeuinu 0 JOSIA ue amp JeoeJede jsej T vanl Typ NENE eller 4 UoioezijensiA ns ejueuieAiseons es sojueuiBes 501
84. D 15 4550 SON Las de ey OS Pa ee Se de Xx POR boe Xe uU 15 4 6 messageDialog Class Reference 15 46 1 DetaledDescnplom 222222252222 22222 222258 PEOR 16 4 6 2 Constructor amp Destructor 16 45 2 1 messageDialog lt lt se Bee 59 A 16 46 22 messageDiadlog ee m omo mk 16 4 6 3 Member Function Documentation 16 evornMgSSade lnc o9 od m cmo bom nA hee A LE 16 45 9 2 cuoco koe kw so E AR RD 16 47 optionsDialog Class Reference 16 47 1 Detailed Descriphon xxix PS A EEG 17 4 7 2 Constructor amp Destructor Documentation 17 OPUSMSDISION E A E mE Es 17 47 2 2 eop bnsDial g 22 ER ker m po X 17 4 8 productDialog Class Reference 17 45 1 022 2 18 4 8 2 Constructor amp Destructor Documentation 18 A AR o use xix OR emm Rn oi e 18 48 2 2 cproductbialeg lt lt lt nasa a fox 2 18 4 8 3 Member Function Documentation 18 TOME 2 bb Rt 22 22 EEE SER AEE AA ee 18 49 productStruct St
85. Developing Qt OtScale src database cpp 29 home pablo Developing Qt QtScale src database h 29 home pablo Developing Qt QtScale src errorcode h 30 home pablo Developing Qt OtScale src licensedialog 31 home pablo Developing Qt OtScale src licensedialog h 31 home pablo Developing Qt QtScale src main cpp 32 home pablo Developing Qt QtScale src mainwindow cpp 33 home pablo Developing Qt OtScale src mainwindow h 33 home pablo Developing Qt QtScale src messagedialog 34 home pablo Developing Qt QtScale src messagedialog h 34 home pablo Developing Qt OtScale src optionsdialog 35 home pablo Developing Qt OtScale src optionsdialog h 35 home pablo Developing Qt QtScale src productdialog 36 home pablo Developing Qt QtScale src productdialog h 37 home pablo Developing Qt QtScale src productstruct h 37 home pablo Developing Qt QtScale src serialscale cpp 38 home pablo Developing Qt QtScale src serialscale h 38 home pablo Developing Qt QtScale src tabledialog cpp 39 home pablo Developing Qt QtScale src tabledialog h 39 aboutDialog 7 aboutDialog 7 aboutDialog 7 aboutDialog 7 argumentError errorcode h 31 buffScan serialScale 21 clearAccum Database 11 closeConnection serialScale 22 closeDatabase Database 11 Command 8 Command 8 databasePath 9 parseArguments 9 Database 9 clearAccum 11 closeDatabase 11 Database 10 icon 11 list
86. Dialog 1 delete ui F brief exit licenseDialog This slot closes destroys current license dialog void licenseDialog on_closeButton_clicked this gt close end of file AS 22 10 licensedialog h file licensedialog h 0brief Class definition of licenseDialog date March 2014 author Pablo Cholbi This file is part of QtScale QtScale is free software you can redistribute it and or modify 4 under the terms of the GNU General Public License as published by the Free Software Foundation version 3 QtScale 15 distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details Copyright C 2014 Pablo Cholbi Alenda You should have received a copy of the GNU General Public License along with QtScale If not see lt http www gnu org licenses gt ifndef LICENSEDIALOG_H define LICENSEDIALOG_H include lt QDialog gt namespace Ui 1 class licenseDialog brief this class displays the license information of the application The information is static and defined in the UI file class licenseDialog public QDialog Q_OBJECT public explicit licenseDialog
87. E SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o 10 3 Budget Ra UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX am M DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE 4 Amortization 4 1 General Amortization Furniture 10 2200 0 966 17 71 Banking Fees 1 80 0 966 77 28 94 99 The total cost of this section for this project is 94 99 4 2 Hardware Amortization Asus A55VD SX049V Laptop 5 579 0 966 9 32 Logitech Mouse 2 15 99 0 966 0 64 Asus RT N66U Router 5 99 0 966 1 59 TotalCost O 1156 The total cost of this section for this project is 11 56 4 3 Software Amortization Open source software was used throughout the whole project and therefore no software amortization is needed 4 3 Total Cost of Amortization General Amortization 94 99 Hardware Amortization 11 56 106 55 Total cost of amortization 106 55 3 Budget 11 PABLO CHOLBI ALENDA E EEEE SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o 12 3 Budget UNIVERSITAT POLIT CNICA DE VALENCIA 5 Total Cost QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX APPLICATION FOR AN INDUSTRIAL SCALE Concept Cost Material Cost 80 00 Labour Cost 6348 28 General Expenses 460 06 Amortization 106 55
88. E ii 6 4 1 Conditions of Package Content sccssccssscssersessccssccesscsenssensccsssncessnnncesssnncesenanes 6 4 2 Conditions of Package eene nnne 6 4 3 Conditions of Maintenance of the Optical Support 6 ood aee ton du 7 2 Specifications 1 PABLO CHOLBI ALENDA E EEEE SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o 2 2 Specifications fi UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM USING LINUX UP DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE 1 Optional Conditions 1 1 Programming Work The developer agrees to complete the project as outlined in the report and deliver on the date agreed with the customer previously reviewed 1 2 Poor Performance and Modifications The customer has the responsibility to review the operation of the supplied package and communicate the aspects that according to him her are not well designed extending such liability to those existing but undetected defects The changes that the client sees fit will be performed in any case with a corresponding increase in price of the project as they are deemed unnecessary changes for the normal operation of the system and made for the client s particular preferences Expanding on this last point the developer agrees to alter the content of the program provi
89. Figure 5 1 10 tableDialog Flowchart Clear Cancel The Qt form tabledialog ui provides the GUI for this module a screenshot of which is provided below ID Name Sales 115 Strawberry 0 2 10 0 3 12 Peach 0 4 13 Orange 0 5 15 Lemon 0 Close 6 22 Grape 0 7 23 Cherry 0 8 25 Banana 0 Figure 5 1 11 tableDialog UI 1 Report 39 PABLO CHOLBI ALENDA SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o 5 1 3 6 Options Dialog The optionsDialog module is composed of the source code file optionsdialog cpp the C header file optionsdialog h and the Qt form optionsdialog ui The flow diagram for this module is as follows optionsDialog Initialize UI Button press Exit application Reboot system Exit Execute Execute with success reboot shutdown command command Shutdown system About Cancel aboutDialog Restart application Exit with restart Figure 5 1 12 optionsDialog Flowchart The Qt form optionsdialog ui provides the GUI for this module a screenshot of which is provided below Restart QtScale Reboot System Beexit QtScale Shutdown System Figure 5 1 13 optionsDialog UI 40 1 Report ERa UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX POLIT CNICA a DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE 5 1 3 7 About Dialog The aboutDialog mod
90. For example if you distribute copies of such a program whether gratis or for a fee you must pass on to the recipients the same freedoms that you received You must make sure that they too receive or can get the source code And you must show them these terms so they know their rights Developers that use the GNU GPL protect your rights with two steps 1 assert copyright on the software and 2 offer you this License giving you legal permission to copy distribute and or modify it For the developers and authors protection the GPL clearly explains that there is no warranty for this free software For both users and authors sake the GPL requires that modified versions be marked as changed so that their problems will not be attributed erroneously to authors of previous versions Some devices are designed to deny users access to install or run modified versions of the software inside them although the manufacturer can do so This is fundamentally incompatible with the aim of protecting users freedom to change the software The systematic pattern of such abuse occurs in the area of products for individuals to use which is precisely where it is most unacceptable Therefore we have designed this version of the GPL to prohibit the practice for those products If such problems arise substantially in other domains we stand ready to extend this provision to those domains in future versions of the GPL as needed to protect the freedom of users
91. LOG_H define MESSAGEDIALOG_H include lt QDialog gt include errorcode h namespace Ui 1 class messageDialog F orief this class encapsulates the methods and variables necesary to display error and information messages class messageDialog public QDialog 1 Q_OBJECT public explicit messageDialog QWidget parent 0 messageDialog void errorMessage errorCode error void genericMessage QString msg private slots void on_pushButton_clicked private 46 Ui messageDialog ui endif MESSAGEDIALOG H end of file AAA A AAA AA AH AA AA AAA AAA AAA RARA oe ROR OR OR eoe RRR ROR AOR 4T 18 messagedialog ui lt xml version 1 0 encoding UTF 8 gt lt ui version 4 0 gt lt class gt messageDialog lt class gt lt widget class QDialog name messageDialog gt lt property name geometry gt lt rect gt lt x gt 0 lt x gt lt y gt 0 lt y gt lt width gt 480 lt width gt lt height gt 272 lt height gt lt rect gt lt property gt lt property name windowTitle gt lt string gt Form lt string gt lt property gt lt widget class QPushButton name pushButton gt lt property name geometry gt lt rect gt lt x gt 170 lt x gt lt y gt 202 lt y gt lt width gt 140 lt width gt lt height gt 50 lt height gt lt rect gt lt property gt lt property name font gt lt font gt lt pointsize gt 14 lt poi
92. NDUSTRIAL SCALE 5 Conditions of Warranty There is no warranty for the program to the extent permitted by applicable law except when otherwise stated in writing the copyright holders and or other parties provide the program as is without warranty of any kind either expressed or implied including but not limited to the implied warranties of merchantability and fitness for a particular purpose the entire risk as to the quality and performance of the program is with you should the program prove defective you assume the cost of all necessary servicing repair or correction However within two years from the delivery of the project if the original project files are lost or damaged the developer shall provide a copy of the project on optical media The shipping costs of the new CD shall be billed to the client and therefore the developer shall negotiate the shipping method and cost with the client a forehand The developer is not responsible in any circumstances for any damages that may arise from the improper use of the software package both material damage and damage to third parties 2 Specifications 7 PABLO CHOLBI ALENDA E EEEE SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o 8 2 Specifications UNIVERSITAT POLIT CNICA EBENEN DE VALENCIA Escuela T cnica Superior de Ingenieria del Dise o Universitat Polit cnica de Val ncia Escuela T cnica Superior de Ingenier
93. QWidget parent 0 licenseDialog private slots void on_closeButton_clicked private Ui licenseDialog ui 3 ttendit LICENSEDIALOG_H 23 end of file KE KE GE SE AAA KARA o Eoo GE RK OR koe koe OR OR AOR OR RRR OR OR AOR ROR RR OR eoe AAA AAA 24 11 licensedialog ui lt xml version 1 0 encoding UTF 8 7 5 lt ui version 4 0 gt lt class gt licenseDialog lt class gt widget class QDialog name licenseDialog gt lt property name geometry gt lt rect gt lt x gt 0 lt x gt lt y gt 0 lt y gt lt width gt 480 lt width gt lt height gt 272 lt height gt lt rect gt lt property gt lt property name windowTitle gt lt string gt Dialog lt string gt lt property gt lt layout class QVBoxLayout name verticalLayout gt lt item gt widget class QTextEdit name licenseText gt lt property 1 gt lt bool gt true lt bool gt lt property gt lt property name html gt lt string gt amp lt DOCTYPE HTML PUBLIC amp quot W3C DTD HTML 4 0 EN amp quot amp quot http www w3 org TR REC html40 strict dtd amp quot amp gt amp lt html amp gt amp amp lt head amp gt amp lt meta name amp quot qrichtext amp quot content amp quot i amp quot gt 4lt style type amp quot text csskquot amp gt li white space pre wrap amp 1lt style amp gt amp 1t head amp gt 15 style amp quot font family Sans
94. RTEX A8 USING LINUX APPLICATION FOR AN INDUSTRIAL SCALE Appendix 1 Source Code Documentation Author Pablo Cholbi Alenda Supervisor Dr Angel Perles Ivars May 2014 Contents 1 Hierarchical Index a IAS PUC TC ae A a ate de ke 2 Class Index EN Class List 3 File Index 3 1 File List 4 Class Documentation 4 1 4 2 4 3 aboutDialog Class Reference a 41 1 Detaled Descriphon RU X E Rem 4 1 2 Constructor amp Destructor Documentation 44 1 ee goo x Reds SS Bol ADD Lu sou doe x onm a nm RR b mE Command Class Reference 42 1 Detailed Description on oo Ro RR RU mex RR 4 2 Constructor amp Destructor Documentation CIO 4 2 3 Member Function Documentation Azal id A 4232 occ censo a X A ROB GRE AUR m RD Es Database Class Reference 42 1 Detaled o ce eo m mh RR ho mom Re Red d RR a Rm E ES 4 3 2 Constructor 8 Destructor Documentation SGT BAADAE Reap Wer eX EU ee x DE 4 3 3 Member Function Documentation 4331 a uas uL rx
95. SOR DR NGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o The section that configures the ethO interface can be replaced with auto ethO iface ethO inet static address 192 168 1 100 gateway 192 168 1 1 netmask 255 255 255 0 network 192 168 1 0 broadcast 192 168 1 255 Note that with this configuration the device is assigned IP address 192 168 1 100 4 2 2 4 Directory for Binaries This section describes the creation of a dedicated directory for third party binary files and the inclusion of such directory in the binary search path The following command is executed to create the directory usr local bin into which user developed applications shall be copied root am335x evm mkdir p usr local bin To add this directory automatically to the PATH variable at login if the directory exist a profile file is created root am335x evm vi profile The content of the file being f f bashrc then bashrc 71 set PATH so it includes third party bin if it exists if d usr local bin then PATH PATH usr local bin fi mesg n 4 2 2 5 USB to Serial Adapter Support Please note that this section is included for the TMDSSK3358 AM335x Starter Kit The BeagleBone Black comes with support for USB to serial adapters out of the box The application to be developed shall communicate with an industrial scale that offers an RS 23
96. Scale If not see lt http www gnu org licenses gt ifndef OPTIONSDIALOG H define OPTIONSDIALOG_H include lt QDialog gt include aboutdialog h namespace Ui 1 class optionsDialog orief this class encapsulates the methods and variables necesary to display and execute configuration options class optionsDialog public QDialog 1 Q_OBJECT public explicit optionsDialog QWidget parent 0 optionsDialog private slots void restartButton clicked void exitButton clicked void on rebootButton clicked void on shutdownButton clicked void on aboutButton clicked 53 void on_closeButton_clicked private Ui optionsDialog ui aboutDialog about 3 endif OPTIONSDIALOG_H end of file KE KE SES SE GE RR AAA RA AA AAA ROR AOR ROR OR OR AOR OR RRR OR OR AOR ROR RR OR eoe OR A AS 54 21 optionsdialog ui lt xml version 1 0 encoding UTF 8 gt lt ui version 4 0 gt lt class gt optionsDialog lt class gt lt widget class QDialog name optionsDialog gt lt property name geometry gt lt rect gt lt x gt 0 lt x gt lt y gt 0 lt y gt lt width gt 480 lt width gt lt height gt 272 lt height gt lt rect gt lt property gt lt property name windowTitle gt lt string gt Dialog lt string gt lt property gt widget class QPushButton name closeButton gt lt property name geometry gt lt rect gt lt x gt 370
97. Scale class documentation and the annex which includes the manufacturers datasheet This function depens on buffScan and process void serialScale update 1 int newData receiveData buffer totalData bufferSize totalData 1 reset values on update weight 0 0 stable false process new data if newData gt 0 1 int msgEnd bool msgFound totalData totalData newData do 1 75 attempt to find message msgFound buffScan buffer totalData amp msgEnd if msgFound remove message from buffer memmove buffer buffer msgEnd 1 totalData msgEnd 1 totalData totalData msgEnd 1 while msgFound reset buffer 1 almost full this should only happen in connections with significant data losses if totalData gt 0 90 bufferSize totalData 0 Obrief Scan buffer for measurements This is the function searched for the start and end characters in the buffer If they are found the possible array 15 passed on for further processing This function depend on This function is intended to work with the Microgram ie21 industrial scale from Microgram Instruments Espaola S A For more information on the ie21 data stream coding please consult the serialScale class documentation and the annex which includes the manufacturers datasheet Oreturns TRUE is a message is found and FALSE otherwise bool serialScale buffScan
98. THOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details Copyright C 2014 Pablo Cholbi Alenda You should have received a copy of the GNU General Public License along with QtScale If not see lt http www gnu org licenses gt ifndef ABOUTDIALOG H define ABOUTDIALOG H include lt QDialog gt include licensedialog h namespace Ui 1 class aboutDialog orief this class displays about information of the application The information is static and defined in the UI file class aboutDialog public QDialog 1 Q_OBJECT public explicit aboutDialog QWidget parent 0 aboutDialog private slots void on licenseButton clicked void closeButton clicked private Ui aboutDialog ui licenseDialog license endif AB UTDIALOG H end of file AMA AAA AAA KARA HAR AA ARA AAA ROR ROR OR AOR eoo oe ooo AOR ROR RR OR eoe eoe eee 3 aboutdialog ui lt xml version 1 0 encoding UTF 8 7 gt lt ui version 4 0 gt lt class gt aboutDialog lt class gt lt widget class QDialog name aboutDialog gt lt property name geometry gt lt rect gt lt x gt 0 lt x gt lt y gt 0 lt y gt lt width gt 480 lt width gt height gt 272 lt height gt lt rect gt lt property gt lt property name windowTitle gt lt string gt Dialog lt string gt
99. UNIVERSITAT POLIT CNICA EBENEN DE VALENCIA Escuela T cnica Superior de Ingenieria del Dise o Universitat Polit cnica de Val ncia Escuela T cnica Superior de Ingenier a del Dise o Bachelor s Degree in Industrial Electronics and Automation Engineering Final Year Engineering Project QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX APPLICATION FOR AN INDUSTRIAL SCALE Documents 1 Report 2 Specifications 3 Budget 4 User Manual Appendix 1 Source Code Documentation Appendix 2 Source Code Annex 1 Documentation License Annex 2 Software License Annex 3 IE 21 Scale Manual Author Pablo Cholbi Alenda Supervisor Dr Angel Perles Ivars May 2014 Dedicated to my parents for their love endless support and encouragement Acknowledgements I am grateful and would like to express my sincere gratitude to my supervisor Dr Angel Perles Ivars for his invaluable guidance continuous encouragement and constant support as a teacher and as a supervisor which made this project possible Without his advice and assistance it would have been a lot tougher to complete I would also like to thank Dr Francisco Jos Gimeno Sales for taking me as an intern during my third and fourth year of my undergraduate degree I found that the practical experience I obtained at the Laboratory of Renewable Energies to be very valuable and eye opening My sincere thanks go to all lecturers and memb
100. _6 gt setText QString number ID u u db name ID else ui gt toolButton_6 gt setVisible false Obrief Open product page for product in button 1 This slot closes extracts product information from the database and starts a productDialog to weigh the product and complete a sale Once the productDialog exits the accumulated sales of the selected product is updated in the database void MainWindow on toolButton 1 clicked 1 item weight 0 0 int ID vector at page 6 0 item name db name ID item icon db icon ID item price db price ID item id ID product new productDialog if product gt setup amp item if product gt db updateAccum item weight ID Y Y delete product Obrief Open product for product in button 2 This slot closes extracts product information from the database and starts a productDialog to weigh the product and complete a sale Once the productDialog exits the accumulated sales of the selected product is updated in the database void MainWindow on toolButton 2 clicked E item weight 0 0 33 1 if product gt db updateAccum item weight ID delete product Obrief Open product for product in button 3 This slot closes extracts product information from the database and starts a productDialog to weigh the product and complete a sale Once the productDialog ex
101. a Q Android location opt ti sdk am335x evm 06 00 00 00 linux devkit sysroots i686 arago linux usr bin qmake Browse lack Q m Qt version 4 8 3 for Embedded Linux Details v 0 Devices Helpers None available Details gt Fe Code Pasting _ Figure 4 1 1 Configuring qmake 1 Report 17 PABLO CHOLBI ALENDA SUPERVISOR DR ANGEL PERLES IVARS 4 1 3 2 Configuring Compiler Click on the Tools gt Options from the top menubar On the left side vertical menubar click Build amp Run Click the Compilers tab under Build amp Run Click Add in the top right and add a GCC Escuela T cnica Superior de Ingenier a del Dise o Change the name to arm arago GCC This can be done by modifying the Name field To set the Compiler Path select Browse Navigate to opt ti sdk am335x evm 06 00 00 00 linux devkit sysroots i686 arago linux usr bin Select arm linux gnueabihf gcc and click on Open Click Apply to save your changes 221 Qt Quick Debugger gt Designer Analyzer an Version Control 9 Android Fa Code Pasting 7 Build amp Run General Kits Qt Versions Name Type Auto detected GCC x86 64bit GCC GCC x86 32bit GCC Manual Options Compilers Debuggers CMake arm arago GCC Add Clone Remove Compiler path 06 00 00 00 linux devkit sysroots i686 arago linux usr bin arm linux gnueabihf gcc Browse Platf
102. a collecting society under any voluntary or waivable statutory or compulsory licensing scheme In all other cases the Licensor expressly reserves any right to collect such royalties Section 3 License Conditions Your exercise of the Licensed Rights is expressly made subject to the following conditions a Attribution 1 If You Share the Licensed Material including in modified form You must A retain the following if it is supplied by the Licensor with the Licensed Material i identification of the creator s of the Licensed Material and any others designated to receive attribution in any reasonable manner requested by the Licensor including by pseudonym if designated ii a copyright notice iii a notice that refers to this Public License iv a notice that refers to the disclaimer of warranties v a URI or hyperlink to the Licensed Material to the extent reasonably practicable B indicate if You modified the Licensed Material and retain an indication of any previous modifications and C indicate the Licensed Material is licensed under this Public License and include the text of or the URI or hyperlink to this Public License 2 You may satisfy the conditions in Section 3 a 1 in any reasonable manner based on the medium means and context in which You Share the Licensed Material For example it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required infor
103. abets and writing systems of languages other than the default for the target system Specifically Japanese fonts shall be added but the process can be extrapolated for other fonts First of all it is necessary to download the TrueType files for the desired fonts The latest Takao Japanese font family shall be downloaded as it is a free and open source TrueType font as it is suitable for both display and printing and it is a popular font on the Debian and Ubuntu distributions user debian cd Downloads user debian Downloads wget https launchpad net takao fonts 003 02 003 02 01 download takao fonts ttf 003 02 01 tar gz user debian DownloadsS tar zxvf takao fonts ttf 003 02 01 tar gz user debian DownloadsS cd takao fonts ttf 003 02 01 Now the fonts shall be transferred over to the target system user8debian Downloads takao fonts ttf 003 02 01 scp ttf root 192 168 1 100 usr lib fonts With this the target system now has support for representing Japanese text Finally some clean up is required on the host computer user debian Downloads takao fonts ttf 003 02 01S cd user debian Downloads rm rf takao fonts ttf 003 02 01 user debian Downloads rm takao fonts ttf 003 02 01 tar gz 1 Report 43 PABLO CHOLBI ALENDA SUPERVISOR DR ANGEL PERLES IVARS 2 9 5 0 10 751 12 66 o 13 4A 15 222 945 Figure 5 1 18 Application Usin
104. able Leave empty to E Code Pasting M 20 Figure 4 1 4 Configuring Device 1 Report UNIVERSITAT POLIT CNICA DE VALENCIA 4 1 3 5 Kit Configuration g y Filter um Environment 21 Qt Quick Debugger gt Designer Analyzer t Version Control Android o BlackBerry 0 Devices Fa Code Pasting 1 Report General Click Apply to save your changes QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX APPLICATION FOR AN INDUSTRIAL SCALE To set the Sysroot Path select Browse Click on the Tools gt Options from the top menubar On the left side vertical menubar click Build amp Run Click the Kits tab under Build amp Run Click Add Change the name to Sitara Qt 4 8 3 This can be done by modifying the Name field In the rest of the fields select the previously configured components Options Kits Qt Versions Compilers Debuggers CMake Navigate to opt ti sdk am335x evm 06 00 00 00 linux devkit sysroots i686 arago linux Click Choose xj Name Add gt Auto detected 7 Manual Clone Remove Name Sitara Qt 4 8 3 a Device type Generic Linux Device Device AM335x EVM default for Generic Linux Manage Sysroot Jopt ti sdk am335x evm 06 00 00 00 linux devkitysysroots i686 arago linux Browse Compiler arm arago GCC Manage Debugger arm arago GDB
105. alog h 0brief Class definition of tableDialog date March 2014 author Pablo Cholbi This file is part of QtScale QtScale is free software you can redistribute it and or modify it under the terms of the GNU General Public License as published the Free Software Foundation version 3 QtScale 15 distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details Copyright C 2014 Pablo Cholbi Alenda You should have received a copy of the GNU General Public License along with QtScale If not see lt http www gnu org licenses gt ifndef TABLEDIALOG H define TABLEDIALOG H include lt QDialog gt include lt QSqlQueryModel gt include database h namespace Ui class tableDialog brief this class encapsulates the methods and variables necessary display the accumulated sales of all products in the database class tableDialog public QDialog 1 Q_OBJECT public explicit tableDialog QWidget parent 0 tableDialog private slots void on_clearButton_clicked void on_closeButton_clicked private 85 by to Ui tableDialog ui QSqlQueryModel model endif TABLEDIALOG_H end of file KOR oe ROR OK OR eoe eoe eoe ROR IRR eoe
106. am msg Message to be displayed void messageDialog genericMessage QString msg 44 ui gt Title gt setText Information 11 gt gt msg ui gt pushButton gt setText Acknowledge ui gt pushButton gt setIcon QIcon Buttons Buttons warning png ui gt pushButton gt setIconSize QSize 24 24 brief Acknowledge message This slot closes destroys current message dialog void messageDialog on_pushButton_clicked this gt close end file xxx o ok x ok oko AAA AAA ARA ARA 45 17 messagedialog h file messagedialog h brief MessageDialog class definition date March 2014 author Pablo Cholbi This file is part of QtScale QtScale is free software you can redistribute it and or modify 4 under the terms of the GNU General Public License as published by the Free Software Foundation version 3 QtScale 15 distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details Copyright C 2014 Pablo Cholbi Alenda You should have received a copy of the GNU General Public License along with QtScale If not see lt http www gnu org licenses gt ifndef MESSAGEDIA
107. application to be developed Please note that this method assumes that there is a subdirectory in the current working directory called Icons that contains a PNG image for every product that has the same name as the product it represents followed by a png extension For a clearer explanation the content of the subdirectory for this example is as follows user debian 15 Icons Apple png Banana png Cherry png Grape png Lemon png Orange png Peach png Pear png Strawberry png 5 2 3 Database Management For the management of the database various options are available but for simplicity of use a GUI application is recommended A popular standalone open source cross platform GUI application for this purpose is SQLite Database Browser SQLite Database Browser can be obtained from lt http sourceforge net projects sqlitebrowser gt However there are many other applications that will perform the required task successfully This application is intuitive and easy to use even for novice users and it allows to browse and modify databases without SQL queries Although it does support SQL query input for the users who prefer it Please note that this section refers to the management and updating of existing database records New records are recommended to be inserted with the aforementioned method as it is the only one where the image insertion has been tested to work successfully 1 Another popular application to manag
108. apsulates the methods and variables necessary to manage the SQLite database The database file must have a table named Products with the following fields Products Table ID integer primary key _ ID 1 ID 2 For more information please consult the project report Definition at line 58 of file database h 4 3 2 Constructor amp Destructor Documentation 4 3 2 1 Database Database Class constructor of Database This function creates an instance of Databaseand initializes the class member Definition at line 47 of file database cpp ER A Accumulated real Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 4 3 Database Class Reference 11 4 3 3 Member Function Documentation 4 3 3 1 void Database clearAccum Reset accumulated sales This function updates the accumulated sales of all products in the database and sets them to O This function does not take parameters as it relies on other Database class functions Definition at line 213 of file database cpp 4 3 3 2 void Database closeDatabase Close database This function closes the database Definition at line 93 of file database cpp 4 3 3 3 Qlcon Database i
109. are no remnants left over from a previous build The command to clean the kernel is user debian make ARCH arm CROSS COMPILE arm linux gnueabihf mrproper Before compiling the Linux kernel it needs to be configured to select what components will become part of the kernel image which components will be build as dynamic modules and which components will be left out all together This is done using the Linux kernel configuration system It is often easiest to start with a base default configuration and then customize it for you use case if needed In the Linux kernel a command of the form user debian opt ti sdk am335x evm 06 00 00 00 board support linux 3 2 0 psp04 06 00 11 make ARCH arm CROSS COMPILE arm linux gnueabihf tisdk am335x evm defconfig After the configuration step has run the full configuration file is saved to the root of the kernel tree as config Any further configuration changes are based on this file until it is clean up up by doing a kernel clean as mentioned above Now the only modification that need to be done to the configuration file is to set the CONFIG USB SERIAL option user debian opt ti sdk am335x evm 06 00 00 00 board support linux 3 2 0 psp04 06 00 11 sed i s CONFIG USB SERIAL is not set CONFIG USB SERIAL y g config To compile the kernel the following command is executed user debian opt ti sdk am335x evm 06 00 00 00 board support linux 3 2 0 psp
110. ary is required it is more feature rich than QextSerialPort and most importantly because it eases cross platform compatibility and compatibility with current and future Qt releases This section details the process of adding the QtSerialPort module to the current set up such that it can be used in the application being developed The detailed process is based on the instructions given in Qt Wiki First it is necessary to download the source code in the TI SDK directory and set up the build environment user debian source opt ti sdk am335x evm 06 00 00 00 linux devkit environment setup linux devkit cd opt ti sdk am335x evm 06 00 00 00 1 Report 51 PABLO CHOLBI ALENDA SUP ERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o linux devkit opt ti sdk am335x evm 06 00 00 00 gt git clone git gitorious org qt qtserialport git linux devkit opt ti sdk am335x evm 06 00 00 00 gt mv qtserialport qtserialport src linux devkit opt ti sdk am335x evm 06 00 00 00 mkdir qtserialport build linux devkit opt ti sdk am335x evm 06 00 00 00 gt cd qtserialport build w it is possible to proceed and compile and install the shared library linux devkit opt ti sdk am335x evm 06 00 00 00 qtserialport build qmake qtserialport src qtserialport pro linux devkit opt ti sdk am335x evm 06 00 00 00 qtserialport build make linux devki
111. asionally and noncommercially and only if you received the object code with such an offer in accord with subsection 6b d Convey the object code by offering access from a designated place gratis or for a charge and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge You need not require recipients to copy the Corresponding Source along with the object code If the place to copy the object code is a network server the Corresponding Source may be on a different server operated by you or a third party that supports equivalent copying facilities provided you maintain clear directions next to the object code saying where to find the Corresponding Source Regardless of what server hosts the Corresponding Source you remain obligated to ensure that it is available for as long as needed to satisfy these requirements e Convey the object code using peer to peer transmission provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d A separable portion of the object code whose source code is excluded from the Corresponding Source as a System Library need not be included in conveying the object code work User Product is either 1 a consumer product which means any tangible personal property which is normally used for personal family or household purposes or 2 anything
112. atabase 2 02 eb ge ee bed eee Reh ewe he She be ba ProdUctStruct ve augere a Boe A a Be od An QDialog aboutDialog sueco Boe ae e mde Med ox Sok ela eee d A ee licenseDialog 2253 6515 e Rob Pub sexe e E dy Rok hee gs messageDialog eae ER e Lae Scr E xD Ron Gom OR ART ER optionsDialog productDialog kde REIR tableDialog s 5 4 2 ohne Roh Remo ood dee doe d A Dos QMainWindow Main WIDndOoW s s gos ba he OR dem dU do OS eR vU serial8cale cier E ee ee Sa XE PG ee E does Hierarchical Index Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen Chapter 2 C 2 1 lass Index Class List Here are the classes structs unions and interfaces with brief descriptions aboutDialog This class displays about information of the application The information is static and defined He A This class encapsulates the methods and variables necesary to parse the commandline argu ments that are supported Database This class encapsulates the methods and variables necessary to manage the SQLite database licenseDialog This cla
113. ates previously stipulated 2 3 Price Review The time that can elapse between the writing of the contract of this project and its delivery and acceptance by the customer may be significant If the elapsed time is considered in the tables provided by the Association of Inspectors and Industrial Engineers of Valencia revision of the project cost shall be performed at the delivery of the project The formulas and tables used for that purpose shall be extracted from the Spanish Official Bulletin of the State B O E of the relevant year 4 2 Specifications UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX O CNICA DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE 3 Functional Conditions 3 1 Initial Functional Specifications Touchscreen graphical user interface application for an industrial scale Texas Instruments Sitara AM335x processor running Linux System shall receive the output of a Microgram IE21 industrial scale from Microgram Instruments Espa ola S A industrial scale over RS 232 Simple and intuitive software such that the users are able to deduce how to use the application without any prior knowledge or help The scale is intended to weigh fruit and vegetables but the database should be generic such that it can be used for commerce of other goods by weight The image name index price and accumulated sales shall be stored in a relational database The Application must
114. ation date March 2014 author Pablo Cholbi This file is part of QtScale QtScale is free software you can redistribute it and or modify 4 under the terms of the GNU General Public License as published by the Free Software Foundation version 3 QtScale is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details Copyright C 2014 Pablo Cholbi Alenda You should have received a copy of the GNU General Public License along with QtScale If not see lt http www gnu org licenses gt include licensedialog h include ui_licensedialog h Obrief Class constructor of licenseDialog object This function creates an instance licenseDialog class and initializes the widget licenseDialog licenseDialog QWidget parent QDialog parent ui new Ui licenseDialog 1 ui gt setupUi this set to fullscreen and frameless this gt setWindowFlags Qt FramelessWindowHint this gt setFixedHeight 272 this gt setFixedWidth 480 add icon to button ui gt closeButton gt setIcon QIcon Buttons Buttons cancel png ui gt closeButton gt setIconSize QSize 24 24 Obrief Class destructor licenseDialog object 21 This function destroys an instance of licenseDialog class licenseDialog license
115. attributes have one to one relationship Please note that even though the price or accumulated sales of various entities can be the same at a given point there is no point in creating a relationship from these attributes and separate tables one to many relationship Refine the Design No further refinement or simplifications can be made the database Apply the normalization rules The designed database is so limited and simple that it does not require normalization as every cell contains a single value atomic every non key column is fully dependent on the primary key and non key columns are of each other Another way to see this is that the database is so simple that it is already normalized to third form normalization at least The database is both OLTP transactional and OLAP analytical at the same time or neither depending how it is viewed In any case the designed database can not be refined simplified or normalized any further with the current specifications and therefore it is taken as the adopted solution Figure 5 2 1 Database Schema 5 2 2 Database Creation This section describes the process of creating the previously designed database As an example a database that contains 9 fruits products shall be created with the following data Index Name Image Price Accumulated 5 Strawberry PNG blob 2 50 0 0 10 Pear PNG blob 1 30 0 0 12 Peach PNG blob 1 00 0 0 13 Orang
116. automatically update the GUI when a product is added removed or updated in the database The system shall be network connected and have a fixed IP address assigned for easy maintenance and database access Critical errors and non critical errors should be handled differently The application should exit immediately when a critical error is encountered A warning system is allowed for non critical errors The application shall launch on system boot The application shall have a system shutdown and system restart under the advanced options menu The application shall be as modular as possible for simplicity and source code reuse A low cost and low power solution should be favoured as the adopted solution The application shall be cross platform developed under a framework which allows for the code to be easily compiled to run on different processor architectures and operational system 3 2 Software Limitations For the compilation of the source code Qt libraries 4 or greater are required The building of the project depends on the availability of a cross compiler for the target architecture and the Qt libraries for the target system 3 3 Hardware Limitations The project being developed is intended to be cross platform A test shall be made to test at least compatibility with x86 and x86 64 based Linux systems as well as Texas Instruments AM335x ARM but the software is only guaranteed to work on the Texas Instruments AM335
117. bi Alenda You should have received a copy of the GNU General Public License along with QtScale If not see lt http www gnu org licenses gt ifndef PRODUCTDIALOG_H define PRODUCTDIALOG_H include lt QDialog gt include lt QTimer gt include productstruct h include serialscale h include productstruct h namespace Ui 1 class productDialog F orief this class encapsulates the methods and variables necessary display product weight and information class productDialog public QDialog 1 Q_OBJECT public explicit productDialog QWidget parent 0 productDialog bool setup productStruct item private slots void on_buyButton_clicked 62 void cancelButton clicked void update private Ui productDialog ui serialScale serial productStruct product messageDialog message QTimer timer 1 PRODUCTDIALOG_H end of f le KE KE A AAA AH EG ooo Eoo RR OK KO RR OR OR ROR eoe eoe eoe ROR IO RR eoe 63 24 productdialog ui lt xml version 1 0 encoding UTF 8 7 5 lt ui version 4 0 gt lt class gt productDialog lt class gt lt widget class QDialog name productDialog gt lt property name geometry gt lt rect gt lt x gt 0 lt x gt lt y gt 0 lt y gt lt width gt 480 lt width gt lt height gt 272 lt height gt lt rect gt lt property gt lt property name windowTitle gt lt string gt Dialog lt s
118. ble array is passed on for further processing Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 22 Class Documentation This function depend on process This function is intended to work with the Microgram ie21 industrial scale from Microgram Instruments Espanola S A For more information on the ie21 data stream coding please consult the serialScale class documentation and the annex which includes the manufacturers datasheet Returns TRUE is a message is found and FALSE otherwise Definition at line 265 of file serialscale cpp 4 10 3 2 void serialScale closeConnection Closes the serial port Closes the serial port if it is open This function is part of the low level functions of this class Definition at line 131 of file serialscale cpp 4 10 3 3 float serialScale getWeight Get weight from scale Returns Weight in kilograms Definition at line 399 of file serialscale cpp 4 10 3 4 bool serialScale isStable Get stability of scale measurement Returns Stability of most recent measurement Definition at line 409 of file serialscale cpp 4 10 3 5 void serialScale loopbackTest Test serial port This functions can be used to test the serial port on the system by loopback If the industrial scale is not connected to the system and the system s serial port pin RX is connected the to its TX pin all data sent is redirected as input data This allows to simulate data stream t
119. cale init sh start stop exit 1 esac exit 0 This would be a generic script But as the application is being developed on the Texas Instruments TMDSSK3358 AM335x Starter Kit further processing is required for the application to behave correctly the touchscreen pointer needs to be configured Taking as reference etc init d matrix gui 2 0 Which is the Matrix GUI application initialization script the following changed are made to the basic script 1 bin sh etc init d QtScale init sh BEGIN INIT INFO Provides QtScale Required Start 1 1 fs syslog Required Stop 1 1 fs syslog Default Start 2345 Default Stop 016 Short Description Start QtScale at boot time Description Start QtScale with qws option END INIT INFO export TSLIB TSDEVICE dev input touchscreenO export QwS MOUSE PROTO Auto tsfile etc pointercal case 1 in start ARM9 devices get a lot of alignment trap errors with the current version of Qt 4 7 2 that we use The printing of these messages is causing a severe slowdown with QtScale and other Qt applications that QtScale launches The root cause is under investigation and an issue is being filed in the Qt JIRA tracker For now using the following command will do a software fixup of the alignment trap errors in the kernel This should have no impact on cortex A8 devices echo 2 gt proc cpu alignment Do not try to calibrate the touchscreen
120. con int 0 Get product icon This function returns as a Qlcon the icon for the specified product ID in the database Parameters ID Product index number ID field in database Returns Icon of specified product Definition at line 129 of file database cpp 4 3 3 4 QList int gt Database list List database records This function returns a QList object with all the ID numbers of the products in the database in ascending order Returns List of product IDs Definition at line 106 of file database cpp 4 3 3 5 QString Database name int D Get product name This function returns the name of the specified product ID in the database Parameters ID Product index number ID field in database Returns Name of specified product Definition at line 151 of file database cpp Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 12 Class Documentation 4 3 3 6 errorCode Database openDatabase Open database This function opens the database to be able to interact with it If the SQLite database failed to open the function returns databaseError error code Otherwise it returns SUCCESS Returns Error code being SUCCESS if the database was opened or databaseError otherwise Definition at line 75 of file database cpp 4 3 3 7 float Database price int ID Get product price This function returns the Price of the specified product ID in the database Parameters
121. con QIcon Buttons Buttons clear png populate table model new QSqlQueryModel model setQuery Accumulated FROM Products model gt setHeaderData 0 Qt Horizontal ID model gt setHeaderData 1 Qt Horizontal Name model gt setHeaderData 2 Qt Horizontal Sales ui gt tableView gt setModel model set size of table columns ui gt tableView gt setColumnWidth 0 40 ui gt tableView gt setColumnWidth 1 140 ui gt tableView gt setColumnWidth 2 140 ui gt tableView gt sortByColumn 0 Qt AscendingOrder brief Class destructor of tableDialog object This function destroys an instance of tableDialog class tableDialog tableDialog delete model delete ui brief Clear sales This slot makes the tableDialog execution exits with value true and closes the dialog Another module must then process the return value void tableDialog on_clearButton_clicked i this gt accept this gt close F brief Cancel This slot makes the tableDialog execution exits with value false and closes the dialog Another module must then process the return value void tableDialog on_closeButton_clicked 83 this gt reject this gt close end of file ARA AA KR RR RRR RO OR RR OR OR ROR RR OR OR ORR ROR OR OR IO 84 31 tabledialog h file tabledi
122. copy Propagation includes copying distribution with or without modification making available to the public and in some countries other activities as well To convey a work means any kind of propagation that enables other parties to make or receive copies Mere interaction with a user through a computer network with no transfer of a copy is not conveying An interactive user interface displays Appropriate Legal Notices to the extent that it includes a convenient and prominently visible feature that 1 displays an appropriate copyright notice and 2 tells the user that there is no warranty for the work except to the extent that warranties are provided that licensees may convey the work under this License and how to view a copy of this License If the interface presents a list of user commands or options such as a menu a prominent item in the list meets this criterion 1 Source Code The source code for a work means the preferred form of the work for making modifications to it Object code means any non source form of a work A Standard Interface means an interface that either is an official standard defined by a recognized standards body or in the case of interfaces specified for a particular programming language one that is widely used among developers working in that language The System Libraries of an executable work include anything other than the work as a whole that a is included in the normal form of pac
123. cpp Class implementation of aboutDialog E home pablo Developing Qt QtScale src aboutdialog h Class definition of aboutDialog E home pablo Developing Qt OtScale src commandline cpp Class implementation of Command 28 home pablo Developing Qt QtScale src commandline h Class definition of Command 28 home pablo Developing Qt QtScale src database cpp Class implementation of Database 29 home pablo Developing Qt OtScale src database h Class definition of Database 29 home pablo Developing Qt QtScale src errorcode h Definition of errorCode datatype 30 home pablo Developing Qt QtScale src licensedialog cpp Class implementation of licenseDialog 31 home pablo Developing Qt QtScale src licensedialog h Class definition of licenseDialog 31 home pablo Developing Qt QtScale src main cpp Start QtScaleapplication 32 home pablo Developing Qt QtScale src mainwindow cpp Class implementation of MainWindow 33 home pablo Developing Qt OtScale src mainwindow h Class definition of MainWindow 0 33 home pablo Developing Qt QtScale src messagedialog cpp Class
124. d under the GNU General Public License Version 3 The terms and conditions for use reproduction and distribution of software subject to this license are the following PREAMBLE The GNU General Public License is a free copyleft license for software and other kinds of works The licenses for most software and other practical works are designed to take away your freedom to share and change the works By contrast the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program to make sure it remains free software for all its users We the Free Software Foundation use the GNU General Public License for most of our software it applies also to any other work released this way by its authors You can apply it to your programs too When we speak of free software we are referring to freedom not price Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software and charge for them if you wish that you receive source code or can get it if you want it that you can change the software or use pieces of it in new free programs and that you know you can do these things To protect your rights we need to prevent others from denying you these rights or asking you to surrender the rights Therefore you have certain responsibilities if you distribute copies of the software or if you modify it responsibilities to respect the freedom of others
125. ded that the changes do not impair the performance of the application In any case the rates to be applied for of amendments in the project shall be the same as the rest of the project following the standards published in the Spanish Official Bulletin of the State B O E In the unlikely event that the detected anomalies are due to faulty programming the developer agrees to make all changes it deemed appropriate to remedy the issue without this originating any cost to the client The client may also choose to have a third party modify the software package This is permitted as long as the modifications are done in accordance with the software license GNU GPL V3 1 3 Final Delivery of the Project The developer shall complete test and deliver the project by the date previously negotiated with the client 2 Specifications 3 PABLO CHOLBI ALENDA SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o 2 Economical Conditions 2 1 Pricing Structure The prices charged for the project are in line with the general provisions agreed with respect the economic activity under focus Thus the rates used for labour force correspond to an Industrial Engineer performing programming tasks 2 2 Improvements Extensions or improvements that the customer wishes to make to the program will suppose an increase in the total cost of the project in accordance with the amount of time needed and the r
126. del Dise o 56 1 Report UNIVERSITAT POLIT CNICA EBENEN DE VALENCIA Escuela T cnica Superior de Ingenieria del Dise o Universitat Polit cnica de Val ncia Escuela T cnica Superior de Ingenier a del Dise o Bachelor s Degree in Industrial Electronics and Automation Engineering Final Year Engineering Project QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX APPLICATION FOR AN INDUSTRIAL SCALE 2 Specifications Author Pablo Cholbi Alenda Supervisor Dr Angel Perles Ivars May 2014 UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE Table of Contents T 8 potty rea au coats vas eb Seas ey Erit eiiis teas ove 3 11 PROP WOES 2 ou dde 3 1 2 Poor Performance and Modifications essere entente 3 1 3 Final Delivery of the Pro tai td 3 2 Economical e a 4 Pricing StPUCEUTe sed oorr di desu adeo re yes NESSE 4 2 25 IMPONE Me pU Sesto ii ita 4 2 3 Price 4 o Bunctonal C ONIS 5 3 1 Initial Functional SDectfIcatlOTis shoot oet v tati obi itae Dent Dub oc 5 3 2 Software Limitatlobs sue ee toe 5 33 Hardware Limitations ed Io roccia ibit o eU oig Os 5 4 Software Package Conditions o caeco E OR
127. designed or sold for incorporation into a dwelling In determining whether a product is a consumer product doubtful cases shall be resolved in favor of coverage For a particular product received by a particular user normally used refers to a typical or common use of that class of product regardless of the status of the particular user or of the way in which the particular user actually uses or expects or is expected to use the product A product is a consumer product regardless of whether the product has substantial commercial industrial or non consumer uses unless such uses represent the only significant mode of use of the product Installation Information for a User Product means any methods procedures authorization keys or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made If you convey an object code work under this section in or with or specifically for use in a User Product and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term regardless of how the transaction is characterized the Corresponding Source conveyed under this
128. ductDialog object bool setup productStruct xitem Product dialog 4 8 1 Detailed Description this class encapsulates the methods and variables necessary to display product weight and information Definition at line 45 of file productdialog h 4 8 2 Constructor Destructor Documentation 4 8 2 1 productDialog productDialog QWidget parent 0 explicit Class constructor of productDialog object This function creates an instance of productDialog class and initializes the widget Definition at line 50 of file productdialog cpp 4 8 2 2 productDialog productDialog Class destructor of productDialog object This function destroys an instance of productDialog class Definition at line 72 of file productdialog cpp 4 8 3 Member Function Documentation 4 8 3 1 bool productDialog setup productStruct item Product dialog This function initializes the widget elements according to the productStruct and prepares the serial connections to weigh the product This function must be called after the class object has been created and the dialog should only be executed if the setup exits successfully Parameters Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 4 9 productStruct Struct Reference 19 Pointer to productStruct object Returns TRUE is setup exited successfully or FALSE otherwise Definition at line 90 of file productdialog cpp The documentation for this clas
129. e 22 loopbackTest 22 openConnection 22 process 23 receiveData 23 sendData 23 serialScale 21 serialScale 21 update 24 setDatabase Database 12 setup MainWindow 15 productDialog 18 tableDialog 24 tableDialog 25 tableDialog 25 tableDialog 25 update serialScale 24 updateAccum Database 12 Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen UNIVERSITAT POLIT CNICA EBENEN DE VALENCIA Escuela T cnica Superior de Ingenieria del Dise o Universitat Polit cnica de Val ncia Escuela T cnica Superior de Ingenier a del Dise o Bachelor s Degree in Industrial Electronics and Automation Engineering Final Year Engineering Project QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX APPLICATION FOR AN INDUSTRIAL SCALE Appendix 2 Source Code Author Pablo Cholbi Alenda Supervisor Dr Angel Perles Ivars May 2014 Contents 1 aboutdialog cpp 2 aboutdialog h 3 aboutdialog ui 4 commandline cpp 5 commandline h 6 database cpp database h 8 errorcode h 9 licensedialog cpp 10 licensedialog h 11 licensedialog ui 12 main cpp 13 mainwindow cpp 14 mainwindow h 15 mainwindow ui 16 messagedialog cpp 17 messagedialog h 18 messagedialog ui 19 optionsdialog cpp 20 optionsdialog h 21 optionsdialog ui 22 productdialog cpp 23 productdialog h 24 productdialog ui 11 12 17 19 20 22 24 26 28 37 39 42 45 AT 49 52
130. e PNG blob 0 70 0 0 15 Lemon PNG blob 1 75 0 0 48 1 Report Em UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX POLIT CNICA DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE 22 Grape PNG blob 3 90 0 0 23 Cherry PNG blob 3 70 0 0 25 Banana PNG blob 1 40 0 0 37 Apple PNG blob 1 60 0 0 The first step is to create the database file with the Product table that has been previously designed The database shall be named QtScale sqlite real user debian sqlite3 QtScale sqlite CREATE TABLE Products ID integer primary key Name text Icon blob Price real Accumulated Now it is possible to insert the data One command is required for every product record therefore 9 commands must be executed The images are inserted as a blob by doing a hexadecimal dump This method has been proven to work with the Qt SQL module as images can be retrieved correctly user debian echo INSERT INTO Products ID Name Icon Price Accumulated values 5 Strawberry X hexdump ve 1 1 2x Icons Strawberry png 2 50 0 0 sqlite3 OtScale sqlite user debian echo INSERT INTO Products 1ID Name Icon Price Accumulated values 10 Pear X hexdump ve 1 1 2x Icons Pear png 1 30 0 0 sqlite3 QtScale sqlite user debian echo INSERT INTO Products ID Name Icon Price Accumulated values 12 Peach X hexdump
131. e 75 75 ui gt toolButton_3 gt setToolButtonStyle Qt ToolButtonTextUnderIcon ui gt toolButton_3 gt setText QString number ID u u db name ID else ui gt toolButton_3 gt setVisible false set up toolButtons 4 if page 6 3 lt vector size ui gt toolButton_4 gt setVisible true int ID vector at page 6 3 ui gt toolButton_4 gt setIcon db icon ID ui gt toolButton_4 gt setIconSize QSize 75 75 ui gt toolButton_4 gt setToolButtonStyle Qt ToolButtonTextUnderIcon ui gt toolButton_4 gt setText QString number ID g u db name ID else ui gt toolButton_4 gt setVisible false set up toolButtons 5 if page 6 4 lt vector size ui gt toolButton_5 gt setVisible true int ID vector at page 6 4 ui gt toolButton_5 gt setIcon db icon ID ui gt toolButton_5 gt setIconSize QSize 75 75 ui gt toolButton_5 gt setToolButtonStyle Qt ToolButtonTextUnderIcon ui gt toolButton_5 gt setText QString number ID u u db name ID else ui gt toolButton_5 gt setVisible false set up toolButtons 6 32 if page 6 5 lt vector size 1 ui gt toolButton_6 gt setVisible true int ID vector at page 6 5 ui gt toolButton_6 gt setIcon db icon ID ui gt toolButton_6 gt setIconSize QSize 75 75 ui gt toolButton_6 gt setToolButtonStyle Qt ToolButtonTextUnderIcon ui gt toolButton
132. e SQLite databases come in the form of a Firefox add on with very similar functionality and UI as the aforementioned application The add on can be obtained from lt https addons mozilla org en US firefox addon sqlite manager gt 50 1 Report f UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE E SQLite Database Browser home pablo Dropbox Pablo Gholbi_ Edit View Help Doo eae ee lx Database Structure Browse Data Execute SQL Table Products a New Record Delete Record ID Name Icon Price Accumulated 1 5 Strawberry E eNG f rne 1 9of9 Goto 0 Figure 5 2 2 SQLite Database Browser 5 3 QtSerialPort QtSerialPort was introduced as an internal module in Qt 5 as the substitute of QextSerialPort QtSerialPort is now the default module in Qt to handle serial connections and it is being developed by the same team that worked on QextSerialPort The QextSerialPort project has been abandoned In this project Qt 4 8 libraries are being used as this is what is supplied in the Texas instruments SDK but it is worth noting that the QtSerialPort source code supports Qt 4 which means that the module can be configured compiled and used in Qt 4 QtSerialPort shall be used in this project as it is officially supported by Qt no external third party libr
133. e application shall have a native appearance on all the platforms it is executed Finally for the development of the application the use of open source tools libraries and compilers shall be favoured over closed source alternatives as they amongst other advantages improves the maintainability of the software and it grants independence from the supplier It is worth noting that the use of open source tools in the development and documentation of the project are also favoured because of the client s and the author s philosophy 8 1 Report UNIVERSITAT POLIT CNICA DE VALENCIA QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX APPLICATION FOR AN INDUSTRIAL SCALE 3 Alternative Solutions 3 1 Alternatives for the Hardware In this section some of the most popular single board ARM computers that are Linux capable shall be compared Raspberry Pi B A10 OLinuXino BeagleBone Black ODROID U3 Cubieboard 2 Processor ARM11700MHz Cortex A8 1GHz Cortex A8 1GHz Cortex A9 Quad 1 7GHz 7 Dual 1GHz GPU Video Core IV Mali 400 SGX530 Mali 400 Mali 400 RAM 512MB 512MB 512MB 2GB 1GB Flash OMB OMB 2GB OMB 4GB USB 2 2 host 1 OTG 1 host 1 3 host 1 OTG 2 host 1 OTG Ethernet 1x10 100M 1x10 100M 1x10 100M 1x10 100M 1x10 100M WiFi x x x x x Bluetooth x X x x x SATA x x x 17 160 65 96 SPI v v Expansion v IC
134. e doing serial gt loopbackTest Obrief Complete sale This slot makes the productDialog execution exits with value true and closes the dialog Another module must then process the return value void productDialog on buyButton clicked 1 if weight is stable update weight and close if serial gt isStable 1 product gt weight serial gt getWeight delete timer this gt accept this gt close h Obrief Cancel 60 This slot makes the productDialog execution exits with value false and closes the dialog Another module must then process the return value void productDialog on cancelButton clicked delete timer this gt reject this gt close end of file AAA AAA AAA HA AAA KA AAA AA AAA ARA AAA AAA ARA RARA AAA RARA AAA AA RARA 61 23 productdialog h file productdialog h brief Class definition of productDialog date March 2014 author Pablo Cholbi This file is part of QtScale QtScale is free software you can redistribute it and or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 3 QtScale 15 distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details Copyright C 2014 Pablo Chol
135. ed before this function is executed argumentList Argument vector returns Error code being SUCCESS if all arguments were parsed correctly or argumentError otherwise errorCode Command parseArguments QStringList argumentList i arguments for this app QRegExp rxArgHelp help QRegExp rxArgVersion version QRegExp rxArgPath path QRegExp rxArgQWS qws for int i 1 i lt argumentList size i 1 help requested if rxArgHelp exactMatch argumentList at i 1 fprintf stdout Syntax 4 s help version path lt dir gt qws Tin argumentList at 0 toUtf8 data 0 fprintf stdout Helpuuuunuuuu uShow this messageNn fprintf stdout versionyyyuu uPrintyversion informationyjandjexit n fprintf stdout path lt dir gt jPath to database defaulty QtScale n fprintf stdout Qu gu uuuuuuUuUUUUUUDatabase must jnamed s n database toUtf8 data fprintf stdout Q qwsyuyuuuuuuuu uStartyapplication with Qt Windowing uServer n n exit EXIT_SUCCESS record version else if rxArgVersion exactMatch argumentList at i 1 fprintf stdout 2f n appVersion format and print version exit EXIT SUCCESS path else if rxArgPath exactMatch argumentList at i 1 change database path from default 10 basePath rxArgPath cap 1 Y Qt Windowing Server else if rxArgQWS exactMatch argume
136. ed for quick testing and debugging verbatim RX lt gt TX Vendverbatim This function is intended to work with the Microgram ie21 industrial scale from Microgram Instruments Espa ola S A For more information on the ie21 data stream coding please consult the serialScale class documentation and the annex which includes the manufacturers datasheet void serialScale loopbackTest 1 char dummy 20 000000 50 kgu 0 5 kg stable char dummy 20 SD 000001 23 kg 1 23 kg unstable char dummy 20 S 000000 10 kg 0 1 kg stable dummy 17 x0D dummy 18 x0A sendData dummy sizeof dummy end of file 79 file brief date author This 29 serialscale h serialscale h Class definition of serialScale March 2014 Pablo Cholbi file is part of QtScale QtScale is free software you can redistribute it and or modify 4 under the terms of the GNU General Public License as published by the Free Software Foundation version 3 QtScale 15 distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details Copyright C 2014 Pablo Cholbi Alenda You shou
137. ed in the project shall be calculated In the elaboration of this section the following assumptions were made The end user has a host computer Windows Mac OS X or Linux with which to administrate the target system and the database The end user has a Microgram IE21 industrial scale from Microgram Instruments Espafiola S A The end user has an Ethernet network with or without Internet access As stated in the report when studying the alternative hardware solutions the BeagleBone Black was found to be the best option for this project However this project has been developed on a TI AM335x Starter Kit because it was available and it has the same processor The TI AM335x Starter Kit is more feature rich than the BeagleBone Black but it also more expensive This project does not utilize any of these additional features and it is perfectly implementable on the BeagleBone Black Therefore for the calculation of the final cost of the project shall take into account the cost of developing the project with a BeagleBone Black However the cost of the TI AM335x Starter Kit is also provided below as additional information or as an optional upgrade for future expansion Concept Units Cost Quantity Total BeagleBoard BeagleBone Black ea 35 1 35 Beaglebone Black LCD Cape 4 3 ea 45 1 45 80 00 Concept Units Cost Quantity AM335x Starter Kit ea 150 1 150 150 00 T
138. ed to the project file to Specify that the binaries should be copied over to the directory usr local bin on the target target path usr local bin INSTALLS target The template is now ready to be build deployed and debugged 1 Report 27 PABLO CHOLBI ALENDA E EEEE SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o MainWindow Figure 4 3 2 Test Application 28 1 Report QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX APPLICATION FOR AN INDUSTRIAL SCALE 5 Detailed Description of the Adopted Solution 5 1 Application In this section a detailed description of the adopted solution for the application to be developed shall be exposed 5 1 1 External Relations Following is a schematic diagram representing the input and output of data between the application and the different hardware files and interfaces with which it must interact RS 232 Serial Scale Weight Data Stream Graphics Pointer Arguments Application Read Data Write Data SQLite Database Figure 5 1 1 Application Interface From the diagram above and with and general idea of how the application must interact with the different devices files and interfaces it is possible to determine that the following errors might be encountered during execution time Argument error failed to parse command line argument An invalid command
139. eloped with this database system which makes it relatively easy to set up and borrow code from these applications to reduce development time On the other hand set up more complex than other database system and there are limitation when using it in large systems or when data accuracy is extremely important It is intended for systems larger than the application to be developed Because of the aforementioned reasons MySQL is not considered and appropriate solution for this project It is worth noting that MySQL and MariaDB are not the same database engine but they are closely related as they both have the same initial author MariaDB is as a community developed fork of MySQL The goal for Maria DB is to be a drop in replacement for MySQL with more features and better performance MariaDB is based on the corresponding version of MySQL if one exists For example MariaDB 5 1 53 is based on MySQL 5 1 53 with some added bug fixes additional storage engines new features and performance improvements Bartholomew 2013 3 3 2 PostgreSQL Pros Cons Scalable Complex set up Many performance features Requires server Supports user permissions Smaller community Conforms with SQL standard Conforms with ACID standard Easily portable to Oracle SQL 12 1 Report UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX O CNICA DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE PostgreSQL is
140. elp N Database Structure Browse Data Execute SQL Table Products 2 9 New Record Delete Record ID Name Icon Price Accumulated 1 5 Strawberry PNG 2 5 0 0 4 13 5 15 temon 6 175 6 22 _ 0 z Benans ___ 040 1 9of9 Goto Figure 2 2 1 SQLite Database Browser 6 4 User Manual UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX POLIT CNICA DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE 3 Application Interface 3 1 Command Line Interface When starting the application QtScale accepts some command line arguments to define the execution of the application A list and a short description of the supported arguments is provided bellow help This arguments writes to STDOUT a help message similar to this table and exits successfully version This argument writes to STDOUT the version number of the QtScale application and exits successfully path lt path gt This command sets the path to the database file to path The default is path is QtScale The application supports the use of qws This argument start the Qt Windowing Server This makes the application run with its own windowing server This argument is important in embedded Linux systems as the application will not start if this argument is not passed to the application This is an internal Qt argument a
141. em 2013 E Blem J Menon and K Sankaralingam Detailed Analysis of Contemporary ARM and x86 Architectures University of Wisconsin 2013 Debian Wiki Debian Wiki LSBInitScripts Retrieved from https wiki debian org LSBInitScripts Last edit 2014 02 07 as of 2014 04 11 17 41 GMT Ou 2012 Z Ou B Pang Y Deng J Nurminen A Yl j ski Energy and Cost Efficiency Analysis of ARM Based Clusters IEEE Computer Society 2012 Qt Wiki Qt Project Wiki QtSerialPort Retrieved from http qt project org wiki QtSerialPort Last edit 2014 01 17 as of 2014 04 11 12 09 GMT Roberts Hoffman 2009 Roberts Hoffman and P Hegde ARM Cortex A8 vs Intel Atom Architectural and Benchmark Comparisons University of Texas at Dallas 2009 TI Wiki 1 Texas Instruments Wiki Sitara Linux Training Hands on with QT Retrieved from http processors wiki ti com index php Sitara Linux Training Hands on with QT as of 2014 03 10 10 21 GMT TI Wiki 2 Texas Instruments Wiki AMSDK Linux User s Guide Retrieved from http processors wiki ti com index php AMSDK Linux Users Guide as of 2014 03 10 14 50 GMT Vidal 2012 Vidal Aroca and L Garcia Goncalves Towards Green Data Centers Comparison of x86 and ARM Architectures Power Efficiency Academic Press 2012 1 Report 55 PABLO CHOLBI ALENDA E EEEE SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a
142. eme xus ALLE RR 43 2 2 0458 luco omes PEPE ES OY 45 90 Ghd ae heed bb PRA ES Dee heb bei held Lat oo bud eS BNR AON AB MAME 2 2 25 ded e us o N NN CONTENTS 43 3 5 2 2 9 E no 462 12 o pca dh ile AR m C QE Ke DR ecd 12 42 29 FUROR OX Ee Rex ncm one Pew y OS 12 Lido oc luz no koe Rom dh RR ee s 12 44 licenseDialog Class Reference 13 441 Detailed Description 13 4 4 2 Constructor amp Destructor Documentation 13 44 21 UCSI 25 uo m 13 4482 2 susc sy kn ARO OR e 13 45 MainWindow Class Reference 13 451 s n ko Room m kk Rom om em 7 447424 Am 14 4 5 2 Constructor amp Destructor Documentation 14 4581 uoce e RB A Em cR Re ERR IER 14 45 22 eMainWindoW 4 14 4 5 3 Member Function Documentation 15 o 0 2 2 C
143. ementation of aboutDialog This class displays information about the application March 2014 Author Pablo Cholbi Definition in file aboutdialog cpp 5 2 home pablo Developing Qt QtScale src aboutdialog h File Reference Class definition of aboutDialog incl incl lude lt QDialog gt ude licensedialog h Classes class aboutDialog this class displays about information of the application The information is static and defined in the UI file 28 File Documentation 5 2 1 Detailed Description Class definition of aboutDialog Date March 2014 Author Pablo Cholbi Definition in file aboutdialog h 5 3 home pablo Developing Qt QtScale src commandline cpp File Reference Class implementation of Command include lt stdio h gt include lt cstdlib gt include lt QDir gt include lt QString gt include lt QStringList gt include commandline h include errorcode h 5 3 1 Detailed Description Class implementation of Command This class contains the methods and members to be able to evaluate the supported command line arguments The argument list is easily expandable Date March 2014 Author Pablo Cholbi Definition in file commandline cpp 5 4 home pablo Developing Qt QtScale src commandline h File Reference Class definition of Command include lt QString gt include lt QStringList gt include errorcode h Classes class Command this c
144. ense as published by the Free Software Foundation version 3 QtScale is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details Copyright C 2014 Pablo Cholbi Alenda You should have received a copy of the GNU General Public License along with QtScale If not see lt http www gnu org licenses gt include lt QtSerialPort QSerialPort gt include lt QtSerialPort QSerialPortInfo gt include lt string h gt include lt stdio h gt include serialscale h include errorcode h Obrief Class constructor of serialScale object This function creates an instance of serialScale class and initializes the class variables serialScale serialScale 1 totalData 0 port false connection false stable false signal true Obrief Class destructor of serialScale object This function destroys an instance of serialScale class 72 serialScale serialScale 1 closeConnection delete serial F brief Establish serial connection with the industrial scale This function creates configures and opens a QSerialPort connection to communicate with the industrial scale and receive information on the weight of the products Connection parameters configured to work with the Microgram ie21 industrial scale from Mic
145. ent page being displayed Database db Product database file QList int gt vector ID numbers of the products productStruct item Structure with product information 4 5 1 Detailed Description this class encapsulates the methods and variables necesary to display the main product selection window Definition at line 49 of file mainwindow h 4 5 2 Constructor Destructor Documentation 4 5 2 1 MainWindow MainWindow QWidget parent 0 explicit Class constructor of MainWindow object This function creates an instance of MainWindow class initializes the class variables and the widget Definition at line 51 of file mainwindow cpp 4 5 2 2 MainWindow MainWindow Class destructor of MainWindow object This function destroys an instance of MainWindow class Definition at line 79 of file mainwindow cpp Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 4 6 messageDialog Class Reference 15 4 5 3 Member Function Documentation 4 5 3 1 void MainWindow redraw Redraw main window This function updates the main window interface according to the information recorded on the database and the current page that is being viewed Up to 6 products can be viewed at a time Definition at line 123 of file mainwindow cpp 4 5 3 2 void MainWindow setup QApplication a Setup main window This function attempts to parse incoming command line arguments and open the database specified by the
146. ers of the staff at the ETSID UPV who helped me in many ways and made my educational journey at UPV unforgettable These four years have not only provided my with an excellent education but also a broader and inter disciplinary view on science engineering and the world I will remember fondly this period as I face this new chapter in life as an engineer Lastly I would like to thank any person who contributed to my final year project directly or indirectly I would like to acknowledge that all comments and suggestions were crucial for the successful completion of this project Abstract In recent years there has been a large increase of ARM based consumer products This surge has been motivated by the efficiency and low cost of these processors which make them appropriate for low power devices and applications that are not CPU intensive This work examines the viability of implementing a graphical touchscreen application for an industrial scale on a Texas Instruments AM335x ARM Cortex A development board as opposed to x86 based systems This work also intends to serve as a general reference for implementing cross platform applications with the Qt framework targeted to an embedded Linux system running on an AM335x based hardware Specifically the application to be developed is an intuitive graphical touchscreen application that interacts with a Microgram IE21 industrial scale from Microgram Instruments Espafiola S A over RS 232 and a SQLite
147. estartButton gt setIcon QIcon Buttons Buttons executable png ui gt restartButton gt setIconSize QSize 24 24 ui gt rebootButton gt setIcon QIcon Buttons Buttons refresh png ui gt rebootButton gt setIconSize QSize 24 24 50 ui gt shutdownButton gt setIcon QIcon Buttons Buttons shutdown png ui gt shutdownButton gt setIconSize QSize 24 24 ui gt exitButton gt setIcon QIcon Buttons Buttons exit png ui gt exitButton gt setIconSize QSize 24 24 ui gt aboutButton gt setIcon QIcon Buttons Buttons about png ui gt aboutButton gt setIconSize QSize 24 24 ui gt closeButton gt setIcon QIcon Buttons Buttons cancel png ui gt closeButton gt setIconSize QSize 24 24 brief Class destructor of optionsDialog object This function destroys an instance of optionsDialog class optionsDialog optionsDialog 1 delete ui F brief Restart application This slot makes QApplication exit with restart code such that the main function can handle it void optionsDialog on restartButton clicked qApp gt exit RESTART Obrief Exit application This slot makes QApplication exit with with exit code 0 or successful termination void optionsDialog on_exitButton_clicked 1 qApp gt quit B brief Reboot system This slot makes starts an external process to reboot the system uverbatim shutdown r now
148. f the GNU General Public License as published by the Free Software Foundation version 3 This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details http www gnu org licenses Figure 5 1 17 licenseDialog UI 42 1 Report EP UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX F CNICA DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE 5 1 4 Text Fonts for Internationalization Taking into account the current level of globalization which is expected to increase even more in the coming years the application being developed should have internationalization support As one of the goals of this project is to create a portable multi platform OS and architecture application internationalization can be seen as an extension of portability it will give the application to be executed not only across a variety of operations systems and architectures but also in a variety of languages and locales Qt has good support for application internationalization built in but in order to represent non ASCII characters on screen the appropriate fonts must be present on the target system The target system by default only comes with fonts for the English language This section details the process of adding fonts for the correct representation of alph
149. fic The Qt form mainwindow ui provides the GUI for this module a screenshot of which is provided 5 5 Strawberry 10 Pear 12 Peach o ES 13 Orange 15 Lemon 22 Grape P Figure 5 1 5 MainWindow UI 34 1 Report UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX POLIT CNICA DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE 5 1 3 3 Product Dialog The productDialog module is composed of the source code file productdialog cpp the C header file productdialog h and the Qt form productdialog ui The flow diagram for this module is as follows productD ialog Initialize variables Initialize UI Open serial connection eoe Start Execute timer messageD ialog Yes al serial Measure stable Update Yes ut Return Return accept reject Figure 5 1 6 productDialog Flowchart 1 Report 35 PABLO CHOLBI ALENDA We SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o The Qt form productdialog ui provides the GUI for this module a screenshot of which is provided below Product ID 5 Strawberry 2 50 kg 0 000 kg 0 00 Cancel Figure 5 1 7 productDialog UI 36 1 Report UNIVERSITAT POLIT CNICA DE VALENCIA 5 1 3 4 Message Dialog QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX APPLICATION FOR AN INDUSTRIAL SCALE The messageDialog module is composed
150. following command shall be executed user debian opt 0t 5 2 0 launch sitara sh 16 1 Report QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX APPLICATION FOR AN INDUSTRIAL SCALE UNIVERSITAT POLIT CNICA DE VALENCIA 4 1 3 Configuring Qt kit for AM335x The following section is a commented extract with slight modifications of part of the Texas Instruments Document AMSDK Linux User s Guide TI Wiki 1 4 1 3 1 Configuring qmake Click on the Tools gt Options from the top menubar the left side vertical menubar click Build Run Click the Qt Versions tab under Build amp Run e Click Add on the right Navigate to opt ti sdk am335x evm 06 00 00 00 linux devkit sysroots i686 arago linux usr bin e Select then click on Open Double click on Version Name and give the Qt Version a descriptive name such as Qt 4 8 3 Sitara e Click Apply to save your changes xj Options Filter Build amp Run Environment General Kits QtVersions Compilers Debuggers CMake Text Editor Name qmake Location Add Auto detected 1 Qt 5 2 0 GCC 64bit opt Qt 5 2 0 5 2 0 gcc 64 bin qmake Remove FakeVim Manual Qt 4 8 3 Sitara opt ti sdk am335x evm 06 00 00 00 linux devkit sysroots i686 arago linux usr bin qmake Help O c 221 Qt Quick Q Debugger gt Designer Analyzer IY Version Control Version name Qt 4 8 3 Sitar
151. forwardButton clicked 1 redraw Obrief Go to options dialog update update This slot closes the database and creates an option dialog lt br gt If the user exits from the options dialog the database is attempted to be reopened void MainWindow on_optionsButton_clicked 1 db closeDatabase options new optionsDialog options gt exec if db openDatabase SUCCESS exit EXIT_FAILURE 36 delete options Obrief Go to table dialog This slot creates a tableDialog and displays the accumulated sales of all products in the database Depending on the return value of the dialog the accumulates sales of all products in the database are cleared void MainWindow on tableButton clicked 1 table new tableDialog show dialog and clear accumulated sales if requested if table gt exec 1 db clearAccum delete table end of file ARA AA AAA AAA AA AA HAHAHA AAA KA RARA oe OR OR ROR eoe eee OR IR 37 14 mainwindow h file mainwindow h 0brief Class definition of MainWindow date March 2014 author Pablo Cholbi This file 13 part of QtScale QtScale is free software you can redistribute it and or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 3 QtScale 15 distributed in the hope that it will be usefu
152. forwardButton clicked void on_optionsButton_clicked void on tableButton clicked private Ui MainWindow ui optionsDialog options productDialog product tableDialog table endif MAINWINDOW end of file 39 15 mainwindow ui lt xml version 1 0 encoding UTF 8 7 5 lt ui version 4 0 gt lt class gt MainWindow lt class gt widget class QMainWindow name MainWindow gt lt property name geometry gt lt rect gt lt x gt 0 lt x gt lt y gt 0 lt y gt lt width gt 480 lt width gt lt height gt 272 lt height gt lt rect gt lt property gt lt property name windowTitle gt lt string gt MainWindow lt string gt lt property gt lt widget class QWidget name centralWidget gt lt widget class QPushButton name optionsButton gt lt property name geometry gt lt rect gt lt x gt 430 lt x gt lt y gt 222 lt y gt lt width gt 40 lt width gt height gt 40 lt height gt lt rect gt lt property gt lt property name text gt lt string gt lt property gt lt widget gt lt widget class QPushButton name backButton gt lt property name geometry gt lt rect gt lt x gt 10 lt x gt lt y gt 116 lt y gt lt width gt 40 lt width gt height gt 40 lt height gt lt rect gt lt property gt lt property name text gt lt string gt lt property gt lt widget gt lt widget class QPushButton name fo
153. g This class displays error and information messages date March 2014 author Pablo Cholbi This file is part of QtScale QtScale is free software you can redistribute it and or modify 4 under the terms of the GNU General Public License as published by the Free Software Foundation version 3 QtScale 15 distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details Copyright C 2014 Pablo Cholbi Alenda You should have received a copy of the GNU General Public License along with QtScale If not see lt http www gnu org licenses gt include lt stdio h gt include lt QString gt include messagedialog h include ui_messagedialog h include errorcode h Obrief Class constructor messageDialog object This function creates an instance of messageDialog class and initializes the widget messageDialog messageDialog QWidget parent QDialog parent ui new Ui messageDialog 1 ui gt setupUi this set to fullscreen and cursor less this gt setWindowFlags Qt FramelessWindowHint this gt setFixedHeight 272 this gt setFixedWidth 480 y Obrief Class destructor messageDialog object 43 This function destroys an instance of messageDialog class messageDialog messageDialog
154. g Japanese Database 5 1 5 Application Start on Boot Escuela T cnica Superior de Ingenieria del Dise o One of the requirements is that the application must start on system boot or restart by default The starting and stopping of programs and services on Unix and Unix like systems is handled by the Init Scripts Debian wiki is taken as reference to create a Linux Standard Base LSB Init script to start the application being developed on all runlevels except shutdown reboot and single user mode By making the script LSB compliant it makes it portable across many Unix and Unix like distributions First it is necessary to create the script on the target system root am335x evm vi etc init d QtSerial init sh The content of the script being 44 bin sh etc init d QtScale init sh BEGIN INIT INFO Provides QtScale Required Start 1ocal fs syslog Required Stop 10cal fs syslog Default Start 2345 Default Stop 916 Short Description Start QtScale at boot time Description Start QtScale with qws option END INIT INFO case 1 in start echo Starting QtScale usr local bin QtScale qws path home root QtScale stop 1 Report Ra UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX POLIT CNICA lt DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE echo Stopping QtScale killall QtScale echo Usage etc init d QtS
155. g ep e esed ep un aqazed opeAesua zopeotput un LYOHUGOTT LSIVLIdSOH TI 20680 4 6ST TETIJSNPUI W S N 0NVdSW SLNSAQULSNI WVUOOWDINW 6 0 s 9399 p S c uo epeor de 7 6661 2 26617 7055 Nu ou oquerjueuorounj efesed ep so3ueunzjsur SOT sojoedsy 1 8 XNO IHOUNVH 80080 4 STA SOP 5160 oxeumu ep WYIDOJOIN NOQVOIGNI 07 0 56 OT WNN e oquoiojoN ered 02 56 vay ES 00 56 6 80080 Siq Ay jeuisnpug orooeutg euisnpuj p 1ueureuredeq ep 0c 9 Gn v XE durs s 512 L SLD
156. greement or commitment not to enforce a patent against the party If you convey a covered work knowingly relying on a patent license and the Corresponding Source of the work is not available for anyone to copy free of charge and under the terms of this License through a publicly available network server or other readily accessible means then you must either 1 cause the Corresponding Source to be so available or 2 arrange to deprive yourself of the benefit of the patent license for this particular work or 3 arrange in a manner consistent with the requirements of this License to extend the patent license to downstream recipients Knowingly relying means you have actual knowledge that but for the patent license your conveying the covered work in a country or your recipient s use of the covered work in a country would infringe one or more identifiable patents in that country that you have reason to believe are valid If pursuant to or in connection with a single transaction or arrangement you convey or propagate by procuring conveyance of a covered work and grant a patent license to some of the parties receiving the covered work authorizing them to use propagate modify or convey a specific copy of the covered work then the patent license you grant is automatically extended to all recipients of the covered work and works based on it A patent license is discriminatory if it does not include within the scope of its coverage pro
157. h Obrief Start application Oparam argc Argument count Oparam argu Argument vector This function starts the application creates the main window and handles the the restart of the application if requested by a child Oreturns Exit status of the application int 1 main int argc char argv QApplication Scale argc argv Scale setOverrideCursor Qt BlankCursor Hide cursor QCoreApplication setApplicationName QtScale QCoreApplication setApplicationVersion QString number appVersion f 2 MainWindow w w setup amp Scale w show int exitCode Scale exec 27 if exitCode RESTART 1 QString qApp gt arguments 0 QStringList arg qApp gt arguments remove program form argument list and add qus arg replace 0 qus start new instance and exit QProcess startDetached app arg return 0 Y return exitCode end of file ee ee AA AAA ARA ARA A A ARA AAA AO A ARA A AA A AA KA AAA AAA KA AA A K eee ee AS 28 13 mainwindow cpp file mainwindow cpp brief Class implementation of MainWindow This class displays the main product selection window date March 2014 author Pablo Cholbi This file 13 part of QtScale QtScale is free software you can redistribute it and or modify 4 under the terms of the GNU General Public License as published by the Free Software Foundation version
158. hat was used to develop and test the SDK but please note that this is a suggestion and it does not prevent the SDK from installing on other Linux distributions 4 1 1 Installing TI SDK First the latest SDK from TI must be downloaded At the time of writing the newest version was 6 00 00 00 user debian cd Downloads user debian Downloads wget downloads ti com sitara_linux esd AM335xSDK latest exports ti sdk am335x evm 06 00 00 00 Linux x86 Install bin Once the download is complete the binary must be made executable user debian Downloads chmod x ti sdk am335x evm 06 00 00 00 Linux x86 Install bin Now a directory owned by the current user shall be created for the installation of the SDK user debian Downloads sudo mkdir opt ti sdk am335x evm 06 00 00 00 user debian Downloads sudo chown S USER opt ti sdk am335x evm 06 00 00 00 Finally the installation process can be started user debian Downloads ti sdk am335x evm 06 00 00 00 Linux x86 Install bin Note that when the asked for the installation directory the previously created directory was selected 1 Report 15 PABLO CHOLBI ALENDA SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o 4 1 2 Installing Qt IDE First the latest Qt Installer must be downloaded At the time of writing the newest version was Qt 5 2 0 with Qt creator 3 0 0 user deb
159. hibits the exercise of or is conditioned on the non exercise of one or more of the rights that are specifically granted under this License You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software under which you make payment to the third party based on the extent of your activity of conveying the work and under which the third party grants to any of the parties who would receive the covered work from you a discriminatory patent license a in connection with copies of the covered work conveyed by you or copies made from those copies or b primarily for and in connection with specific products or compilations that contain the covered work unless you entered into that arrangement or that patent license was granted prior to 28 March 2007 Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law 12 No Surrender of Others Freedom If conditions are imposed on you whether by court order agreement or otherwise that contradict the conditions of this License they do not excuse you from the conditions of this License If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations then as a consequence you may not convey it at all For example if you agree
160. i der udi aea 15 TT SID Ote 15 4 1 2 Installing Qt IDE o eno AAA tate 16 4 1 3 Configuring iria 17 1 17 4 1 3 2 Configuring Meo e ONUS 18 4 1 3 3 Configuring DebHEPEE ese cei 19 A 1 3 4E Set p Laia 20 41 35 Kit Configuration eee aio 21 4 2 Targ t Syste TN 22 4 2 1 Creating SD Card 22 4 2 7 Initial Configu ratiQn uen react ente 22 NAE MM Nou Rev 22 4 2 2 2 Disabling the Default Matrix GUI 23 4 2 2 Static IPAddress O 23 4 2 2 A Directory for Binaries ione coy ee ee eet eee oss tede 24 4 2 2 5 USB to Serial Adapter Support 24 4 2 2 6 Touchscreen Calibration and Test eee eene eene 26 A S XpplicatioH Templates eti ie e eei pA M 26 Continued 1 Report 1 PABLO CHOLBI ALENDA SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Diseiic 5 Detailed Description of the Adopted Solution eese eene 29 5 1 ADUCE D 29 5 1 1 External Rela
161. ialog h Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 4 11 tableDialog Class Reference 25 4 11 2 Constructor amp Destructor Documentation 4 11 2 1 tableDialog tableDialog QWidget 0 explicit Class constructor of tabletDialog object This function creates an instance of productDialog class and initializes the widget The table displays the Id product name and accumulated sales for all products in the database This function must be called after the class object has been created and before the dialog is executed Definition at line 47 of file tabledialog cpp 4 11 2 2 tableDialog tableDialog Class destructor of tableDialog object This function destroys an instance of tableDialog class Definition at line 84 of file tabledialog cpp The documentation for this class was generated from the following files home pablo Developing Qt QtScale src tabledialog h home pablo Developing Qt QtScale src tabledialog cpp Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 26 Class Documentation Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen Chapter 5 File Documentation 5 1 Class i incl incl incl home pablo Developing Qt QtScale src aboutdialog cpp File Reference mplementation of aboutDialog ude aboutdialog h ude ui aboutdialog h ude licensedialog h 5 1 1 Class i Date Detailed Description mpl
162. ian cd Downloads user debian Downloads wget download qt project org official releases qt 5 2 5 2 0 qt linux opensource 5 2 0 x86 64 offline run Once the download is complete the binary must be made executable user debian Downloads chmod x qt linux opensource 5 2 0 x86 64 offline run Now a directory owned by the current user shall be created for the installation of the IDE user debian Downloads sudo mkdir opt Qt 5 2 0 user debian Downloads sudo chown SUSER opt Qt 5 2 0 Finally the installation process can be started user debian Downloads qt linux opensource 5 2 0 x86 64 offline run Note that when the asked for the installation directory the previously created directory was selected To be able to develop with the SDK there are shell variables that must be set TI provides an environment set up file to automate this task To ease this task further a start up script that sources the environment set up file before launching Qt creator can be used user debian nano opt Qt 5 2 0 launch sitara sh The content of the script being bin bash source opt ti sdk am335x evm 06 00 00 00 1inux devkit environment setup opt Qt 5 2 0 Tools QtCreator bin qtcreator exit 0 To make the script executable user debian chmod x opt Qt 5 2 0 1aunch sitara sh From now on when starting Qt creator to develop for an AM335x target the
163. icensed Material means the artistic or literary work database or other material to which the Licensor applied this Public License Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license Licensor means the individual s or entity ies granting rights under this Public License k Share means to provide material to the public by any means or process that requires permission under the Licensed Rights such as reproduction public display public performance distribution dissemination communication or importation and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them 1 Sui Generis Database Rights means rights other than copyright resulting from Directive 96 9 EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases as amended and or succeeded as well as other essentially equivalent rights anywhere in the world m You means the individual or entity exercising the Licensed Rights under this Public License Your has a corresponding meaning Section 2 Scope a License grant 1 6 Subject to the terms and conditions of this Public License the Licensor hereby grants You
164. ing Final Year Engineering Project QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX APPLICATION FOR AN INDUSTRIAL SCALE 1 Report Author Pablo Cholbi Alenda Supervisor Dr Angel Perles Ivars May 2014 fi UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM USING LINUX DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE Table of Contents To Bsckerpibid x15 ced testa eve o E Lc E lestis 5 2 Factors LOC ONS GOT obo RA 7 2 1 Initial a deals 7 2 Needs SEU o eter pr une cope dit ust iet cu UTER T Ug 8 Solutions d c aad oso 9 3 1 Alternatives for the Hardware netos etna 9 3 2 Alternatives for the Programming Language sees 10 10 PVCU b dp de dn 11 d 11 3 3 Alternatives for the SQL Based Database Engine esee 12 al MYSQL Aviat lal Bs re 12 943 2 POSTEOS Oi A Al A M o E deu n rud leva do 12 3 33 SQLite EE 13 4 Development Environment Set up scsscccsscsssrssssscssscesscsssssssscessccesscsessesscsssccesesaceseesacessesaes 15 4 2 Ost COMPU o ent err a sd vent
165. ing Database name int ID 1 QSqlQuery query SELECT FROM _ Products u WHERE ID QString number ID query next QString name query value 0 toString return name Obrief Get product price This function returns the Price of the specified product ID in the database Oparam ID Product index number ID field in database 15 Oreturns Price of specified product float Database price int ID i QSqlQuery query SELECT Price FROM Products WHERE ID QString number ID 2 query next float price query value 0 toFloat return price brief Get product price This function updates the accumulated sales in the product database record Oparam weight Sale to add to accumulated sales ID Product index number ID field in database void Database updateAccum float weight int ID 1 QSqlQuery query query exec SELECT Accumulated FROM Products WHERE ID QString number ID query next float accum query value 0 toFloat accum accum weight query exec UPDATE Products SET Accumulated QString number accum WHERE ID QString number ID query next brief Reset accumulated sales This function updates the accumulated sales of all products in the database and sets them to 0 This function does not take parameters as it relies on other Database class functions void Database clearAccum
166. ion messages If a benign error is encountered this dialog warns the user and asks for acknowledgement before continuing e serialScale This class encapsulates the methods and variables necessary to manage the communication with the industrial scale The serialScale class manages the serial communication between the industrial scale and the application Communication is carried put over RS 232 The string processing carried out in this class is intended to work with the Microgram ie21 from Microgram Instruments Espafiola S A String processing functions must be modified if other hardware is to be used e productStruct Product data structure This data structure encapsulated variables to be used in the productDialog class 1 Report 31 PABLO CHOLBI ALENDA SUPERVISOR DR ANGEL PERLES IVARS 5 1 3 Application Flowcharts Escuela T cnica Superior de Ingenieria del Dise o To better explain how the application functions a flowchart and a screenshot for each dialog and the Main function is described in this section It should be noted that not all the source code shall be reflected in this section as there are modules such as database module serial module or command module which provide important functions for the correct execution of the application but can not be described in terms of a flowchart by themselves There are also header files such as errorcode h and productstruct h whose only purpose is to provide the implementation of an e
167. ion s users beyond what the individual works permit Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate 6 Conveying Non Source Forms You may convey a covered work in object code form under the terms of sections 4 and 5 provided that you also convey the machine readable Corresponding Source under the terms of this License in one of these ways a Convey the object code in or embodied in a physical product including a physical distribution medium accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange b Convey the object code in or embodied in a physical product including a physical distribution medium accompanied by a written offer valid for at least three years and valid for as long as you offer spare parts or customer support for that product model to give anyone who possesses the object code either 1 a copy of the Corresponding Source for all the software in the product that is covered by this License on a durable physical medium customarily used for software interchange for a price no more than your reasonable cost of physically performing this conveying of source or 2 access to copy the Corresponding Source from a network server at no charge Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source This alternative is allowed only occ
168. ions b The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed Any arrangements understandings or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License Section 8 Interpretation b C d For the avoidance of doubt this Public License does not and shall not be interpreted to reduce limit restrict or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License To the extent possible if any provision of this Public License is deemed unenforceable it shall be automatically reformed to the minimum extent necessary to make it enforceable If the provision cannot be reformed it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor Nothing in this Public License constitutes or may be interpreted as a limitation upon or waiver of any privileges and immunities that apply to the Licensor or You including from the legal processes of any jurisdiction or authority Annex 2 Software License Author Free Software Foundation The software developed in this project is license
169. it alleging that any patent claim is infringed by making using selling offering for sale or importing the Program or any portion of it 11 Patents A contributor is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based The work thus licensed is called the contributor s contributor version A contributors essential patent claims are all patent claims owned or controlled by the contributor whether already acquired or hereafter acquired that would be infringed by some manner permitted by this License of making using or selling its contributor version but do not include claims that would be infringed only as a consequence of further modification of the contributor version For purposes of this definition control includes the right to grant patent sublicenses in a manner consistent with the requirements of this License Each contributor grants you a non exclusive worldwide royalty free patent license under the contributor s essential patent claims to make use sell offer for sale import and otherwise run modify and propagate the contents of its contributor version In the following three paragraphs a patent license is any express agreement or commitment however denominated not to enforce a patent such as an express permission to practice a patent or covenant not to sue for patent infringement To grant such a patent license to a party means to make such an a
170. its the accumulated sales of the selected product is updated in the database void MainWindow on_toolButton_3_clicked 1 item weight 0 0 int ID vector at page 6 2 item name db name ID item icon db icon ID item price db price ID item id ID product new productDialog if product 5setup amp item if product gt db updateAccum item weight ID delete product Obrief Open product page for product in button 4 This slot closes extracts product information from the database and starts a productDialog to weigh the product and complete a sale Once the productDialog exits the accumulated sales of the selected product is updated in the database int ID vector at page 6 1 item name db name ID item icon db icon ID item price db price ID item id ID product new productDialog if product 5setup amp item void MainWindow on toolButton 4 clicked 1 item weight 0 0 34 int 1D item name item icon item price item id vector at page 6 3 db name ID db icon ID db price ID ID product new productDialog if product 5setup amp item 1 if product gt exec db updateAccum item weight delete product Obrief Open product page for product This slot closes extracts product ID in button 5 information from the database and starts a productDialog to weigh the product and c
171. ividual contents is Adapted Material including for purposes of Section 3 b and You must comply with the conditions in Section 3 a if You Share all or a substantial portion of the contents of the database For the avoidance of doubt this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights Section 5 Disclaimer of Warranties and Limitation of Liability b C Unless otherwise separately undertaken by the Licensor to the extent possible the Licensor offers the Licensed Material as is and as available and makes no representations or warranties of any kind concerning the Licensed Material whether express implied statutory or other This includes without limitation warranties of title merchantability fitness for a particular purpose non infringement absence of latent or other defects accuracy or the presence or absence of errors whether or not known or discoverable Where disclaimers of warranties are not allowed in full or in part this disclaimer may not apply to You To the extent possible in no event will the Licensor be liable to You on any legal theory including without limitation negligence or otherwise for any direct special indirect incidental consequential punitive exemplary or other losses costs expenses or damages arising out of this Public License or use of the Licensed Material even if
172. kaging a Major Component but which is not part of that Major Component and b serves only to enable use of the work with that Major Component or to implement a Standard Interface for which an implementation is available to the public in source code form A Major Component in this context means a major essential component kernel window system and so on of the specific operating system if any on which the executable work runs or a compiler used to produce the work or an object code interpreter used to run it The Corresponding Source for a work in object code form means all the source code needed to generate install and for an executable work run the object code and to modify the work including scripts to control those activities However it does not include the work s System Libraries or general purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work For example Corresponding Source includes interface definition files associated with source files for the work and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require such as by intimate data communication or control flow between those subprograms and other parts of the work The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source The Correspo
173. l but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details Copyright C 2014 Pablo Cholbi Alenda You should have received a copy of the GNU General Public License along with QtScale If not see lt http www gnu org licenses gt ifndef MAINWINDOW_H define MAINWINDOW_H include lt QMainWindow gt include lt QApplication gt include lt QList gt include commandline h include database h include optionsdialog h include productdialog h include tabledialog h include productstruct h namespace Ui 1 class MainWindow orief this class encapsulates the methods and variables necesary to display the main product selection window class MainWindow public QMainWindow 1 Q_OBJECT public explicit MainWindow QWidget parent 0 MainWindow 38 void setup QApplication a void redraw protected int page lt Current page being displayed Database db Product database file QList lt int gt vector ID numbers of the products productStruct item Structure with product information private slots void on toolButton 1 clicked void on toolButton 2 clicked void toolButton 3 clicked void on toolButton 4 clicked void on toolButton 5 clicked void toolButton 6 clicked void backButton clicked void on
174. lass encapsulates the methods and variables necesary to parse the commandline arguments that are supported Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 5 5 home pablo Developing Qt QtScale src database cpp File Reference 29 5 4 1 Detailed Description Class definition of Command Date March 2014 Author Pablo Cholbi Definition in file commandline h 5 5 home pablo Developing Qt QtScale src database cpp File Reference Class implementation of Database include lt stdio h gt include lt QIcon gt include lt QList gt include lt QSqlDatabase gt include lt QSqlQuery gt include lt QSqlQueryModel gt include lt QVariant gt include database h include errorcode h 5 5 1 Detailed Description Class implementation of Database This class contains the methods and members that enable interaction with SQLite databases Date March 2014 Author Pablo Cholbi Definition in file database cpp 5 6 home pablo Developing Qt QtScale src database h File Reference Class definition of Database include lt QList gt include lt QIcon gt include lt QString gt include lt QSqlDatabase gt include lt QSqlQueryModel gt include errorcode h Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 30 File Documentation Classes class Database this class encapsulates the methods and variables necessary to manage the SQLite database 5 6
175. ld have received a copy of the GNU General Public License along with QtScale If not see lt http www gnu org licenses gt ifndef SERIALSCALE H define SERIALSCALE_H define bufferSize 2048 Size of serial reception buffer include include include include orief manage lt QtSerialPort QSerialPort gt QtSerialPort QSerialPortInfo errorcode h messagedialog h this class encapsulates the methods and variables necessary to the communication with the industrial scale This class manages the serial communication between the industrial scale and the application Communication is carried put over RS 232 The string processing carried out in this class is intended to work with the Microgram 21 from Microgram Instruments Espa ola S A String processing functions must be modified if other hardware is to be used The data stream encoding for this scale is shown here verbatim 80 MAPAS m e eU gt Data stream start character s qe gt space gt sign of weight lt space gt or gt 9 characters for the weight o d d IS ID Il 1 1 11 12 I3 1 I4 1 1 lk lg INriWnl a a Doch 1 gt 2 characters for state k lt I 1 gt space space g lt 11 2 gt D space space lt 3 gt I 4 lt
176. log 4 User Manual 13 PABLO CHOLBI ALENDA SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o 3 8 License Dialog Copyright C 2014 Pablo Cholbi Alenda This program is free software you can redistribute it and or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 3 This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details http www gnu org licenses Figure 3 8 1 License Dialog Interface This dialog displays the author year and licence of the QtScale application The different parts that constitute this dialog are explains below License information This part of the dialog displays information on the licence under which QtScale is distributed the author and the year 2 Close button This button exist from the current dialog and returns to the about dialog 14 4 User Manual UNIVERSITAT POLIT CNICA EBENEN DE VALENCIA Escuela T cnica Superior de Ingenieria del Dise o Universitat Polit cnica de Val ncia Escuela T cnica Superior de Ingenier a del Dise o Bachelor s Degree in Industrial Electronics and Automation Engineering Final Year Engineering Project QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CO
177. lt property gt lt widget gt lt item gt lt item gt lt layout class QHBoxLayout name horizontalLayout gt lt item gt lt widget class QPushButton name licenseButton gt lt property name text gt lt string gt License lt string gt lt property gt lt widget gt lt item gt lt item gt widget class QPushButton name closeButton gt lt property name text gt lt string gt Close lt string gt lt property gt lt widget gt lt item gt lt layout gt lt item gt lt layout gt lt widget gt lt resources gt lt connections gt lt connection gt lt sender gt closeButton lt sender gt lt signal gt clicked lt signal gt lt receiver gt aboutDialog lt receiver gt lt slot gt close lt slot gt lt hints gt lt hint type sourcelabel gt lt x gt 213 lt x gt lt y gt 241 lt y gt lt hint gt lt hint type destinationlabel gt lt x gt 144 lt x gt lt y gt 134 lt y gt lt hint gt lt hints gt lt connection gt lt connections gt lt ui gt 4 commandline cpp file commandline cpp brief Class implementation of Command This class contains the methods and members to be able to evaluate the supported command line arguments The argument list 13 easily expandable date March 2014 author Pablo Cholbi This file is part of QtScale QtScale is free software you can redistribute it and or modify 4 unde
178. lt resources gt lt connections gt lt ui gt 49 19 optionsdialog cpp file optionsdialog cpp brief Class implementation of optionsDialog This class displays and executes configuration options date March 2014 author Pablo Cholbi This file is part of QtScale QtScale is free software you can redistribute it and or modify 4 under the terms of the GNU General Public License as published by the Free Software Foundation version 3 QtScale is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details Copyright C 2014 Pablo Cholbi Alenda You should have received a copy of the GNU General Public License along with QtScale If not see lt http www gnu org licenses gt include lt QProcess gt include optionsdialog h tinclude ui_optionsdialog h tinclude aboutdialog h Obrief Class constructor of optionDialog object This function creates an instance of optionsDialog class and initializes the widget optionsDialog optionsDialog QWidget parent QDialog parent ui new Ui optionsDialog 1 ui gt setupUi this set to fullscreen and frameless this setWindowFlags Qt FramelessWindowHint this gt setFixedHeight 272 this gt setFixedWidth 480 add icons to buttons ui gt r
179. mation 3 If requested by the Licensor You must remove any of the information required by Section 3 a 1 A to the extent reasonably practicable b ShareAlike In addition to the conditions in Section 3 a if You Share Adapted Material You produce the following conditions also apply 1 The Adapter s License You apply must be a Creative Commons license with the same License Elements this version or later or a BY SA Compatible License 2 You must include the text of or the URI or hyperlink to the Adapter s License You apply You may satisfy this condition in any reasonable manner based on the medium means and context in which You Share Adapted Material You may not offer or impose any additional or different terms or conditions on or apply any Effective Technological Measures to Adapted Material that restrict exercise of the rights granted under the Adapter s License You apply Section 4 Sui Generis Database Rights Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material b for the avoidance of doubt Section 2 a 1 grants You the right to extract reuse reproduce and Share all or a substantial portion of the contents of the database if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights then the database in which You have Sui Generis Database Rights but not its ind
180. mp gt E amp lt br amp gt amp lt p amp gt amp 1lt p align amp quot justify amp quot style amp quot margin top Opx margin bottom 0px margin left Opx margin right 0px qt block indent 0 text indent Opx amp quot amp gt amp lt span style amp quot font size 10pt amp quot amp gt This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details amp lt span amp gt amp 1t p amp gt amp 1t p align amp quot center amp quot style amp quot qt paragraph type empty margin top 12px margin bottom 12px margin left Opx margin right 0px qt block 25 indent 0 text indent 0px font family MS Shell Dlgj27 font size 10pt amp quot amp gt amp lt br amp gt amp lt p amp gt amp 1lt p align quot center quot style kquot margin top 12px margin bottom i2px margin left 0px margin right 0px qt block indent 0 text indent Opx amp quot amp gt amp lt span style amp quot font family MS Shell D1lg 2 font size 10pt amp quot amp gt http www gnu org licenses amp lt span amp gt 61t phgt 8lt body amp gt 8lt html amp gt lt string gt lt property gt lt widget gt lt item gt lt item alignment Qt AlignRight gt lt widget class QPushButton name closeButton gt lt property name text gt lt string gt Close lt string gt
181. mulated Data type Integer Text Blob Real Real Divide the Information into Tables At this point is is possible to extract that in this database there is only one entity Product All that data that need to be included in the database are attributes of the Product entity index name image price and accumulated sales Therefore only one table is necessary in this database It should be noted that this refers to the tables that arise from entity and entity relationships more tables might be necessary when normalizing the database Turn Information Items into Columns As there is only one entity and one table all the attributed of the entity become columns in the table In other words the database has one table called Products with 5 columns named Index Name Image Price and Accumulated Specify Primary Keys Each table must have a primary key The Product table s primary key is the index as one might assume from the name It is the primary key because the index is a unique integer that identified each product 1 Report 47 PABLO CHOLBI ALENDA SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o Set up the Table Relationships As there is only one table there are no relationships between tables The data stored in the Product table is unique and different for each product This implies that the entity and all its
182. n top of C such as wxWidgets Qt etc that may be used for the development of the application With the Qt framework it is possible to develop cross platform applications that can easily compiled to target various architectures and operating systems without modification of the source code Specifically there is a branch of the framework intended for Embedded Linux This branch allows to create graphical applications that use a virtual frame buffer The application itself provides the frame buffer and a Qt application for embedded Linux is already running other applications will connect to the first application s frame buffer This saves on memory usage and does not require a fully fledged X11 server to be running on the target system 1 Report 11 PABLO CHOLBI ALENDA SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o 3 3 Alternatives for the SQL Based Database Engine There are a lot good options for selecting a database engine but this section will focus on comparing three of the most popular and predominant database engines 3 3 1 MySQL MariaDB Pros Cons Scalable Complex set up Good performance features e Requires server Supports user permission e Good for client server applications Good with multi master replication MySQL is popular in medium to high size systems It has a large community and there are many open source project dev
183. name font gt lt font gt lt pointsize gt 10 lt pointsize gt lt font gt lt property gt lt property name text gt lt string gt About lt string gt lt property gt lt widget gt lt widget gt lt resources gt lt connections gt lt ui gt 57 22 productdialog cpp file productdialog cpp brief Class implementation of productDialog This class displays product information and weighs the product date March 2014 author Pablo Cholbi This file is part of QtScale QtScale is free software you can redistribute it and or modify 4 under the terms of the GNU General Public License as published by the Free Software Foundation version 3 QtScale 15 distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details Copyright C 2014 Pablo Cholbi Alenda You should have received a copy of the GNU General Public License along with QtScale If not see lt http www gnu org licenses gt include lt QTimer gt include lt QIcon gt include lt QString gt include productdialog h include ui_productdialog h include productstruct h include serialscale h include messagedialog h include errorcode h QString currencyUnit QString fromUtf8 Symbol for currency unit QString massU
184. nd it is parsed before QtScale starts Please note that although the location of the database may be set trough command line arguments the name of the database cannot be set and it it by default QtScale sqlite The name of the database that the application expects can only be changed at compile time If an invalid command is passed to the application it exits immediately and writes to STDERR an error message 4 User Manual 7 PABLO CHOLBI ALENDA SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o 3 2 Main Window 5 Strawberry 10 12 13 15 Lemon 22 Figure 3 2 1 Window Interface The Main Window as its name indicates is the primary window in the application from which all other windows can be accessed directly or indirectly Product selection takes place in this window The different parts that constitute this window are explains below 1 Product selection This part of the window displays up to 6 product selection buttons with the product ID product name and product image Clicking on a product button lead to the corresponding product dialog to complete a sale A set of 6 products constitutes a product page Products are ordered by ID number More information on the product dialog in the dedicated dialog subsection section 3 3 2 Forward and back buttons By clicking these buttons the product
185. nd or modify 4 under the terms of the GNU General Public License as published by the Free Software Foundation version 3 QtScale is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details Copyright C 2014 Pablo Cholbi Alenda You should have received a copy of the GNU General Public License along with QtScale If not see lt http www gnu org licenses gt include lt QSqlQueryModel gt include tabledialog h include ui tabledialog h Obrief Class constructor of tabletDialog object This function creates an instance of productDialog class and initializes the widget The table displays the Id product name and accumulated sales for all products in the database This function must be called after the class object has been created and before the dialog is executed tableDialog tableDialog QWidget parent QDialog parent ui new Ui tableDialog 1 ui gt setupUi this set to fullscreen and frameless this setWindowFlags Qt FramelessWindowHint this gt setFixedHeight 272 this gt setFixedWidth 480 82 add icons to buttons ui gt closeButton gt setIconSize QSize 24 24 ui gt closeButton gt setIcon QIcon Buttons Buttons cancel png ui gt clearButton gt setIconSize QSize 24 24 ui gt clearButton gt setI
186. nding Source for a work in source code form is that same work 2 Basic Permissions rights granted under this License are granted for the term of copyright on the Program and are irrevocable provided the stated conditions are met This License explicitly affirms your unlimited permission to run the unmodified Program The output from running a covered work is covered by this License only if the output given its content constitutes a covered work This License acknowledges your rights of fair use or other equivalent as provided by copyright law You may make run and propagate covered works that you do not convey without conditions so long as your license otherwise remains in force You may convey covered works to others for the sole purpose of having them make modifications exclusively for you or provide you with facilities for running those works provided that you comply with the terms of this License in conveying all material for which you do not control copyright Those thus making or running the covered works for you must do so exclusively on your behalf under your direction and control on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you Conveying under any other circumstances is permitted solely under the conditions stated below Sublicensing is not allowed section 10 makes it unnecessary 3 Protecting Users Legal Rights From Anti Circumvention Law No covered
187. ned or databaseError otherwise errorCode Database openDatabase fprintf stderr Cannot open database requested n return databaseError This function closes the database void Database closeDatabase brief List database records This function returns a List object with all the ID numbers of the products in the database in ascending order Oreturns List of product IDs 1 if db open 1 return SUCCESS else 1 F Obrief Close database 1 db close F QList lt int gt Database list 1 QList lt int gt vector QSqlQuery query SELECT ID FROM Products while query next 14 vector append query value 0 tolnt return vector Obrief Get product icon This function returns as Icom the icon for the specified product ID in the database ID Product index number ID field in database returns Icon of specified product QIcon Database icon int ID 1 QSqlQuery query SELECT Icon FROM _ Products u WHERE ID QString number ID 3 query next QByteArray array query value 0 toByteArray QPixmap pixmap QPixmap pixmap loadFromData array return QIcon pixmap Obrief Get product name This function returns the name of the specified product ID in the database ID Product index number ID field in database Oreturns Name of specified product QStr
188. nit QString kg Symbol for weight unit brief Class constructor of productDialog object This function creates an instance of productDialog class and initializes the widget productDialog productDialog QWidget parent QDialog parent ui new Ui productDialog 1 ui gt setupUi this set to fullscreen and frameless 58 this setWindowFlags Qt FramelessWindowHint this gt setFixedHeight 272 this gt setFixedWidth 480 add icons to buttons ui gt buyButton gt setIcon QIcon Buttons Buttons emblem default png ui gt buyButton gt setIconSize QSize 32 32 ui gt cancelButton gt setIcon QIcon Buttons Buttons cancel png ui gt cancelButton gt setIconSize QSize 32 32 brief Class destructor of productDialog object This function destroys an instance of productDialog class productDialog productDialog 1 delete serial delete ui F brief Product dialog This function initializes the widget elements according to the productStruct and prepares the serial connections to weigh the product This function must be called after the class object has been created and the dialog should only be executed if the setup exits successfully Oparam item Pointer to productStruct object Oreturns TRUE is setup exited successfully or FALSE otherwise bool productDialog setup productStruct item 1 product item set product icon ui
189. nse as published by the Free Software Foundation version 3 QtScale is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details Copyright C 2014 Pablo Cholbi Alenda You should have received a copy of the GNU General Public License along with QtScale If not see lt http www gnu org licenses gt include lt stdio h gt include lt QIcon gt include lt QList gt include lt QSqlDatabase gt include lt QSqlQuery gt include lt QSqlQueryModel gt include lt QVariant gt include database h include errorcode h Obrief Class constructor of Database This function creates an instance of Databaseand initializes the class member Database Database 1 db QSqlDatabase addDatabase QSQLITE Obrief Set database path This function sets the path the SQLite database 13 Oparam database Path to SQLite database void Database setDatabase QString database db setDatabaseName database Open database This function If the SQLite databaseError Otherwise it opens the database to be able to interact with it lt br gt database failed to open the function returns error code lt br gt returns SUCCESS returns Error code being SUCCESS if the database was ope
190. ntList at i 1 It should be noted that argument qus is an internal Qt argument and is parsed before this function is executed This is dummy else if case such that application restart does not fail non embedded Linux systems Y unexpected argument else fprintf stderr Unknown command line argument please use help n gt return argumentError return error expand to user s home directory if needed if basePath startsWith 1 DDir dir basePath replace dir homePath add slash to end of database path string if needed if basePath endsWith basePath append return SUCCESS brief Return database location This function returns as a QString the path to the QtScale database file such that other modules can interact with it returns The path of the database QString Command databasePath 1 return basePath database end of file ROR RRR OR eoe AAA ARAS 11 5 commandline h file commandline h brief Class definition of Command date March 2014 author Pablo Cholbi This file is part of QtScale QtScale is free software you can redistribute it and or modify 4 under the terms of the GNU General Public License as published by the Free Software Foundation version 3
191. ntsize gt lt font gt lt property gt lt property name text gt lt string gt lt property gt lt widget gt lt widget class QLabel name Title gt lt property name geometry gt lt rect gt lt x gt 160 lt x gt lt gt 30 lt gt lt width gt 160 lt width gt lt height gt 35 lt height gt lt rect gt lt property gt lt property name font gt lt font gt lt pointsize gt 28 lt pointsize gt lt font gt lt property gt lt property name locale gt lt locale language English country UnitedKingdom gt lt property gt lt property name text gt lt string gt Title lt string gt lt property gt lt property name alignment gt lt set gt Qt AlignCenter lt set gt 48 lt property gt lt widget gt lt widget class QLabel name Message gt lt property name geometry gt lt rect gt lt x gt 15 lt x gt lt y gt 100 lt y gt lt width gt 450 lt width gt lt height gt 30 lt height gt lt rect gt lt property gt lt property name font gt lt font gt lt pointsize gt 14 lt pointsize gt lt font gt lt property gt lt property name locale gt lt locale language English country UnitedKingdom gt lt property gt lt property name text gt lt string gt Message lt string gt lt property gt lt property name alignment gt lt set gt Qt AlignCenter lt set gt lt property gt lt widget gt lt widget gt
192. numerated and structured data types respectively 5 1 3 1 Main The main function is composed solely of the C source code file main cpp The flow diagram for this module is as follows 32 Set application parameters Create MainWindow Pass arguments to MainWindow Execute MainWindow return restart Yes Prepare arguments Start new instance Close this instance Figure 5 1 3 main Flowchart 1 Report UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX POLITECNICA DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE 5 1 3 2 Main Window The MainWindow module is composed of the source code file mainwindow cpp the C header file mainwindow h and the Qt form mainwindow ui The flow diagram for this module is as follows Initialize variables Initialize UI Parse arguments Open database Exit with error Button press Forward Product n Options Table Advance Recede Create Create amp execute Close page page product n optionsDialog database structure Create amp execute produc tDialog Return accept Return accept Create amp execute optionsDialog Open database Update No sales roduct n Ext with error Figure 5 1 4 MainWindow Flowchart 1 Report 33 PABLO CHOLBI ALENDA gt SUPERVISOR DR NGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise
193. of the C source code file messagedialog cpp the C header file messagedialog h and the Qt form messagedialog ui The flow diagram for this module is as follows 1 Report messageD ialog Initialize UI Argument error Display arguement warning Display database warning Database error Display query warning Query error Display serial warning Serial error Display scale warning Display default warning Acknowledge Ye 5 Figure 5 1 8 messageDialog Flowchart 37 PABLO CHOLBI ALENDA SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o The Qt form messagedialog ui provides the GUI for this module a screenshot of which is provided below Note that this screenshot is warning of a serial communication error but other errors are also reported Error Cannot establish serial connection A Acknowledge Figure 5 1 9 messageDialog UI 38 1 Report ERa UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX POLITECNICA DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE 5 1 3 5 Table Dialog The tableDialog module is composed of the C source code file tabledialog cpp the C header file tabledialog h and the Qt form tabledialog ui The flow diagram for this module is as follows tab leDialog Initialize UI Populate table Button press Return accept
194. og productstruct tabledialog h serialscale h licensedialog aboutdialog h Bu uw B BE 7272427 FORMS mainwindow ui messagedialog ui optionsdialog ui productdialog ui tabledialog ui licensedialog ui aboutdialog ui RESOURCES Resources qrc und of file SS A meme 70 lt RCC gt 27 Resources qrc lt qresource prefix Buttons gt lt file gt Buttons exit png lt file gt lt file gt Buttons next png lt file gt lt file gt Buttons options png lt file gt lt file gt Buttons refresh png lt file gt lt file gt Buttons shutdown png lt file gt lt file gt Buttons warning png lt file gt lt file gt Buttons cancel png lt file gt lt file gt Buttons previous png lt file gt lt file gt Buttons executable png lt file gt lt file gt Buttons calculator png lt file gt lt file gt Buttons clear png lt file gt lt file gt Buttons emblem default png lt file gt lt file gt Buttons about png lt file gt lt file gt Buttons certificate png lt file gt lt qresource gt lt RCC gt 71 28 serialscale cpp file serialscale cpp brief Class implementation of serialScale This class manages the serial communication with the industrial scale date March 2014 0author Pablo Cholbi This file is part of QtScale QtScale is free software you can redistribute it and or modify 4 under the terms of the GNU General Public Lic
195. ommand Class constructor of Command object errorCode parseArguments QStringList argumentList Parse incoming arguments QString databasePath Return database location Protected Attributes QString basePath Database name QString database Database path 4 2 1 Detailed Description this class encapsulates the methods and variables necesary to parse the commandline arguments that are sup ported Definition at line 39 of file commandline h 4 2 2 Constructor Destructor Documentation 4 2 2 1 Command Command Class constructor of Command object This function creates an instance of Command class and initializes the class variables Definition at line 45 of file commandline cpp Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 4 3 Database Class Reference 9 42 3 Member Function Documentation 4 2 3 1 QString Command databasePath Return database location This function returns as a QString the path to the QtScale database file such that other modules can interact with it Returns The path of the database Definition at line 152 of file commandline cpp 4 2 3 2 errorCode Command parseArguments QStringList argumentList Parse incoming arguments This function parses an incoming vector of arguments If an unexpected argument is found the function returns argumentError error code Otherwise it returns SUCCESS Supported arguments help Show help message
196. omplete a sale Once the productDialog esits product is updated in the database the accumulated sales of the selected void MainWindow on toolButton 5 clicked 1 item weight 0 0 int ID item name item icon item price item id vector at page 6 4 db name ID db icon ID db price ID ID product new productDialog if product gt setup kitem if product gt exec db updateAccum item weight Y delete product Obrief Open product page for product This slot closes extracts product 15 in button 6 information from the database and starts a productDialog to weigh the product and complete a sale Once the productDialog esits product is updated in the database the accumulated sales of the selected void MainWindow on toolButton 6 clicked 1 35 item weight 0 0 int ID vector at page 6 5 item name db name ID item icon db icon ID item price db price ID item id ID product new productDialog if product gt setup amp item 1 if product gt 1 db updateAccum item weight ID delete product Obrief Go to previous page This slot changes the current page and forces the GUI to void MainWindow on backButton clicked redraw Obrief Go to next page This slot changes the current and forces the GUI to void MainWindow on
197. oping Qt GtScale src optionsdialog cpp File Reference Class implementation of optionsDialog include lt QProcess gt include optionsdialog h include ui optionsdialog h include aboutdialog h 5 15 1 Detailed Description Class implementation of optionsDialog This class displays and executes configuration options Date March 2014 Author Pablo Cholbi Definition in file optionsdialog cpp 5 16 home pablo Developing Qt QtScale src optionsdialog h File Reference Class definition of optionsDialog include lt QDialog gt include aboutdialog h Classes class optionsDialog this class encapsulates the methods and variables necesary to display and execute configuration options Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 36 File Documentation 5 16 1 Detailed Description Class definition of optionsDialog Date March 2014 Author Pablo Cholbi Definition in file optionsdialog h 5 17 home pablo Developing Qt QtScale src productdialog cpp File Reference Class implementation of productDialog include lt QTimer gt include lt QIcon gt include lt QString gt include productdialog h include ui_productdialog h include productstruct h include serialscale h include messagedialog h include errorcode h Variables e QString currencyUnit QString fromUtf8 Symbol for currency unit QString massUnit QString kg S
198. orm codegen flags Platform linker flags ABI arm linux generic 7 18 Figure 4 1 2 Configuring Compiler 1 Report UNIVERSITAT POLIT CNICA DE VALENCIA QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX APPLICATION FOR AN INDUSTRIAL SCALE 4 1 3 3 Configuring Debugger Click on the Tools gt Options from the top menubar the left side vertical menubar click Build amp Run e Click the Debugger tab under Build amp Run Click Add e Change the name to arm arago GDB This can be done by modifying the Name field set the Debugger Path select Browse Navigate to opt ti sdk am335x evm 06 00 00 00 linux devkit sysroots i686 arago linux usr bin e Select arm linux gnueabihf gdb and click on Open e Click Apply to save your changes a Environment O C L Qt Quick Q Debugger A Designer Bl Analyzer version Control Qj Android o BlackBerry Fa Code Pasting 1 Report Filter v Options Build amp Run General Kits QtVersions Compilers Debuggers CMake gt Auto detected Manual Clone arm arago GDB opt ti sdk am335 00 linux devkit sysroots i686 arago linux usr bin arm linu qnueabii d Name arm arago GDB Path sdk am335x evm 06 00 00 00 linux devkit sysroots i686 arago linux usr bin arm linux gnueabihf gdb Browse ABls OK
199. ose permissions but the entire Program remains governed by this License without regard to the additional permissions When you convey a copy of a covered work you may at your option remove any additional permissions from that copy or from any part of it Additional permissions may be written to require their own removal in certain cases when you modify the work You may place additional permissions on material added by you to a covered work for which you have or can give appropriate copyright permission Notwithstanding any other provision of this License for material you add to a covered work you may if authorized by the copyright holders of that material supplement the terms of this License with terms a Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License or b Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it or Prohibiting misrepresentation of the origin of that material or requiring that modified versions of such material be marked in reasonable ways as different from the original version or d Limiting the use for publicity purposes of names of licensors or authors of the material or e Declining to grant rights under trademark law for use of some trade names trademarks or service marks or f Requiring indemnification of licensors and au
200. otal cost of materials 80 00 3 Budget 5 PABLO CHOLBI ALENDA E EEEE SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o 6 3 Budget Ee UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX POLIT CNICA 7 DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE 2 Labour Cost 2 1 Bare Labour Cost As stated above these calculations were made under the assumption that the designer is an independent engineer with experience The hourly rate has been set at 35 hour Concept Units Cost Quantity Total Viability study h 35 10 350 Software design h 35 25 875 Software implementation h 35 80 2800 Testing h 35 15 525 Documentation h 35 40 1400 5950 00 The total cost of this section for this project is 5950 The total amount of hours is 170 h Assuming an 8 h workday and 22 workdays a month 170 h constitutes 170h AAA 0 966 th 8 h 22 days EE 2 2 Costs Derived From Self Employed Work Under Spanish Legislation The following characteristics were considered for the self employed engineer Age 22 Months of Contributions 12 Spanish National Classification of Economic Activities 6201 Computer Programming Activities Contingency Basis 1400 month Concept Units Cost Quantity Total Tax Contribution 96 month 1400 26 5 371 Coverage for accidents at work
201. pile time The user should be able to select which serial port to use through a command line interface or an option window In practice the solution that would make more sense it to have only a command line interface for this function as it is an advanced setting that the average user should not need to be concerned with A command line argument option similar to the one implemented to specify the database location could be implemented to set the serial port at the application start Much like the database location option this serial port option would have a default value dev ttyUSBO in case the user does not explicitly pass the argument 1 Report 53 PABLO CHOLBI ALENDA E EEEE SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o 54 1 Report fi UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM USING LINUX DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE 7 Bibliography Abdurachmanov 2014 D Abdurachmanov K Arya J Bendavid T Boccali G Cooperman A Dotti P Elmer Eulisse F Giacomini C Jones M Manzali and S Muzaffar Explorations of the Viability of ARM and Xeon Phi for Physics Processing Arxiv 2014 Allen 2010 Allen M Owens Definitive Guide to SQLite Apress 2010 Bartholomew 2013 D Bartholomew MariaDB vs MySQL ADMIN Magazine 2013 Retrieved from http www admin magazine com Articles MariaDB vs MySQL Bl
202. r using the property editor edit the following QWidget gt Geometry Width 480 and QWidget Geometry gt Height 272 For testing purposes a label with the text Hello World was added to the widget As the Matrix GUI may not be running the application cannot connect to a running virtual frame buffer and the Qt embedded Linux applications must start one if this is the case On the left side of the window click on the Projects tab than select the Run amp Build tab and finally the Run tab In the Arguments field qws must be added Template Sitara pro Template Sitara Qt Creator File Edit Build Debug Analyze Tools Window Help Template Sitara Qt UID Editor CodeStyle Dependencies Welcome Add Kit Sitara Qt 4 8 3 Manage Kits NEM Run Run Run configuration Template Sitara on Remote Device Add Rename Executable on host Ihome pablo Developing Qt build Template Sitara Sitara Qt 4 8 3 Debug Template Sitara Executable on device home root bin Template Sitara Alternate executable on device Use this command instead Arguments qws Working directory lt default gt Run Environment Use System Environment Details Templ itara Valgrind Settings Use Global Settings Details Debugger Settings Enable C Enable QML What the prerequisites issues E 4 5 E Figure 4 3 1 Application Arguments Finally the following lines should be add
203. r pequosep jepou ay oj spuodseuoo sejueinBis 39 seajoaup sej serueBixe se e 33 78 06 ofesuoo ej ep ody jap 39 uoiseqoude ep opeorinie je ue je epuodseuoo adA 39 uorjeqoudde p je9jiueo oN 010 8671 jenosdde adA 93 9410 LE g LC 3l NO9 101320 1025 8 jueouge W S WIONVdS3 SLNSWNYLSNI NVEDONDIN esse op uou jueujeuuoruo e ep yueunasul 1 Cu 55812 Jo jueuinggsul onewogne uou eu asejo ap ou ojuerueuoruny e efesed ep 3 31IW3O NO2 NOLLVMY 1030 ALINAO INOD JO NOLLV3IY 123 2 Valv 1230 5 OZ LE 227 56 L V S IAL ZZ 08 08 66 Xe OF OS ZZ 56 IAL VNO1308V8 Ids30 NVOP LNVS 02680 91 ejossoy efesed VLNVS NO4 ouoBitod V S VN 1ONVdS3 SLNAFINNYLSNI WVHOOHOINW 9
204. r the terms of the GNU General Public License as published by the Free Software Foundation version 3 QtScale is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details Copyright C 2014 Pablo Cholbi Alenda You should have received a copy of the GNU General Public License along with QtScale If not see lt http www gnu org licenses gt include lt stdio h gt include lt cstdlib gt include lt QDir gt include lt QString gt include lt QStringList gt include commandline h include errorcode h Obrief Class constructor of Command object This function creates an instance of Command class and initializes the class variables Command Command basePath QtScale Default database name database QtScale sqlite Default database path Qbrief Parse incoming arguments This function parses an incoming vector of arguments lt br gt If an unexpected argument is found the function returns argumentError error code lt br gt Otherwise it returns SUCCESS verbatim Supported arguments help Show help message versiom Display application version information path lt dir gt Set database location endverbatim It should be noted that argument qus 15 an internal Qt argument and is pars
205. r to char vector from which to read data Oparam length Length in Bytes of data to be sent void serialScale sendData const char data int length 1 if connection t serial gt write data length Qbrief Receive data over serial This functions is non blocking This function is part of the low level functions of this class Oparam data Pointer to char vector to which to write data Oparam macData Maximum number of data bytes to receive Oreturns Number of Bytes received int serialScale receiveData const char data int maxData 1 74 emit tf no connection has been established if connection 1 return 0 int bytes serial gt bytesAvailable read available data if bytes gt 0 4 if bytes gt maxData 1 bytes maxData Y serial gt read char data bytes return bytes brief Try to get new measurement This is the function to be called to attempt to retrieve and process a new weight measurement sent by the scale over RS 232 When the function is called data Bytes received since the last call are added to the buffer Then the buffer is evaluated for valid data streams If a valid stream is found and processed 4 is removed from the buffer This function is intended to work with the Microgram ie21 industrial scale from Microgram Instruments Espaola S A For more information on the ie21 data stream coding please consult the serial
206. ransmission from the scale Currently there are 3 examples streams already defined for quick testing and debugging lt gt TX This function is intended to work with the Microgram ie21 industrial scale from Microgram Instruments Espanola S A For more information on the ie21 data stream coding please consult the serialScale class documentation and the annex which includes the manufacturers datasheet Definition at line 436 of file serialscale cpp Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 4 10 serialScale Class Reference 23 4 10 3 errorCode serialScale openConnection Establish serial connection with the industrial scale This function creates configures and opens a QSerialPort connection to communicate with the industrial scale and receive information on the weight of the products Connection parameters configured to work with the Microgram ie21 industrial scale from Microgram Instruments Espa ola S A Serial port dev ttyUSBO Baud rate 9600 Data bits 8 bits Stop bits 1 bit Parity no parity Flow control no flow control This function is part of the low level functions of this class Returns Error code being SUCCESS if connection was established or serialError otherwise Definition at line 87 of file serialscale cpp 4 10 3 7 void serialScale process char buff int size Process possible data stream This function takes a possible data stream and proce
207. relational database for bulk product commerce by weight Product and sales information is retrieved and stored in the database Keywords embedded Linux ARM Cortex A Qt industrial scale Resumen En los ltimos a os ha habido un gran aumento de los productos de consumo basado en ARM Este incremento ha sido motivado por la eficiencia y el bajo costo de estos procesadores que los hacen adecuados para dispositivos de baja potencia y aplicaciones que no hacen un uso intensivo de la CPU Este trabajo examina la viabilidad de implementar una aplicaci n con interfaz gr fica t ctil para una b fscula industrial en una placa de desarrollo Texas Instruments AM335x ARM Cortex A a diferencia de los sistemas basados en x86 Este trabajo tambi n tiene la intenci n de servir como una referencia general para la implementaci n de aplicaciones multiplataforma con las bibliotecas Qt para sistemas Linux embebido que se ejecuta en un hardware basado en AM335x En concreto la aplicaci n a desarrollar es una aplicaci n con una interfaz gr fica t ctil intuitiva que interactua con una b scula industrial Microgram EI21 de Microgram Instrumentos Espafiola SA a trav s de RS 232 y una base de datos relacional SQLite para el comercio de productos a granel al peso La informaci n sobre el producto y las ventas se recupera y se almacena en la base de datos Palabras Clave Linux embebido ARM Cortex A Qt b scula industrial Resum En els ltims anys
208. ric such that it can be used for commerce of other goods by weight The image name index price and accumulated sales shall be stored in a relational database The Application must automatically update the GUI when a product is added removed or updated in the database The system shall be network connected and have a fixed IP address assigned for easy maintenance and database access Critical errors and non critical errors should be handled differently The application should exit immediately when a critical error is encountered A warning system is allowed for non critical errors The application shall launch on system boot The application shall have a system shutdown and system restart under the advanced options menu e The application shall be as modular as possible for simplicity and source code reuse Alow cost and low power solution should be favoured as the adopted solution The application shall be cross platform developed under a framework which allows for the code to be easily compiled to run on different processor architectures and operational system 1 Report 7 PABLO CHOLBI ALENDA SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o 2 2 Needs Study The system is requires to have a touchscreen graphical user interface The hardware platform should either come with such screen or have the possibility of adding one via off the shelf products via
209. rk incompatibility By developing cross platform applications it is possible to use ARM based systems as industrial computes and benefit from the advantages of this platform over traditional x86 systems while developing applications that can easily be ported to said systems Therefore this work does not only present the implementation of an application for an industrial scale for an ARM development board but it is also intended to serve as reference on how to develop cross platform application for ARM embedded Linux systems that x86 computers can also benefit from By developing cross platform applications the hardware and OS range of possibilities becomes larger and a more optimal solution can be found for a given problem 6 1 Report UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE 2 Factors to Consider 2 1 Initial Specifications Touchscreen graphical open source application for an industrial scale using the Qt framework Texas Instruments Sitara AM335x processor running Linux e System shall receive the output of a Microgram IE21 industrial scale from Microgram Instruments Espafiola S A industrial scale over RS 232 Simple and intuitive software such that the users are able to deduce how to use the application without any prior knowledge or help scale is intended to weigh fruit and vegetables but the database should be gene
210. rogram Instruments Espaola S A verbatim Serial port dev ttyUSBO Baud rate 9600 Data bits 8 bits Stop bits 1 bit Parity no parity Flow control no flow control endverbatim This function ts part of the low level functions of this class Oreturns Error code being SUCCESS if connection was established or serialError otherwise errorCode serialScale openConnection 1 create port if not already created if port 1 serial new QSerialPort port true close connection if open if connection closeConnection connection false y set up connection serial gt setPortName dev ttyUSBO serial gt setBaudRate QSerialPort Baud9600 serial gt setDataBits QSerialPort Data8 serial gt setStopBits QSerialPort OneStop serial gt setParity QSerialPort NoParity serial gt setFlowControl QSerialPort NoFlowControl attempt to open connection if serial gt open QlODevice ReadWrite 73 connection true return SUCCESS else 1 connection false return serialError brief Closes the serial port Closes the serial port if it ts open This function is part of the low level functions of this class void serialScale closeConnection if connection serial gt close Bi Obrief Send data over serial This functions ts non blocking This function is part of the low level functions of this class Oparam data Pointe
211. rojects in the fields of industrial computer science and industrial electronics Overall it is possible to conclude that all the requirements and objectives set at the start of the project have been fulfilled and valuable academic and professional experience has been acquired in the process of developing Going beyond the specification of the project 3 upgrades are proposed as future work that would improve the flexibility functionality and robustness of the application Add printing functionality to the system such that when a sale is complete a ticket is printed with information such as the name of the product the weight of the product the total price the date and time of the transaction and a bar code and or QR code to be later scanned by the cashier This upgrade provides greater functionality to the project but it would be challenging to configure compile and set up CUPS on the target system Making this feature cross platform might also be an issue Upgrade to the database and the application and add an attribute to the product entity which would indicate if the product is in stock This could simplify the database entertainment as the product record would not have to be removed when the product is out of stock to then be reinserted when it is back in stock This would translate to less maintenance required to be done through the command line User defined serial port during execution time instead of having it defined at com
212. ruct Reference 19 49 1 Detailed ae 19 4 10 serialScale Class Reference 19 Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen CONTENTS V 240 1 Detailed 222222222222 ERG m RR ome s 21 4 10 2 Constructor amp Destructor Documentation 21 LAME SERIOS Los Eus ue ee a Ee he o Ros RE A 21 41022 v sefalooae cocidas loe voe ho RR CR REOR dS 21 4 10 3 Member Function Documentation 21 BUSCA 21 4 10 3 2 closeConnection 22 cu soe 22 4103 44 isStabl REE Se Gee Ee a ee eS 22 41035 a eee be beh RR Ro RR mo o t donem Ron RR ed 22 410 236 OPENCOMECI N ise s sacs u pa am 2555558 mom Rom 5 5 23 ue A 23 4 10 2 5 2 2 2252 eue RR RR 23 QUIDNE o P IC Baw ee cc 23 210 310 RC 24 4 11 tableDialog Class Reference 24 4413 Detailed x 2n rot ob ur Eo D RR ex ERR ROSA 3 24 4 11 2 Constructor amp Destructor Documentation 25 11 24 su nu koe a A
213. ruct h Classes class MainWindow this class encapsulates the methods and variables necesary to display the main product selection window Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 34 File Documentation 5 12 1 Detailed Description Class definition of MainWindow Date March 2014 Author Pablo Cholbi Definition in file mainwindow h 5 13 home pablo Developing Qt QtScale src messagedialog cpp File Reference Class implementation of messageDialog include lt stdio h gt include lt QString gt include messagedialog h include ui_messagedialog h include errorcode h 5 131 Detailed Description Class implementation of messageDialog This class displays error and information messages Date March 2014 Author Pablo Cholbi Definition in file messagedialog cpp 5 14 home pablo Developing Qt GtScale src messagedialog h File Reference MessageDialog class definition include lt QDialog gt include errorcode h Classes class messageDialog this class encapsulates the methods and variables necesary to display error and information messages Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 5 15 home pablo Developing Qt OtScale src optionsdialog cpp File Reference 5 14 1 Detailed Description MessageDialog class definition Date March 2014 Author Pablo Cholbi Definition in file messagedialog h 5 15 home pablo Devel
214. rwardButton gt lt property name geometry gt lt rect gt lt x gt 430 lt x gt lt y gt 116 lt y gt lt width gt 40 lt width gt lt height gt 40 lt height gt lt rect gt lt property gt lt property name text gt lt string gt lt property gt lt widget gt 40 widget class QToolButton name toolButton_3 gt lt property name geometry gt lt rect gt lt x gt 305 lt x gt lt y gt 24 lt y gt lt width gt 100 lt width gt lt height gt 100 lt height gt lt rect gt lt property gt lt property name text gt lt string gt lt property gt lt widget gt widget class QToolButton name toolButton 1 lt property name geometry gt lt rect gt lt x gt 75 lt x gt lt y gt 24 lt y gt lt width gt 100 lt width gt lt height gt 100 lt height gt lt rect gt lt property gt lt property name text gt lt string gt lt property gt lt widget gt lt widget class QToolButton name toolButton_5 gt lt property name geometry gt lt rect gt lt x gt 190 lt x gt lt y gt 148 lt y gt lt width gt 100 lt width gt lt height gt 100 lt height gt lt rect gt lt property gt lt property name text gt lt string gt lt property gt lt widget gt lt widget class QToolButton name toolButton_2 gt lt property name geometry gt lt rect gt lt x gt 190 lt x gt lt y gt 24 lt y gt lt width gt 100 lt width gt l
215. s was generated from the following files home pablo Developing Qt QtScale src productdialog h home pablo Developing Qt QtScale src productdialog cpp 4 9 productStruct Struct Reference Product data structure include lt productstruct h gt Public Attributes QString name Name of product e Qlcon icon Icon of product int id Id of product float price Product price per unit of weight float weight Weight received from the scale 4 9 1 Detailed Description Product data structure This data structure encapsulated variables to be used in the product dialog Definition at line 42 of file productstruct h The documentation for this struct was generated from the following file home pablo Developing Qt QtScale src productstruct h 4 10 serialScale Class Reference this class encapsulates the methods and variables necessary to manage the communication with the industrial scale include lt serialscale h gt Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 20 Class Documentation Public Member Functions serialScale Class constructor of serialScale object serialScale Class destructor of serialScale object errorCode openConnection Establish serial connection with the industrial scale void closeConnection Closes the serial port void sendData const char data int length Send data over serial int receiveData const char
216. se arguments or default Application exits with fail status if any of these actions fail This function must be called after the class object has been created and before the dialog is executed Parameters Pointer to QApplication object Definition at line 96 of file mainwindow cpp The documentation for this class was generated from the following files home pablo Developing Qt QtScale src mainwindow h home pablo Developing Qt QtScale src mainwindow cpp 4 6 messageDialog Class Reference this class encapsulates the methods and variables necesary to display error and information messages include lt messagedialog h gt Inheritance diagram for messageDialog messageDialog Public Member Functions messageDialog QWidget 0 Class constructor of messageDialog object messageDialog Class destructor of messageDialog object void errorMessage errorCode error Show error message void genericMessage QString msg Show generic message Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 16 Class Documentation 4 6 1 Detailed Description this class encapsulates the methods and variables necesary to display error and information messages Definition at line 42 of file messagedialog h 4 6 2 Constructor amp Destructor Documentation 4 6 2 1 messageDialog messageDialog QWidget parent 0 explicit Class constructor of messageDialog object
217. se including any patent licenses granted under the third paragraph of section 11 However if you cease all violation of this License then your license from a particular copyright holder is reinstated a provisionally unless and until the copyright holder explicitly and finally terminates your license and b permanently if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation Moreover your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means this is the first time you have received notice of violation of this License for any work from that copyright holder and you cure the violation prior to 30 days after your receipt of the notice Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License If your rights have been terminated and not permanently reinstated you do not qualify to receive new licenses for the same material under section 10 9 Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or run a copy of the Program Ancillary propagation of a covered work occurring solely as a consequence of using peer to peer transmission to receive a copy likewise does not require acceptance However nothing other than this License gran
218. selection area 1 displays the next or previous set of 6 product also know as product page The buttons are hidden if it is not possible to advance or recede through the product list This happens when the beginning or the end of the product list is reached 3 Options This button launches the options dialog More information on this in the dedicated dialog subsection section 3 6 4 Accumulated sales This button launches the accumulated sales dialog More information on this in the dedicated dialog subsection section 3 5 8 4 User Manual GU UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX POLIT CNICA DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE 3 3 Product Dialog Product ID 5 Strawberry 2 50 kg 0 000 kg Once a product has been selected this dialog is displayed the weight is processed from the industrial scale and information of product weight cost and price of the current sale is displayed The user has the option to process the sale or cancel the transaction Figure 3 3 1 Product Dialog Interface The different parts that constitute this dialog are explains below Product image This part of the window displays the image associated to the product e 2 Product information This part of the windows displays information of the product such as product ID product name product cost weight of the product of the scale and price of the current transaction
219. ss displays the license information of the application The information is static and defined mthe MainWindow This class encapsulates the methods and variables necesary to display the main product selec tiom 2 i a wes ded messageDialog This class encapsulates the methods and variables necesary to display error and information Messages wed optionsDialog This class encapsulates the methods and variables necesary to display and execute configura HOMOPUONS EL productDialog This class encapsulates the methods and variables necessary to display product weight and iInfortmatlofi onse Eon nom Pen Rom bbe Bh hae productStruct Product data structure serialScale This class encapsulates the methods and variables necessary to manage the communication with the industrial scale tableDialog This class encapsulates the methods and variables necessary to display the accumulated sales of all products in the database 13 13 15 16 17 19 18 Class Index Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen Chapter 3 File Index 3 1 File List Here is a list of all documented files with brief descriptions home pablo Developing Qt QtScale src aboutdialog
220. sses it to either discard it or extract from it the weight and stability values that the scale is sending over RS 232 This function is intended to work with the Microgram ie21 industrial scale from Microgram Instruments Espanola S A For more information on the ie21 data stream coding please consult the serialScale class documentation and the annex which includes the manufacturers datasheet Definition at line 309 of file serialscale cpp 4 10 3 8 int serialScale receiveData const char x data int maxData Receive data over serial This functions is non blocking This function is part of the low level functions of this class Parameters data Pointer to char vector to which to write data maxData Maximum number of data bytes to receive Returns Number of Bytes received Definition at line 168 of file serialscale cpp 4 10 3 9 void serialScale sendData const char data int length Send data over serial This functions is non blocking This function is part of the low level functions of this class Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 24 Class Documentation Parameters data Pointer to char vector from which to read data length Length in Bytes of data to be sent Definition at line 149 of file serialscale cpp 4 10 3 10 void serialScale update Try to get new measurement This is the function to be called to attempt to retrie
221. t UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX POLIT CNICA 7 DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE Factors to Consider The calculations for the budget of this project haven been performed under the assumption that the designer is an independent engineer However the number of hours devoted to the completion of a project of this nature and the price paid per hour of labour is different if the project was carried out by an engineering student or an experienced professional engineer The number of hours invested by a student will be higher than the number of hours invested by a professional engineer but the price per hour of labour is lower for a student than that of a professional engineer The calculation of time was made assuming that the designer is a professional engineer with experience in the sector reducing the time spent on design and construction but charging a superior price per hour rate As this is a final year engineering project neither VAT nor profit have been considered in the final cost of the project 3 Budget 3 PABLO CHOLBI ALENDA E EEEE SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o 4 3 Budget UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX 000 POLIT CNICA DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE 1 Material Cost First the total cost of the material us
222. t opt ti sdk am335x evm 06 00 00 00 qtserialport build make install w the library is present within the TI SDK but it has to be transferred to the target system linux devkit opt ti sdk am335x evm 06 00 00 00 qtserialport build scp src serialport libQtSerialPortE so 1 0 0 root 192 168 1 100 usr lib Finally some symbolic links must be created on the target system so that applications can resolve the dynamic library dependency correctly No root am335x evm ln s usr lib libQtSerialPortE so 1 0 0 usr lib libQtSerialPortE so root am335x evm s usr lib libOtSerialPortE so 1 0 0 usr lib libQtSerialPortE so 1 root am335x evm s usr lib libOtSerialPortE so 1 0 0 usr lib libOtSerialPortE so 1 0 w it is possible to compile binaries that depend on QtSerialPort on the host computer and executed on the target system To To use QtSerialPort in a Qt 4 project the following lines must be added to the project file CONFIG serialport use QtSerialPort in a Qt 5 project the following lines must be added to the project file QT serialport And the following lines must be added to the source code files that use functions structures or cla 52 sses from QtSerialPort include lt QtSerialPort QSerialPort gt include lt QtSerialPort QserialPortInfo gt 1 Report UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX
223. t at the moment ARM processors cannot achieve the performance levels of some x86 systems which still have the majority of the market share in laptops desktops and servers The following graph extracted from Ou 2012 compares the power efficiency with CPU utilization of a ARM A9 cluster and an Intel dual core x86 workstation for web server application at different file sizes ARM Intel y AF ARM ium Intel ium igh Intel igh T e T E T Energy Efficiency Request Joule T e T 0 20 40 60 80 100 CPU Utilization Level 96 Figure 1 1 Energy efficiency vs CPU Utilization Level Ou 2012 With CPU utilization higher than 2096 the ARM A9 processor presents an advantage in efficiency over Intel processor 1 Report 5 PABLO CHOLBI ALENDA gt SUPERVISOR DR NGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o The following graph extracted from Blem 2013 compares power consumption with performance of 2 ARM processors and 2 Intel x86 processors low perf 20 Power W 15 0 1 2 3 4 5 6 Performance BIPS Figure 1 2 Power Performance Trade offs Blem 2013 Regardless of ISA or energy efficiency high performance processors require more power than lower performance processors They follow well
224. t height gt 100 lt height gt lt rect gt lt property gt lt property name text gt lt string gt lt property gt lt widget gt lt widget class QToolButton name toolButton_4 gt lt property name geometry gt lt rect gt lt x gt 75 lt x gt lt y gt 148 lt y gt 41 lt width gt 100 lt width gt lt height gt 100 lt height gt lt rect gt lt property gt lt property name text gt lt string gt lt property gt lt property name checkable gt lt bool gt false lt bool gt lt property gt lt widget gt lt widget class QToolButton name toolButton_6 gt lt property name geometry gt lt rect gt lt x gt 305 lt x gt lt y gt 148 lt y gt lt width gt 100 lt width gt lt height gt 100 lt height gt lt rect gt lt property gt lt property name text gt lt string gt lt property gt lt widget gt lt widget class QPushButton name tableButton gt lt property name geometry gt lt rect gt lt x gt 10 lt x gt lt y gt 222 lt y gt lt width gt 40 lt width gt height gt 40 lt height gt lt rect gt lt property gt lt property name text gt lt string gt lt property gt lt widget gt lt widget gt lt widget gt lt layoutdefault spacing 6 margin 11 gt lt resources gt lt connections gt lt ui gt 42 16 messagedialog cpp file messagedialog cpp brief Class implementation of messageDialo
225. tabase The database file must have a table named verbatim gt Products Table ID integer primary key Name test Accumulated real Product 1 and variables necessary to Products with the following fields Icon blob Price real 1 Price 1 Accum RECHERCHER REPRE RR 18 ID 2 Product 2 PNG 2 Price 2 Accum endverbatim For more information please consult the project report class Database 1 public Database void setDatabase QString database errorCode openDatabase void closeDatabase List int list QIcon icon int ID QString name int ID float price int ID void updateAccum float weight int ID void clearAccum protected QSqlDatabase db lt Database object endif DATABASE H end of file KE KE RR AA E Eoo A AAA KA AAA AAA OR OR OR oe RR OR OR eoe eoe eoe OR IO eoe eoe oen 19 8 errorcode h file errorcode h brief Definition of errorCode data type This file contains the implementation of the enumerated data type date March 2014 author Pablo Cholbi This file is part of QtScale QtScale is free software you can redistribute it and or modify 4 under the terms of the GNU General Public License as published by the Free Software Foundation version 3 QtScale is distributed in the hope
226. tabase The Database class provides high level specialized functions that are needed to operate with the product database open close read and write e Command This class encapsulates the methods and variables necessary to parse the command line arguments that are supported The Command class parses an array of command line arguments and updates parameters accordingly e optionsDialog This class encapsulates the methods and variables necessary to display and execute configuration options The options supported are application restart application close system restart and system shutdown The optionsDialog class also provides the button to execute the aboutDialog e aboutDialog This class displays about information of the application The information is static and defined in the Ul file The aboutDialog class also provides the button to execute the licenseDialog e licenseDialog This class displays the license information of the application The information is static and defined in the UI file e productDialog This class encapsulates the methods and variables necessary to display product weight and information Once selected the product the data stream from the industrial scale is processed to read the weight and a product dialog is displayed with all the product information and the monetary value of the product being weighted e messageDialog This class encapsulates the methods and variables necessary to display error and informat
227. terial Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter s License You apply C No downstream restrictions You may not offer or impose any additional or different terms or conditions on or apply any Effective Technological Measures to the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material No endorsement Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are or that Your use of the Licensed Material is connected with or sponsored endorsed or granted official status by the Licensor or others designated to receive attribution as provided in Section 3 a 1 A i b Other rights 1 Moral rights such as the right of integrity are not licensed under this Public License nor are publicity privacy and or other similar personality rights however to the extent possible the Licensor waives and or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights but not otherwise 2 Patent and trademark rights are not licensed under this Public License 3 To the extent possible the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights whether directly or through
228. that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details Copyright C 2014 Pablo Cholbi Alenda You should have received a copy of the GNU General Public License along with QtScale If not see lt http www gnu org licenses gt ifndef ERRORCODE H define ERRORCODE H Qbrief Error code signaling data type This data type 13 used as a return in various functions to signal if the function exited successfully or if an error occurred If an error occurs errorCode also gives information on the error type such that it can be handled accordingly and or warning can be displayed printed enum errorCode 1 SUCCESS lt function exited successfully argumentError lt failed to parse command line argument databaseError lt failed to open close database queryError lt query failed to execute successfully serialError serial connection could not be established scaleError lt scale is sending unexpected values Calibration needed endif ERRORCODE_H end of file AS 20 9 licensedialog cpp file licensedialog cpp brief Class implementation of licenseDialog This class displays the license of the applic
229. the output of the command should inform that the adapter is now attached to ttyUSBx where x is an integer root am335x evm dmesg 4 2 2 6 Touchscreen Calibration and Test TI provides utilities to calibrate and test the touchscreen with the system image root am335x evm ts calibrate root am335x evm ts test The ts calibrate command prints the screen resolution This will be useful to create applications of exactly the screen size In this case the touchscreen has a resolution 480x272 pixels 4 3 Application Template To create a basic project for the target system the following steps have been followed Click on the File New File or Project from the top menubar Top right corner select Embedded Linux Template Then select QT Widget Application from the centre list e Click on Choose Name the project Template Sitara e Click Next Select the previously configured Sitara Kit e Click Next In the Class Information window select QWidget Base Class 26 1 Report UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX POLIT CNICA gt DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE e Click Next e Leave version control to lt none gt Click Finish With the project created only some minor configuration remains to be done The size of the widget should match the screen size of the device To do this inside the UI edito
230. the license information of the application The information is static and defined in the UI file Definition at line 40 of file licensedialog h 4 4 2 Constructor amp Destructor Documentation 4 4 2 1 licenseDialog licenseDialog QWidget parent 0 explicit Class constructor of licenseDialog object This function creates an instance of licenseDialog class and initializes the widget Definition at line 38 of file licensedialog cpp 4 4 2 2 licenseDialog licenseDialog Class destructor of licenseDialog object This function destroys an instance of licenseDialog class Definition at line 58 of file licensedialog cpp The documentation for this class was generated from the following files home pablo Developing Qt QtScale src licensedialog h home pablo Developing Qt QtScale src licensedialog cpp 45 MainWindow Class Reference this class encapsulates the methods and variables necesary to display the main product selection window include lt mainwindow h gt Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 14 Class Documentation Inheritance diagram for MainWindow QMainWindow MainWindow Public Member Functions MainWindow QWidget 0 Class constructor of MainWindow object MainWindow Class destructor of MainWindow object void setup QApplication Setup main window void redraw Redraw main window Protected Attributes int page Curr
231. the script as much as possible during boot root am335x evm update rc d QtScale init sh defaults 99 Now the application will start automatically on boot If for some reason it is necessary to stop the script from executing the following command should be executed root am335x evm update rc d f QtScale init sh remove 46 1 Report UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX O CNICA DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE 5 2 SQLite Database 5 2 1 Database Design The specifications demand for a database that has at least the following fields image name index price and accumulated sales This information that the client has provided narrows down the adopted solution for the database design but nevertheless it is good practice to follow the standard design progress Determine the Purpose of the Database The database is to be used as a local single file database for an embedded application when it is not expected to have more than one instance reading and or writing in the database file The database is intended to store product information and accumulated sales values Find and Organize the Information Required As stated earlier the data to be stored in the database has already been defined but not the data type In this section each data point will be given a data type according to the nature of the data Data Index Name Image Price Accu
232. thors of that material by anyone who conveys the material or modified versions of it with contractual assumptions of liability to the recipient for any liability that these contractual assumptions directly impose on those licensors and authors other non permissive additional terms are considered further restrictions within the meaning of section 10 If the Program as you received it or any part of it contains a notice stating that it is governed by this License along with a term that is a further restriction you may remove that term If a license document contains a further restriction but permits relicensing or conveying under this License you may add to a covered work material governed by the terms of that license document provided that the further restriction does not survive such relicensing or conveying If you add terms to a covered work in accord with this section you must place in the relevant source files a statement of the additional terms that apply to those files or a notice indicating where to find the applicable terms Additional terms permissive or non permissive may be stated in the form of a separately written license or stated as exceptions the above requirements apply either way 8 Termination You may not propagate or modify a covered work except as expressly provided under this License Any attempt otherwise to propagate or modify it is void and will automatically terminate your rights under this Licen
233. tion time the error could be corrected without stopping the application For these errors a warning windows shall open here the user shall need to acknowledged the error before having the application can continue to execute If these errors are encountered however the application shall restrict the operations the user can perform with regard the affected modules or subsystems For example if USB to serial converter is not connected to the system when the application attempts to open the port the warning window shall be displayed but even if the warning is acknowledged the user shall not be allowed to register a sale Finally to simplify the processing of these five errors an enumerated data type and an a class shall be defined The enumerated data type called errorCode shall contain the five errors and a success This data type shall be used as a return type to some functions to signal if they were executed without error or if an error occurred The benign error acknowledgement window shall be implemented in a class and the set up function shall take as input an errorCode enumerated data type Depending on the value of the input different messages shall be displayed on screen 5 1 2 Application Structure The structure of the application in terms of the classes that compose it is described in the diagram below Note that the diagram only represents the classes that where created for this project and not the classes that C or
234. tions eoe tere Lo Die 29 51 2 Application tucan 30 5 1 3 Application BIoweharts oe dte eo o i oe ese NEU NIRE Rand oed 32 SN IBN REM AS 32 deb Obra 33 AAA 35 37 5 1525 Table Doa 39 5 1 3 6 Options Dialog dol 40 513 7 About Dialog e edere e et ee ne ROO 41 Diceuse A E eU erba 42 5 1 4 Text Fonts for 2 43 Sob Applicaton start om AAA 44 5 2 SO I 1te Databadse iri 47 552 Databdse DTi aee et ee eee rec ren TE 47 5 22 Database CIAO red aM 48 5 2 3 Database Management 50 dT POTL 51 6 Conclusions and Future WOTE rad il 53 7 BIO e ee tr ere rte ere ab ev desse ive 55 2 1 Report fi UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM USING LINUX DE VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE Illustration Index Figure 1 1 Energy efficiency vs CPU Utilization Level Ou 2012 eee 5 Figure 1 2 Power Performance Trade offs 2013 enne tenete 6 Figure 3 1 1
235. tive to the previous process if the file manager on the host computer supports it it is possible to start and SFTP session with the target system and manually create and transfer the files through a graphical file manager To do this the file manager must be opened and the following line typed into the address bar sftp root 192 168 1 100 2 2 Database Management This section refers to the management and updating of existing database records New records are recommended to be inserted according the method described in the project report as it is the only one where the image insertion has been tested to work successfully For the management of the database various options are available but for simplicity of use a GUI application is recommended A popular standalone open source cross platform GUI application for this purpose is SQLite Database Browser SQLite Database Browser can be obtained from lt http sourceforge net projects sqlitebrowser gt However there are many other applications that will perform the required task successfully This application is intuitive and easy to use even for novice users and it allows to browse and modify databases without SQL queries Although it does support SQL query input for the users who prefer it Please note that the database should never be modified while in use by the application Sc Database Browser home pablo Dropbox Pablo File Edit View H
236. to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program 13 Use with the GNU Affero General Public License Notwithstanding any other provision of this License you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work and to convey the resulting work The terms of this License will continue to apply to the part which is the covered work but the special requirements of the GNU Affero General Public License section 13 concerning interaction through a network will apply to the combination as such 14 Revised Versions of this License The Free Software Foundation may publish revised and or new versions of the GNU General Public License from time to time Such new versions will be similar in spirit to the present version but may differ in detail to address new problems or concerns Each version is given a distinguishing version number If the Program specifies that a certain numbered version of the GNU General Public License or any later version applies to it you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation If the Program does not specify a version number of
237. ton closes the current instance of QtScale and restarts the target system 4 Shutdown system This closes the current instance of QtScale and shuts down the target system 5 About This button launches the about dialog More information on this in the dedicated dialog subsection section 3 7 6 Close button This button exist from the current dialog and returns to the main window 12 4 User Manual A UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX TII E De VALENCIA APPLICATION FOR AN INDUSTRIAL SCALE 3 7 About Dialog QtScale 1 00 GUI application for bulk product commerce by weight using an industrial RS 232 scale This application is intended to work with the Microgram ie21 scale from Microgram Instruments Espa ola S A Pablo Cholbi Alenda Copyright 2014 Figure 3 7 1 About Dialog Interface This dialog displays information on the QtScale application The different parts that constitute this dialog are explains below 1 Product table This part of the window displays a scrollable table representing th product ID the product name and the accumulated sales of all the products in the database in units of mass Products are ordered by ID number 2 License This button launches the license dialog More information on this in the dedicated dialog subsection section 3 8 e 3 Close button This button exist from the current dialog and returns to the options dia
238. tring gt lt property gt widget class QLabel name iconLabel gt lt property name geometry gt lt rect gt lt x gt 20 lt x gt lt gt 20 lt gt lt width gt 150 lt width gt lt height gt 150 lt height gt lt rect gt lt property gt lt property name text gt lt string gt lt property gt lt widget gt widget class QPushButton name buyButton gt lt property name geometry gt lt rect gt lt x gt 360 lt x gt lt y gt 202 lt y gt lt width gt 100 lt width gt lt height gt 50 lt height gt lt rect gt lt property gt lt property name font gt lt font gt lt pointsize gt 12 lt pointsize gt lt font gt lt property gt lt property name text gt lt string gt Buy lt string gt lt property gt lt widget gt lt widget class QPushButton name cancelButton gt lt property name geometry gt lt rect gt lt x gt 20 lt x gt lt y gt 202 lt y gt lt width gt 100 lt width gt lt height gt 50 lt height gt lt rect gt lt property gt 64 lt property name font gt lt font gt lt pointsize gt 12 lt pointsize gt lt font gt lt property gt lt property name text gt lt string gt Cancel lt string gt lt property gt lt widget gt lt widget class QLabel name idTextLabel gt lt property name geometry gt lt rect gt lt x gt 260 lt x gt lt y gt 20 lt y gt lt width gt 90 lt width gt lt height gt 3
239. ts you permission to propagate or modify any covered work These actions infringe copyright if you do not accept this License Therefore by modifying or propagating a covered work you indicate your acceptance of this License to do so 10 Automatic Licensing of Downstream Recipients Each time you convey a covered work the recipient automatically receives a license from the original licensors to run modify and propagate that work subject to this License You are not responsible for enforcing compliance by third parties with this License An entity transaction is a transaction transferring control of an organization or substantially all assets of one or subdividing an organization or merging organizations If propagation of a covered work results from an entity transaction each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party s predecessor in interest had or could give under the previous paragraph plus a right to possession of the Corresponding Source of the work from the predecessor in interest if the predecessor has it or can get it with reasonable efforts You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License For example you may not impose a license fee royalty or other charge for exercise of rights granted under this License and you may not initiate litigation including a cross claim or counterclaim in a lawsu
240. uced where the Licensed Material is synched in timed relation with a moving image Adapter s License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License BY SA Compatible License means a license listed at creativecommons org compatiblelicenses approved by Creative Commons as essentially the equivalent of this Public License Copyright and Similar Rights means copyright and or similar rights closely related to copyright including without limitation performance broadcast sound recording and Sui Generis Database Rights without regard to how the rights are labeled or categorized For purposes of this Public License the rights specified in Section 2 b 1 2 are not Copyright and Similar Rights Effective Technological Measures means those measures that in the absence of proper authority may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20 1996 and or similar international agreements Exceptions and Limitations means fair use fair dealing and or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material License Elements means the license attributes listed in the name of a Creative Commons Public License The License Elements of this Public License are Attribution and ShareAlike L
241. ule is composed of the source code file aboutdialog cpp the C header file aboutdialog h and the Qt form aboutdialog ui The flow diagram for this module is as follows aboutDialog Initialize UI Show information Button press licenseDialog Figure 5 1 14 aboutDialog Flowchart Cancel The Qt form aboutdialog ui provides the GUI for this module a screenshot of which is provided below QtScale 1 00 GUI application for bulk product commerce by weight using an industrial RS 232 scale This application is intended to work with the Microgram ie21 scale from Microgram Instruments Espanola S A Pablo Cholbi Alenda Copyright 2014 License Close Figure 5 1 15 aboutDialog UI 1 Report 41 PABLO CHOLBI ALENDA gt SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o 5 1 3 8 License Dialog The licenseDialog module is composed of the source code file licensedialog cpp the C header file licensedialog h and the Qt form licensedialog ui The flow diagram for this module is as follows licenseDialog Initialize UI Show License Button press Cancel Figure 5 1 16 licenseDialog Flowchart The Qt form licensedialog ui provides the GUI for this module a screenshot of which is provided below Copyright C 2014 Pablo Cholbi Alenda This program is free software you can redistribute it and or modify it under the terms o
242. ve 1 1 2x Icons Peach png 1 05 0 0 sqlite3 QtScale sqlite user debian echo INSERT INTO Products ID Name Icon Price Accumulated values 13 Orange X hexdump ve 1 1 2x Icons Orange png 0 70 0 0 sqlite3 QtScale sqlite user debian echo INSERT INTO Products ID Name Icon Price Accumulated values 15 Lemon X hexdump ve 1 1 2x Icons Lemon png 1 75 0 0 sqlite3 QtScale sqlite user debian echo INSERT INTO Products ID Name Icon Price Accumulated values 22 Grape X hexdump ve 1 1 2x Icons Grape png 3 95 0 0 sqlite3 QtScale sqlite user debian echo INSERT INTO Products ID Name Icon Price Accumulated 1 Report 49 PABLO CHOLBI ALENDA SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o values 23 Cherry X hexdump ve 1 1 2x Icons Cherry png 3 70 0 0 sqlite3 QtScale sqlite user debian echo INSERT INTO Products ID Name Icon Price Accumulated values 25 Banana X hexdump ve 1 1 2x Icons Banana png 1 40 0 0 sqlite3 QtScale sqlite user debian echo INSERT INTO Products ID Name Icon Price Accumulated values 37 Apple X hexdump ve 1 1 2x Icons Apple png 1 60 0 0 sqlite3 QtScale sqlite With this the database has been created and all the data has been inserted This database would be a valid database ready to be used by the
243. ve and process a new weight measurement sent by the scale over RS 232 When the function is called data Bytes received since the last call are added to the buffer Then the buffer is evaluated for valid data streams If a valid stream is found and processed it is removed from the buffer This function is intended to work with the Microgram ie21 industrial scale from Microgram Instruments Espanola S A For more information on the ie21 data stream coding please consult the serialScale class documentation and the annex which includes the manufacturers datasheet This function depens on buffScan and process Definition at line 210 of file serialscale cpp The documentation for this class was generated from the following files home pablo Developing Qt QtScale src serialscale h home pablo Developing Qt QtScale src serialscale cpp 4 11 tableDialog Class Reference this class encapsulates the methods and variables necessary to display the accumulated sales of all products in the database include lt tabledialog h gt Inheritance diagram for tableDialog tableDialog Public Member Functions tableDialog QWidget parent 0 Class constructor of tabletDialog object tableDialog Class destructor of tableDialog object 4 11 1 Detailed Description this class encapsulates the methods and variables necessary to display the accumulated sales of all products in the database Definition at line 43 of file tabled
244. x processor family 2 Specifications 5 PABLO CHOLBI ALENDA SUPERVISOR DR ANGEL PERLES IVARS Escuela T cnica Superior de Ingenier a del Dise o 4 Software Package Conditions 4 1 Conditions of Package Content The package consists of a CD which contains the project files documentation and the source code of the application The source code is written in C and a Qt C environment is necessary to compile it 4 2 Conditions of Package Maintenance The software package does not requires a review by a technician except for changes in the configuration of the hardware and or software In accordance with the license under which the software is distributed with the appropriate citation a technician appointed by the client may modify the source code The client is responsible for all the cost derived from the modification of the software 4 3 Conditions of Maintenance of the Optical Support The conditions detailed here are usual guidelines for archival of optical media The CD shall be kept away form strong magnetic fields The CD shall not be exposed to temperatures outside the range between 10 C and 60 C The bottom of the CD shall not be exposed to contact with the user s hands or exposed to surfaces other than the CD reader to prevent accidental data loss 6 2 Specifications UNIVERSITAT QT SET UP FOR TEXAS INSTRUMENTS AM335X ARM CORTEX A8 USING LINUX O CNICA DE VALENCIA APPLICATION FOR AN I
245. xt png ui gt forwardButton gt setIconSize QSize 32 32 ui gt optionsButton gt setIcon QIcon Buttons Buttons options png ui gt optionsButton gt setIconSize QSize 32 32 ui gt tableButton gt setIcon QIcon Buttons Buttons calculator png ui gt tableButton gt setIconSize QSize 32 32 brief Class destructor of MainWindow object This function destroys an instance of MainWindow class MainWindow MainWindow 1 delete ui F Obrief Setup main window This function attempts to parse incoming command line arguments and open the database specified by these arguments or default Application exits with fail status if any of these actions fail This function must be called after the class object has been created and before the dialog is executed Oparam a Pointer to Application object void MainWindow setup QApplication 1 parse arguments Command cmd if cmd parseArguments a gt arguments SUCCESS 1 exit EXIT_FAILURE open database db setDatabase cmd databasePath if db openDatabase SUCCESS exit EXIT_FAILURE 30 vector db list redraw brief Redraw main window This function updates the main window interface according to the information recorded on the database and the current page that ts being viewed Up to 6 products can be viewed at a time void MainWindow redraw 1
246. ymbol for weight unit 5 17 1 Detailed Description Class implementation of productDialog This class displays product information and weighs the product Date March 2014 Author Pablo Cholbi Definition in file productdialog cpp Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 5 18 home pablo Developing Qt QtScale src productdialog h File Reference 37 5 18 home pablo Developing Qt GtScale src productdialog h File Reference Class definition of productDialog include lt QDialog gt include lt QTimer gt include productstruct h include serialscale h Classes class productDialog this class encapsulates the methods and variables necessary to display product weight and information 5 18 1 Detailed Description Class definition of productDialog Date March 2014 Author Pablo Cholbi Definition in file productdialog h 5 19 home pablo Developing Qt GtScale src productstruct h File Reference Data structure type productStruct include lt QIcon gt include lt QString gt include messagedialog h Classes struct productStruct Product data structure 5 19 1 Detailed Description Data structure type productStruct This file contains the implementation of the productStruct data structure Date March 2014 Author Pablo Cholbi Definition in file productstruct h Generated on Tue May 6 2014 19 45 48 for QtScale by Doxygen 38 File Documentation 5 20
Download Pdf Manuals
Related Search
Related Contents
ASUS Pro Series E810-B0184 MANUEL D`UTILISATEUR Cycle Analyst Bedienungsanleitung Istruzioni JULIA 2007-06 (F07010620) - IT-EN-RO linx user guide - Appleton Audiology Associates X-AOM add-on module - X-Cart Eglo 84001 MX Administrator`s Manual - NuSound Technology Group Copyright © All rights reserved.
Failed to retrieve file