Chapter 6. Using State

Table of Contents

Statuses

Statuses

State uses a number of statuses to denote the various health levels of vitals that its monitoring. Each status has a label and a degree. Its label is used for identification purposes as well as for display. A statuses' degree is more interesting. Degree is a real number that ranges from 0 to 1 and numerically quantifies health. A degree of 1.0 is perfectly healthy and a degree of 0.0 is totally and completely dead. Some statuses have degrees that lie in between, such as WARNING, with a degree of 0.5. It's the degree that is used to determine if a vital has recovered by increasing in health. Degrees are also used to calculate the health of a large number of vitals to great accuracy. Many statuses have differeing labels by the same degree, such as ALIVE and NORMAL. This is only because one statuses makes more sense in a specific situation. Later, there may be ways of classifying and using these differing statuses to provide more flexibility.