Class DeviceExtensionPoint<S>
java.lang.Object
com.inductiveautomation.ignition.gateway.config.AbstractExtensionPoint<S>
com.inductiveautomation.ignition.gateway.opcua.server.api.DeviceExtensionPoint<S>
- Type Parameters:
S- the type of settings used by the Device provided by this extension point.
- All Implemented Interfaces:
ExtensionPoint<S>,Comparable<ExtensionPoint<S>>
Base class for
ExtensionPoints that provide a Device implementation.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.inductiveautomation.ignition.gateway.config.ExtensionPoint
ExtensionPoint.ComponentType -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ResourceTypeTheResourceTypeused by all Devices in the configuration resource collection.Fields inherited from class com.inductiveautomation.ignition.gateway.config.AbstractExtensionPoint
descriptionKey, gson, nameKey, typeId, validatorFields inherited from interface com.inductiveautomation.ignition.gateway.config.ExtensionPoint
PROFILE_KEY, SETTINGS_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal DevicecreateDevice(DeviceContext context, ExtensionPointConfig<DeviceProfileConfig, ?> config) protected abstract DevicecreateDevice(DeviceContext context, DeviceProfileConfig profileConfig, S deviceConfig) Create a newDeviceinstance using the provided profile and device configuration.getSamplingMetrics(Device device, String deviceName) If aDeviceacquires data via sampling, return aSamplingMetricsthat will be used to generate sampling diagnostics.com.codahale.metrics.health.HealthCheck.ResulthealthCheck(Device device, String deviceName) Check the health of the providedDevice.final ResourceTypeThe resource type shared by all types of this extension point.Methods inherited from class com.inductiveautomation.ignition.gateway.config.AbstractExtensionPoint
addReferenceProperty, buildGson, buildValidator, customizeGson, decode, description, encode, getReferenceProperties, getSettingsValidator, name, typeId, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.inductiveautomation.ignition.gateway.config.ExtensionPoint
canCreate, compareTo, defaultSettings, getMenuActions, getSettings, getWebUiComponent, settingsSchema
-
Field Details
-
DEVICE_RESOURCE_TYPE
TheResourceTypeused by all Devices in the configuration resource collection.
-
-
Constructor Details
-
DeviceExtensionPoint
-
-
Method Details
-
settingsType
- Returns:
- the Class of the settings object for this ExtensionPoint, if it has one. If this
ExtensionPoint does not have settings, return
Optional.empty(). By default, this method returns the class of the object returned fromExtensionPoint.defaultSettings(), if one is provided.
-
resourceType
Description copied from interface:ExtensionPointThe resource type shared by all types of this extension point. This is used to group extension points together. For example, all alarm journal types would share the same resource type, but have different typeIds. -
createDevice
public final Device createDevice(DeviceContext context, ExtensionPointConfig<DeviceProfileConfig, ?> config) -
createDevice
protected abstract Device createDevice(DeviceContext context, DeviceProfileConfig profileConfig, S deviceConfig) Create a newDeviceinstance using the provided profile and device configuration.- Parameters:
context- theDeviceContext.profileConfig- theDeviceProfileConfig.deviceConfig- the device-specific configuration.- Returns:
- a new
Deviceinstance.
-
healthCheck
Check the health of the providedDevice.The provided
Devicewill be an instance created by this extension point.The default implementation returns a healthy
HealthCheck.Resultwith the status fromDevice.getStatus(). Subclasses may override to further interpret the status as healthy or unhealthy, or to use other criteria entirely. -
getSamplingMetrics
If aDeviceacquires data via sampling, return aSamplingMetricsthat will be used to generate sampling diagnostics.- Parameters:
device- theDeviceinstance.deviceName- the name of the device.- Returns:
- a
SamplingMetricsinstance, orOptional.empty()if thisDevicedoes not acquire data via sampling.
-