Software

From tiberious.org

Contents

Version Control

I have setup a subversion server at: svn.tiberious.org (82.136.48.61)

a few programs that can access this are:

to access the repositary, enter in svn://svn.tiberious.org as the server, it should ask you for a username and password, you can use:

username: zim
password: 1nv4d3r5

or, all of you have the an individual login of: <name>,1nv4d3r5

the main software area is trunk , this is where all edits to the software go. When we are 'happy' with a version we can create a tags and give it a version (ie 0.1), and that will be stored forever. the branches area is used to create test programs and for branching off from the main program to work on a particular bit of code

Quick tutorials for TortoiseSVN

Setting up SVN

  • Download TortoiseSVN from the link above, Install, and reboot when it asks (grrr!)
  • Select an empty folder on the hard drive.
  • Right click on the folder and select Checkout SVN.
    • Enter in 'svn://svn.tiberious.org' in the repository name.
    • Leave everything else done and Click OK.
    • It will ask you for a username and password, for now you can use u:zim, p:1nv4d3r5
    • Select save password and Click OK and it should run through downloading everything.
  • The repository is done, and u will get a nice green tick on the folder.
  • In the folder there will be 3 folders, 'branches', 'tags' and 'trunk'.
  • trunk is the part that we are intrested in, this is the 'current' version. Branches will contain any test programs that we wish to create, and tags creates specific numbered releases.


Starting programming

  • Click on the main repository folder and right click, and select Update SVN. (The folder will quite likely have a red ! indicating that it is out of date with the server)
  • This will update all the files in its subdirectory.
  • And start programming


Finishing a section

  • Once you have finishing coding a part up, you can 'comit' the changes to the repository.
  • Click on the main repository folder (will have a red !) and select Commit SVN, this will update the server and give a revision number


Fixing a conflict

A Conflict is a state where you have editied your copy of a file, and someone else has editied the same file on the same lines

  • select the file with the confict problem
  • right click and click on Edit Conflicts
  • you will see a window with 3 boxes, with related headers.
    • the bottom one will show you the programs attempted merge, the red parts on the left bar will indicate conflics, scroll down till you find them.
    • in one of the top 2 boxes, decided which file/selection of code to use and right click on it, and select the appropriate option.

Software

To program the code i am using Vistual C# 2005 Beta 2 from: msdn express (free to use) and downloads .NET 2.0 for you as well. I also have it on cd if anyone needs it

General code

Class structure

The class structure will look as follows (header comments are not neccessary, but are nice).

{PROJECTNAME} is a 'variable' that we put to refer to the project name (as of yet undecided) as well as {CLASSNAME} this is the what the class will be called, for example for serial i used 'Serial'

/*
 * Project:     MEng Robot Rally 2005
 * University:  Reading
 * Department:  School of Systems Enginnering
 * Team:        1
 * Created:     October 2005
 * 
 * Notes:       Bla
 *              
 * Copyright:   More Bla (any referenced work in here)
 * 
 */
// example region
#region Namespace Inclusions
using System;
using System.Data;
using System.Text;
using System.IO.Ports;
using System.Windows.Forms;
using System.ComponentModel;
using System.Collections.Generic;
#endregion
namespace {PROJECTNAME}
{
    #region Public Enumerators
    // Enumerators in here, example:
    public enum DataMode { Text, Hex }
    #endregion

    public class {CLASSNAME}
    {
        #region Variables
    
        // example variable
        public SerialPort cport = new SerialPort();
       
        #endregion
     
        #region Constructor/Destructor
        public {CLASSNAME}()
        {
            // on load
        }
       
        ~{CLASSNAME}()
        {
            // on quit/unload
            // to clean up memory
        }
    }
}