Configuration options for StateBean model instances.

This interface defines the configuration options for the StateBean model, specifying which state path the model should monitor for real-time updates.

Example: Basic StateBean Model Creation

// Monitor device operational status
const deviceState = StateBean.instance('device-status')
.options({ path: 'device.operational.status' })
.build();

// Monitor system health metrics
const healthState = StateBean.instance('system-health')
.options({ path: 'system.health.metrics' })
.build();

Example: Path Patterns

// Different path patterns for different use cases
const networkOptions: StateBeanOptions = {
path: 'network.interfaces.primary' // Network interface state
};

const pumpOptions: StateBeanOptions = {
path: 'assembly.pumps.status' // Pump system state
};

const brewingOptions: StateBeanOptions = {
path: 'beverage.brewing.process' // Brewing process state
};

Example: Hierarchical State Organization

// Use dot notation for hierarchical state paths
const parentState = StateBean.instance('parent')
.options({ path: 'system' })
.build();

const childState = StateBean.instance('child')
.options({ path: 'system.subsystem.component' })
.build();
interface StateBeanOptions {
    path: string;
}

Properties

Properties

path: string

State path to monitor for updates using dot notation hierarchy. This path corresponds to the WebSocket topic /kos/state/{path} for real-time updates.

Example

"device.operational.status"

Example

"network.interfaces.primary"

Example

"assembly.pumps.status"