= Setup for Software Development = === About === This document will discuss in detail how to setup your environment to program the Cardinal 825 Digital Weight Indicator. === Features of the Cardinal 825 Programming Environment === * Subversion integration for instant access to the latest source code. * Full featured Eclipse IDE which is quickly becoming the standard for developers everywhere. * Debugging capabilities for many application features using simulated 825 indicator. === Required Files === Download and install VMWare player free virtual machine. Download the 825 development environment installer. This requires a reliable and fast internet connection and may take many hours or days to complete due to the size of the development VMWare image. If you have trouble downloading or do not have an internet connection, please contact your Cardinal dealer for information on getting the Cardinal 825 development kit. * [http://www.vmware.com/products/player/ VMware Player] - Required to run the Cardinal Fedora 825 Programming Environment. * Use an FTP client program such as !FileZilla or !WinSCP to download the development environment VMware image from Server: tech.825spectrum.com Security: FTP over TLS User: spectrum Password: (Contact your Cardinal Representative) [[Image(FileZilla_spectrum.png)]] Be sure to select "Use explicit FTP over TLS". [[Image(FileZilla_spectrum_cert.png)]] Click "OK" to accept the certificate. After the connection is complete the file "Dev825.7z" should be visible. Right-click on the file and select "Download" [[Image(FileZilla_spectrum_files.png)]] [[Image(FileZilla_spectrum_download.png)]] The download may take a long time depending on the speed of your internet connection. [[Image(FileZilla_spectrum_progress2.png)]] === Installing the Environment === 1. Install VMware Player. 2. Follow the steps listed choosing the default values to install. [[Image(screenshot.1.jpg)]] [[Image(screenshot.2.jpg)]] [[Image(screenshot.3.jpg)]] [[Image(screenshot.4.jpg)]] [[Image(screenshot.5.jpg)]] [[Image(screenshot.6.jpg)]] 3. Reboot your computer if required. [[Image(screenshot.7.jpg)]] 4. Install the Fedora development image. The downloadable installer will install it by default into My Documents/My Virtual Machines/. Once installed, we strongly recommend updating all of the projects and libraries that are provided through subversion to ensure that all source code is up to date. See the section below titled '''Subversion''' for information on how to do this. === Starting the Environment === 1. Start VMware Player by going to Start -> Programs -> VMware and choosing VMware Player [[Image(screenshot.9.jpg)]] 2. Start the Cardinal 825 Programming Environment by choosing Open and choosing the '''Dev825.vmx''' file from the directory you extracted it to in "Installing the Environment step 4". [[Image(screenshot.10.jpg)]] 3. VMware will start. [[Image(screenshot.12.jpg)]] 4. If prompted by VMWare player about the image being moved, then select '''I copied it''' from the dialog window. 5. VMware will power up Fedora Linux [[Image(screenshot.15.jpg)]] 6. Login by clicking on '''user''', entering password '''123456''' and clicking '''Login'''. [[Image(screenshot.16.jpg)]] [[Image(screenshot.17.jpg)]] 7. The Cardinal 825 Programming Environment will start automatically. [[Image(screenshot.18.jpg)]] === Using the Environment === ==== Welcome Screen ==== The welcome screen gives you basic information about the Eclipse IDE. You can choose to view the information by clicking on the individual images or simply close it by pressing the X button in the corner. [[Image(screenshot.29.jpg)]] ==== Project Explorer ==== The project explorer gives you an overview of projects that are in your workspace. The Cardinal 825 Programming Environment is set to use /home/user/Workspace as the default workspace. You can change this by selecting File > Switch Workspace. [[Image(screenshot.19.jpg)]] On the initial startup you will notice projects and libraries which have been provided as examples and tools for 825 application development. * chkwgh - Checkweigher * dfc - DFC Batcher * ids - Truck / ID Storage * indicator - Basic indicator application * lib825 - 825 library * lib825ev - 825 library for event style applications * libapp - application library (deprecated) * libsql - SQL database library * mscale - Multi-scale ==== Task Repositories ==== Task repositories list the available bug tracking repositories. The Cardinal 825 Trac repository has been setup for you but you will need to enter your individual username and password for the Trac site (the one you used to login to the Wiki). [[Image(screenshot.20.jpg)]] 1. Right-click on '''Cardinal 825 Trac''' and choose '''Properties'''. [[Image(screenshot.21.jpg)]] 2. Uncheck anonymous and enter your validation credentials. When you are finished, press Validate Settings in the bottom-left. [[Image(screenshot.22.jpg)]] [[Image(screenshot.23.jpg)]] 3. If you receive no errors you can press the "Save Password" checkbox and press Finish to save the settings. ==== Task Queries ==== Task queries allows you to generate custom queries to view tickets for the Cardinal 825. 1. Right click on the '''Cardinal 825 Trac''' repository and choose '''New Query...'''. [[Image(screenshot.24.jpg)]] 2. We're going to create a query that will show all open tickets for the 825. Enter the information as shown in the screenshot and for '''Status''' choose all available except for closed. Press finish when you are done. [[Image(screenshot.33.jpg)]] 3. A notification will appear to show you new tickets are available. This works fine but if you are forgetful like me you need a more permanent solution. [[Image(screenshot.25.jpg)]] 4. Choose Window -> Show View -> Other... [[Image(screenshot.27.jpg)]] 5. Choose '''Task List''' from the '''Tasks''' folder and press OK. [[Image(screenshot.34.jpg)]] 6. Task List will now display on the bottom pane. Let's click and drag it next to the Task Repositories on the top-left. [[Image(screenshot.30.jpg)]] [[Image(screenshot.31.jpg)]] 7. You will now have two categories. One is '''Uncategorized''' which is all tickets that we do not have a query for. The other is named '''*''' which is the query we just created. That's not a very intuitive name so let's rename it. Right-click on the '''*''' and choose rename. Enter '''All Tickets''' and press enter. [[Image(screenshot.32.jpg)]] ==== Subversion ==== Every project distributed with the Cardinal 825 Programming Environment comes ''attached'' to a Subversion repository. Subversion repositories allow you to get the most up to date source code with the click of a button. 1. Right-click on the project or library and choose Team -> Update. [[Image(screenshot.35.jpg)]] 2. You now have the latest available source code for the project. Cardinal recommends creating your own repositories for your projects. For more information on doing so please see [http://www.google.com/search?rlz=1C1GGLS_enUS313US313&sourceid=chrome&ie=UTF-8&q=subversion+guide Google's Listing on Subversion Guides]. ==== Hyper-V ==== If Hyper-V is enabled it will have to be disabled before VMWare may be used. Hyper-V can be removed from the control panel. This will require a reboot. If the computer is used for other things that may require Hyper-V a !PowerShell script may be used to switch Hyper-V on / off {{{ SetHyper-V.ps1 param([string]$state='Off') 'Set Hyper-V ' + $state $lines = bcdedit ForEach($line in $lines) { $pos = $line.IndexOf(' ') If($pos -gt 0) { $prompt = $line.Substring(0, $pos) $curstate = $line.Substring($pos).Trim() If($prompt -eq 'hypervisorlaunchtype') { '[' + $prompt + '] = [' + $curstate + ']' If($curstate -ne $state) { 'Setting hypervisorlauchtype to ' + $state $result = bcdedit /set hypervisorlaunchtype $state 'Result = [' + $result + ']' If($result -eq 'The operation completed successfully.') { 'Restarting in two seconds' Start-Sleep -s 2 Restart-Computer } Else { 'Error setting state' Start-Sleep -s 5 } } Else { 'Hypervisor launch type is already ' + $state Start-Sleep -s 5 } } } } }}} Create a folder C:\scripts if it does not already exist and add this Powershell script to the folder. Create a shortcut on the desktop named "Hyper-V On" and set it the Target to: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe C:\Scripts\SetHyper-V.ps1 -state Auto Create a shortcut on the desktop named "Hyper-V Off" and set it the Target to: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe C:\Scripts\SetHyper-V.ps1 -state Off