Update the device model with new configuration options.
Allows dynamic updating of device identity and node configuration. Any undefined values will be set to "unassigned". This method is typically called internally during device data loading or external configuration changes.
Device configuration options to apply
const device = Device.factory({});
// Update with new device information
device.updateModel({
serialNumber: 'KOS-DEVICE-12345',
name: 'Updated Dispenser Name',
nodeId: 'primary-main'
});
console.log(device.serialNumber); // "KOS-DEVICE-12345"
console.log(device.name); // "Updated Dispenser Name"
console.log(device.nodeId); // "primary-main"
// Only update specific fields
device.updateModel({
name: 'New Device Name'
// serialNumber and nodeId remain unchanged
});
KOS Device Model - Device Identity and Node Configuration Management
The Device model provides centralized management of device identity, node configuration, and hardware identification within KOS systems. It handles device serial numbers, names, and node topology information essential for system coordination and administration.
Key Features
Device Identity Management
Real-time Synchronization
Node Topology Support
Common Integration Patterns
System Administration Dashboards
Multi-node System Coordination
Device Registration and Setup
Real-time Updates
The Device model automatically responds to critical data changes:
/kos/criticalData/changedand/kos/criticalData/availabletopicsSingleton Behavior
Device models use singleton pattern - each device type has one instance:
This is an alias for the implementation DeviceModelImpl.
Use Declared Type