class

ConnDispatch

abstract class ConnDispatch : Obj

ConnDispatch provides an implementation for all callbacks. A subclass is created by each connector to implement the various callbacks and store mutable state. All dispatch callbacks are executed within the parent Conn actor. See Custom Connectors.

constructors make

Constructor with framework specific argument

methods conn

Parent connector

onLearn

Callback to handle learn tree navigation

onPollBucket

Callback to poll a bucket of points with the same tuning config

log

Log for this connector

onWrite

Callback to write a point

hasPointsWatched

Return if there is one or more points currently in watch

point

Get the point managed by this connector via its point rec id

dis

Display name

onSyncCur

Callback to synchronize the given list of points

points

Get list of all points managed by this connector

onConnUpdated

Callback when conn record is updated

onSyncHis

Callback to synchronize the a point's history data from the connector

rec

Current version of the record

trace

Debug tracing for this connector

onOpen

Callback to handle opening the connection

id

Record id

close

Force this connector closed

onPollManual

Callback made periodically for manual polling

ext

Parent library

setPointData

Set the ConnPoint.data value

setConnData

Set the Conn.data value

onPointAdded

Callback when point is added to this connector

proj

Project

onPing

Callback to handle ping of the connector

onReceive

Callback to handle custom actor messages

onPointRemoved

Callback when point is removed from this connector

onWatch

Callback when one or more points are put into watch mode

onHouseKeeping

Callback made periodically every few seconds to handle background tasks

onClose

Callback to handle close of the connection

onConnRemoved

Callback when conn record is removed

onPointUpdated

Callback when point record is updated

onUnwatch

Callback when one or more points are taken out of watch mode

db

Project database

open

Open the connector

pointsWatched

Get list of points which are currently in watch

close This close(Err? cause)

Force this connector closed.

conn Conn conn()

Parent connector

db Folio db()

Project database

dis Str dis()

Display name

ext virtual ConnExt ext()

Parent library

hasPointsWatched Bool hasPointsWatched()

Return if there is one or more points currently in watch.

id Ref id()

Record id

log Log log()

Log for this connector

make new make(Obj arg)

Constructor with framework specific argument

onClose abstract Void onClose()

Callback to handle close of the connection.

onConnRemoved virtual Void onConnRemoved()

Callback when conn record is removed

onConnUpdated virtual Void onConnUpdated()

Callback when conn record is updated

onHouseKeeping virtual Void onHouseKeeping()

Callback made periodically every few seconds to handle background tasks.

onLearn virtual Grid onLearn(Obj? arg)

Callback to handle learn tree navigation. This method should return a grid where the rows are either navigation elements to traverse or points to map. The learn tag is used to indicate a row which may be "dived into" to navigate the remote system's tree. The learn value is passed back to this function to get the next level of the tree. A null arg should return the root of the learn tree.

Also see ConnExt.onLearn which provides the top-level callback for learn. If your learn implementation does not require an open connection, then use the ConnExt level callback. By default that callback will dispatch a message to Conn actor, perform open, and then invoke this callback.

The following tags should be used to indicate points to map:

  • dis: display name for navigation (required for all rows)
  • point: marker indicating point (1 or more fooCur/His/Write)
  • fooPoint: marker
  • fooCur: address if object can be mapped for cur real-time sync
  • fooWrite: address if object can be mapped for writing
  • fooHis: address if object can be mapped for history sync
  • kind: point kind type if known
  • unit: point unit if known
  • hisInterpolate: if point is known to be collected as COV
  • enum: if range of bool or multi-state is known
  • any other known tags to map to the learned points

onOpen abstract Void onOpen()

Callback to handle opening the connection. Raise DownErr or FaultErr if the connection failed. This callback is always called before operations such as onPing.

onPing abstract Dict onPing()

Callback to handle ping of the connector. Return custom status tags such as device version, etc to store on the connector record persistently. If there are version tags which should be removed then map those tags to None.val. If ping fails then raise exception and the connector will be automatically closed.

onPointAdded virtual Void onPointAdded(ConnPoint pt)

Callback when point is added to this connector

onPointRemoved virtual Void onPointRemoved(ConnPoint pt)

Callback when point is removed from this connector

onPointUpdated virtual Void onPointUpdated(ConnPoint pt)

Callback when point record is updated

onPollBucket virtual Void onPollBucket(ConnPoint[] points)

Callback to poll a bucket of points with the same tuning config. Default implementation calls onSyncCur. This callback is only used if the Conn.pollMode is configured as "buckets".

onPollManual virtual Void onPollManual()

Callback made periodically for manual polling. This callback is only invoked if Conn.pollMode is configured as "manual". The frequency of the callback is determined by Conn.pollFreq. Use pointsWatched to list of points currently being watched.

onReceive virtual Obj? onReceive(HxMsg msg)

Callback to handle custom actor messages

onSyncCur virtual Void onSyncCur(ConnPoint[] points)

Callback to synchronize the given list of points. The result of this call should be to invoke ConnPoint.updateCurOk or ConnPoint.updateCurErr on each point. All the points are guaranteed to return true for isCurEnabled

onSyncHis virtual Obj? onSyncHis(ConnPoint point, Span span)

Callback to synchronize the a point's history data from the connector. The result of this callback must be to invoke ConnPoint.updateHisOk or ConnPoint.updateHisErr (or just raise exception). The return of this method should be whatever updateHisXXX returns.

onUnwatch virtual Void onUnwatch(ConnPoint[] points)

Callback when one or more points are taken out of watch mode.

onWatch virtual Void onWatch(ConnPoint[] points)

Callback when one or more points are put into watch mode. All the points are guaranteed to return true for isCurEnabled

onWrite virtual Void onWrite(ConnPoint point, ConnWriteInfo event)

Callback to write a point. The connector should write info.val to the remote system. If successful then call ConnPoint.updateWriteOk. If there is an error then invoke ConnPoint.updateWriteErr or raise an exception. Note the value may have been convered from writeVal if writeConvert is configured.

open This open()

Open the connector. The connection will linger open based on the configured linger timeout, then automatically close. If the connector fails to open, then raise an exception.

point ConnPoint? point(Ref id, Bool checked)

Get the point managed by this connector via its point rec id.

points ConnPoint[] points()

Get list of all points managed by this connector.

pointsWatched ConnPoint[] pointsWatched()

Get list of points which are currently in watch.

proj Proj proj()

Project

rec Dict rec()

Current version of the record. This dict only represents the current persistent tags. It does not track transient changes such as connStatus.

setConnData Void setConnData(Obj? val)

Set the Conn.data value. The value must be immutable.

setPointData Void setPointData(ConnPoint pt, Obj? val)

Set the ConnPoint.data value. The value must be immutable.

trace ConnTrace trace()

Debug tracing for this connector

Haxall 4.0.5 ∙ 24-Feb-2026 14:33 EST