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
ExtensionPoint
s 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 ResourceType
TheResourceType
used by all Devices in the configuration resource collection.Fields inherited from class com.inductiveautomation.ignition.gateway.config.AbstractExtensionPoint
descriptionKey, gson, nameKey, typeId, validator
Fields inherited from interface com.inductiveautomation.ignition.gateway.config.ExtensionPoint
PROFILE_KEY, SETTINGS_KEY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Device
createDevice
(DeviceContext context, ExtensionPointConfig<DeviceProfileConfig, ?> config) protected abstract Device
createDevice
(DeviceContext context, DeviceProfileConfig profileConfig, S deviceConfig) Create a newDevice
instance using the provided profile and device configuration.getSamplingMetrics
(Device device, String deviceName) If aDevice
acquires data via sampling, return aSamplingMetrics
that will be used to generate sampling diagnostics.com.codahale.metrics.health.HealthCheck.Result
healthCheck
(Device device, String deviceName) Check the health of the providedDevice
.final ResourceType
The 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, validate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.inductiveautomation.ignition.gateway.config.ExtensionPoint
canCreate, compareTo, defaultSettings, getMenuActions, getSettings, getWebUiComponent, settingsSchema
-
Field Details
-
DEVICE_RESOURCE_TYPE
TheResourceType
used 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:ExtensionPoint
The 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 newDevice
instance using the provided profile and device configuration.- Parameters:
context
- theDeviceContext
.profileConfig
- theDeviceProfileConfig
.deviceConfig
- the device-specific configuration.- Returns:
- a new
Device
instance.
-
healthCheck
Check the health of the providedDevice
.The provided
Device
will be an instance created by this extension point.The default implementation returns a healthy
HealthCheck.Result
with the status fromDevice.getStatus()
. Subclasses may override to further interpret the status as healthy or unhealthy, or to use other criteria entirely. -
getSamplingMetrics
If aDevice
acquires data via sampling, return aSamplingMetrics
that will be used to generate sampling diagnostics.- Parameters:
device
- theDevice
instance.deviceName
- the name of the device.- Returns:
- a
SamplingMetrics
instance, orOptional.empty()
if thisDevice
does not acquire data via sampling.
-