Tutorial Day 1 Preparation

Create an Initial Directory Structure on Your Hard Drive

Follow these directions to create the directory structure on your hard drive that is necessary to develop a driver.

Anywhere that this instructs you to create something called "YourDriver", replace "YourDriver" with the name of your driver. For example, if you have decided to name your driver the "ultimate driver", then replace "yourDriver" with "ultimateDriver" or "YourDriver" with "UltimateDriver". Follow the same capitalization format too. Replace "yourCompany" with the name of your company. For example, if you are developing this driver for a company called Acme Co, then replace "yourCompany" with "acmeCo" and "YourCompany" with "AcmeCo". Follow the same capitalization format here too. Replace "jarfilename" with the name that you wish to assign to the resulting jar file when your driver is compiled. For example, if you want your driver's jar file to be named "ultimate.jar" then replace "jarFileName" with "ultimate".

  1. Make a directory somewhere named jarFileName
  2. Add two empty text files named build.xml and module-include.xml to the "jarFileName" folder.
  3. Add a folder named src to the jarFileName folder.
  4. Add a folder named com to the jarFileName/src folder.

  5. In java terminology, com means commercial.
  6. Add a folder named yourCompany to the jarFileName/src/com folder.
  7. Add a folder named yourDriver to the jarFileName/src/com/yourCompany folder.
  8. Add a folder named identify To the jarFileName/src/com/yourCompany/yourDriver folder.
  9. Add a folder named point To the jarFileName/src/com/yourCompany/yourDriver folder.
  10. Add a folder named discover To the jarFileName/src/com/yourCompany/yourDriver folder.
  11. Add a folder named comm To the jarFileName/src/com/yourCompany/yourDriver folder.
    In Niagara-AX developer terminology, comm (with two m's) means communication.
  12. Add a folder named req to the jarFileName/src/com/yourCompany/yourDriver/comm folder.

  13. In Niagara-AX developer terminology, req means request or requests.
  14. Add a folder named rsp to the jarFileName/src/com/yourCompany/yourDriver/comm Folder.

  15. In Niagara-AX developer terminology, rsp means response or responses.

Create an Initial build.xml File

Next, open the empty build.xml file and add the following (replacing the text yourDriver, jarFileName and yourCompany as previously described). Please replace yd with the lower-case version of your driver's initials. For example, if you decide to name your driver the ultimate driver then please replace yd with ud.

Please consider changing the description attribute to a brief sentence that describes your driver.


<!-- Module Build File -->

<module
  name = "jarFileName"
  bajaVersion="3.2"
  preferredSymbol = "yd"
  description = "A driver built on the development driver framework."
  vendor = "yourCompany"
>
  <!-- Dependencies -->
  <dependency name="alarm" vendor="Tridium" vendorVersion="3.0" />
  <dependency name="baja" vendor="Tridium" vendorVersion="3.0" />
  <dependency name="driver" vendor="Tridium" vendorVersion="3.0" />
  <dependency name="devDriver" vendor="Tridium" vendorVersion="3.2" />
  <dependency name="platform" vendor="Tridium" vendorVersion="3.0" />
  <dependency name="control" vendor="Tridium" vendorVersion="3.0" />

  <!-- Packages -->
  <package name="com.yourCompany.yourDriver" doc="true"/>
  <package name="com.yourCompany.yourDriver.comm" doc="true"/>
  <package name="com.yourCompany.yourDriver.comm.req" doc="true"/>
  <package name="com.yourCompany.yourDriver.comm.rsp" doc="true"/>
  <package name="com.yourCompany.yourDriver.discover" doc="true"/>
  <package name="com.yourCompany.yourDriver.identify" doc="true"/>
  <package name="com.yourCompany.yourDriver.point" doc="true"/>
</module>

Please remember to save the file!

Create an Initial module-include.xml File

Next, open the empty module-include.xml file and add the following:


<!-- Module Include File -->

<!-- Types -->
<types>
  <!-- Type Example:
  <type name="YourClass" class="com.yourDriver.BYourClass"/>
  -->
</types>