Hatchery Information System


IMetric

All data relevant to fish hatcheries can be separated into two categories which I call traits and metrics. All the trait information relevant to fish hatcheries are part of the Move Web in the Fish Business Object model, but metrics are not solely related to fish, and even when they are related to fish, they can’t be managed as a part of the Move Web model. Metrics are measures of properties that change over time, which includes fish related metrics like size and mark retention, but also include non-fish related metrics such as temperature and flow. The IMetric interface is the way that metrics are handled in the Hatchery Information System.

All metrics are values that are measured for a certain location at a certain time. Virtually all of these values are numbers, but a few can be dates or strings. It would make the interface cleaner if all metrics were numbers, but the program is more versatile if metrics can be things other than numbers. Examples of metrics that are numbers would be things like weight, or water depth. An example of a metric that would not be a number would be something like fish health, which would make most sense if it were a string, perhaps even a paragraph.

The purpose of the IMetric interface is to create a consistent means for plugins to access data on a metric. The Value method of the interface is given a location and a time and returns the value for the metric at that time and location. The Value method returns a string, as that is the only data type sufficiently versatile to handle the diversity of data possible for a metric. This is unfortunate, as conversion will often be required prior to use, but since metrics can be strings, there was no better choice. There are other methods that return the value in different formats, or indicate what type of data the value will be. These methods are so that a plugin accessing the metric data can make the best use of the data in a reasonably generic fashion.

If a plugin includes an object that implements the IMetric interface, the Hatchery Information System will create an instance of that object and register it with the Event Raiser object. The Event Raiser object will then make the IMetric available to any plugin that wants it. While it is expected that any plugin that will make use of metric data will know which metric it wants to work with, the interface includes sufficient methods that a reasonably generic interaction is possible.



Existing Plugins

Density Index

The metric shows the density index for a rearing unit at the time requested. This plugin is combined with the IColorControl Density Index plugin object.


Flow Index

The metric shows the flow index for a rearing unit at the time requested. This plugin is combined with the IColorControl Flow Index plugin object.