performConnect (self)
connect (self)
defaultOnPointChange (self, point)
runAllPointChangeMethods (self)
log (self, severity, message)
runPointChangeMethod (self, point)
runCallback (self, callback)
getCnxState (self)
getCnxStateString (self)
MarkAllPointsAsNotConnected (self)
read_messages (self)
message_writer (self)
startDomainListTimer (self)
cancelDomainListTimer (self)
DomainListEventHandler (self)
sendAlive (self)
timeoutCheck (self)
sendLogin (self)
sendWantSuccess (self)
appendPointValueMetaData (self, list sb, MetadataFlags valid_flags, Union[str, float, None] value, MetadataFlags flag)
Optional[Exception] writeMetadata (self, str point_name, Optional[PointMetaInfo] metadata)
Exception setDefaultDomain (self, str domain)
sendHeartbeatTimes (self)
startHeartbeatTimers (self)
activeHeartbeatTimers (self)
cancelHeartbeatTimers (self)
setHeartbeatTimes (self, heartbeat_ms, timeout_ms)
getPort (self)
getHostName (self)
getReconnectionDelay (self)
getHeartbeat (self)
getTimeout (self)
setConnState (self, newstate)
startReconnectionTimer (self)
RetryEventHandler (self)
setReconnectionDelay (self, recon_ms)
cancelReconnectionTimer (self)
setUsername (self, username, password)
setSsl (self, isSSL, acceptInvalidCertificates, clientCertificate)
setProxyParms (self, proxyHostname, proxyPort, proxyUsername, proxyPassword)
setWebparms (self, httpPort, isHttps)
setConnectionParms (self, hostname, port, username=None, password=None, parent_session_id=None)
getPointCache (self)
registerDomain (self, domainname, flags)
registerPoint (self, point_or_name, create=False)
unregisterPoint (self, point)
LookupOrCreatePoint (self, point)
lookupPoint (self, point)
createPoint (self, point)
sendCommand (self, message)
preciseTimer (self, loop, delay, interval, callback, *args, **kwargs)
Timer (self, loop, delay, interval, callback, *args, **kwargs)
writePoint (self, pointname, value, type=None, seconds=None, nanoseconds=None, quality=None, create=None, force=None)
performWritePoint (self, pointname, point_type, strval, seconds, nanoseconds, quality, create, force)
initializePointCache (self, model=None)
getDefaultDomain (self)
shutdown (self)
changeType (self, valueType, stringValue)
mathPointValue (self, operation, pointname, value, sec, nsec)
dividePointValue (self, point, value)
multiplyPointValue (self, point, value)
addPointValue (self, point, value)
appendPointValue (self, point, value)
setPointTimeStamp (point, datetime_obj)
sendConnectionCommands (self)
Connection_ConnectFailed (self, host, port)
Connection_ConnectSucceeded (self, host, port)
Connection_Connecting (self, host, port)
closeConnection (self)
onConnected = None
onDisconnected = None
onPointChange = lambda x : self.defaultOnPointChange(x)
onCommand = None
onEcho = None
onAsyncMessage = None
onAlive = None
onSuccess = None
onError = None
onLog = None
onConnectionSuccess = None
onConnectionFailure = None
onConnecting = None
onStatusChange = None
data = bytearray()
ConnectionStatus = self.m_connstate
m_aliveTimer = None
m_retrytimer = None
m_domainlisttimer = None
loop = loop
writer = None
reader = None
name = None
m_datamodel = dict()
message_queue = asyncio.Queue()
m_timeoutTimer = None
bool dataWasRead = False
Represents a connection to the DataHub.
Attributes:
onConnected: Callback for when the connection is established.
onDisconnected: Callback for when the connection is disconnected.
onPointChange: Callback for when a point changes.
onCommand: Callback for when a command is received.
onEcho: Callback for when an echo message is received.
onAsyncMessage: Callback for when an asynchronous
message is received.
onAlive: Callback for when an alive message is received.
onSuccess: Callback for when an operation is successful.
onError: Callback for when an error occurs.
onLog: Callback for logging messages.
onConnectionSuccess: Callback for when the connection is
successfully established.
onConnectionFailure: Callback for when the connection fails.
onConnecting: Callback for when the connection is in the
process of connecting.
onStatusChange: Callback for when the connection status changes.
data: Bytearray to store data.
m_connstate: Current connection state.
ConnectionStatus: Alias for the current connection state.
m_aliveTimer: Timer for the alive message.
m_retrytimer: Timer for retrying the connection.
m_domainlisttimer: Timer for domain list updates.
Options: Connection options.
loop: Event loop.
writer: Stream writer.
reader: Stream reader.
name: Connection name.
m_datamodel: Data model dictionary.
message_queue: Queue for messages.
m_timeoutTimer: Timer for connection timeout.
dataWasRead: Flag indicating if data was read.