The next several sections describe a very simple SDT called "SimpleSdt", which is designed both for introducing SDT designers to the basic features of a sensor data type definition, and as a template you can use as a basis for developing your own sensor data types.
Before proceeding, you should have downloaded and built Hackystat from sources, as described in Chapter 8, Hackystat server installation. It will also be helpful to review the material on the Hackystat build system in Chapter 13, Anatomy of the Hackystat build system, as well as the instructions on how to create new modules in Chapter 14, Creating new Hackystat modules.
In addition to the standard "hackystat" subversion repository, which contains the public modules, the Hackystat Project also maintains a "hackystat-doc" repository, which contains "documentation" modules such as hackyDoc_SimpleSdt. You should checkout the hackyDoc_SimpleSdt module into a directory called hackyDoc_SimpleSdt in your local directory containing the public Hackystat modules. You can access the latest release of the hackyDoc_SimpleSdt module using the following Subversion URL:
svn://www.hackystat.org/hackystat-doc/hackyDoc_SimpleSdt/trunk
You should checkout the hackyDoc_SimpleSdt module into the same directory containing the Hackystat public source modules. When finished, you should have a directory structure similar to the following:
: :
hackyCore_Statistics/
hackyCore_Telemetry/
hackyDoc_SimpleSdt/
docbook/..
src/..
local.build.xml
hackySdt_Activity/
: :
After downloading the hackyDoc_SimpleSdt module, you must invoke AutoConfig as follows so that the Hackystat build system is aware of this module:
C:\svn\hackyCore_Build>ant -f autoconfig.build.xml
Buildfile: autoconfig.build.xml
run:
[mkdir] Created dir: C:\svn\hackyCore_Build\build\autoconfig
[echo] [AutoConfig] Generated modules.build.xml and sample.hackystat.build.properties.
autoconfig.build.default:
BUILD SUCCESSFUL
Total time: 1 second
The best "baseline" configuration for hackyDoc_SimpleSdt module is the "Core" subsystem (i.e. the modules whose names begin with "hackyCore"), as well as hackyDoc_SimpleSdt itself. Thus, your hackystat.build.properties file will have the following uncommented lines:
hackyCore_Build.available=true hackyCore_Common.available=true hackyCore_Installer.available=true hackyCore_Kernel.available=true hackyCore_Report.available=true hackyCore_Statistics.available=true hackyCore_Telemetry.available=true hackyDoc_SimpleSdt.available=true
There are various ways to validate that you have installed hackyDoc_SimpleSdt successfully. First, you should perform a "freshStart all.junit", which should run without error as illustrated below:
C:\svn\hackyCore_Build>ant -q freshStart all.junit
[echo] (09:55:18) Completed hackyCore_Build.checkModuleAvailability
[echo] (09:55:19) Completed hackyCore_Build.hotUndeployHackystat
[echo] (09:55:37) Completed all.checkstyle
[echo] (09:55:45) Completed all.compile
[echo] (09:55:51) Completed all.install.pre-sensorshell
[echo] (09:55:55) Completed hackyCore_Build.unjarSensorShellFiles
[echo] (09:55:58) Completed hackyCore_Build.installSensorShell
[echo] (09:56:12) Completed all.install.post-sensorshell
[echo] (09:56:12) Completed hackyCore_Build.deployTestData
[echo] (09:56:13) Completed hackyCore_Build.hotDeployHackystat
[echo] (09:56:15) Completed hackyCore_Build.deploySoap
[echo] (09:56:24) Completed hackyCore_Kernel.junit.
[echo] (09:56:25) Completed hackyCore_Statistics.junit.
[echo] (09:56:33) Completed hackyCore_Report.junit.
[echo] (09:56:39) Completed hackyCore_Common.junit.
[echo] (09:56:44) Completed hackyCore_Telemetry.junit.
[echo] (09:56:50) Completed hackyCore_Installer.junit.
[echo] (09:56:52) Completed hackyDoc_SimpleSdt.junit.
[echo] (09:56:52) Completed all.junitReport
[echo] (09:56:52) Completed all.junit
BUILD SUCCESSFUL
Total time: 1 minute 37 seconds
You can also check to see that SimpleSdt sensor data exists on your local server as a result of the testing process. Using the List Sensor Data command on the Extras page for the testdataset user, you should see output similar to that illustrated in Figure 15.2, “ The test data provided in hackyDoc_SimpleSdt ”
The remainder of this chapter will assume that you have successfully downloaded and installed hackyDoc_SimpleSdt.