Class ScalingActorFactory.ScalingActor

java.lang.Object
com.inductiveautomation.ignition.gateway.tags.actors.factories.scaling.ScalingActorFactory.ScalingActor
All Implemented Interfaces:
Diagnosable, TagActor, WriteProcessor
Enclosing class:
ScalingActorFactory

protected class ScalingActorFactory.ScalingActor extends Object implements TagActor, WriteProcessor, Diagnosable
  • Constructor Details

  • Method Details

    • actorClassification

      public ActorClassification actorClassification()
      Description copied from interface: TagActor
      The classification of this actor. A tag can only have one actor per classification.
      Specified by:
      actorClassification in interface TagActor
    • initialize

      public void initialize(NodeContext context, PropertySet config)
      Description copied from interface: TagActor
      Override to set up any extra configuration that is needed before the actor can process a value. It should be expected that the configuration has NOT been altered since the actor was instantiated.
      Specified by:
      initialize in interface TagActor
    • destroy

      public void destroy(NodeContext context, ShutdownReason reason)
      Description copied from interface: TagActor
      Override to perform cleanup for actors that have set up extra configuration to process values.
      Specified by:
      destroy in interface TagActor
    • attemptConfiguration

      public boolean attemptConfiguration(NodeContext context, VersionedPropertySet config)
      Description copied from interface: TagActor
      Provides an opportunity to update the running actor on the fly. If FALSE is returned from this class, the actor will be uninitialized, and if appropriate, a new one created.

      Therefore, the implementation should also verify that the configuration is still valid for this actor.

      The config object provide is the entire configuration for the tag. However, it is provided as a Diff, which is relative to the last time configuration was attempted. This allows actors to quickly see if relevant properties have changed. Many actors will choose to simply rebuild themselves if the properties have changed, but given how often this function is called, it's important not to rebuild unnecessarily (hence, check the changed properties).

      Specified by:
      attemptConfiguration in interface TagActor
    • addBrowseTraits

      public void addBrowseTraits(NodeDescription.NodeDescriptionBuilder desc)
      Description copied from interface: TagActor
      Gives the actor a chance to report NodeAttribute traits for the tag it belongs to. NodeAttributes are registered in the designer in order to modify the display of browse nodes.
      Specified by:
      addBrowseTraits in interface TagActor
    • processValue

      public QualifiedValue processValue(QualifiedValue value)
      Description copied from interface: TagActor
      The value is generated by the source actor and then passed along to the next actor. If the return is null, the value change will be cancelled.
      Specified by:
      processValue in interface TagActor
    • processWrite

      public Object processWrite(NodeContext context, CompletableFuture<QualityCode> cf, SecurityContext security, Object value, Optional<SubIndex> subIndex)
      Description copied from interface: WriteProcessor
      The returned value is passed to the next actor, if the future has not been completed. Gives the actors a chance to mutate the value, or cancel the write if appropriate. If WriteProcessor.WRITE_HANDLED_SENTINEL is returned, no further action should be taken.
      Specified by:
      processWrite in interface WriteProcessor
    • sampleDiagnostics

      public void sampleDiagnostics(DiagnosticsSample sample)
      Description copied from interface: Diagnosable
      Provides the sample upon which the object can set diagnostics information. It is expected that the calling object will first call getSubSample() in order to specify a useful identifier for this object's data.
      Specified by:
      sampleDiagnostics in interface Diagnosable