Impact Vision SDK  11.8.1
VisionSDK.VisionDeviceConnection Class Reference

This abstract object encapsulates the connection to a Vision Device More...

Inherited by VisionSDK.VisionDeviceConnectionThrift.

Public Member Functions

virtual void Connect ()
 Override this method to perform the connection More...
 
virtual void Disconnect ()
 Override this method to perform the disconnection More...
 
void NotiftyConnectionLost ()
 This method is used by an external object to notify that the connection is lost More...
 

Protected Member Functions

 VisionDeviceConnection (VisionDeviceConnectionDetails connectionDetails, IEventsScheduler eventsScheduler)
 Constructor More...
 
virtual void OnDidConnect (VisionEventArgs e)
 This method fires the OnDidConnect Event with the specified VisionEventArgs and,
if StopTryingToReconnect was enabled, will stop the ConnectionRestorer from trying to reconnect More...
 
virtual void OnDidDisconnect (VisionEventArgs e)
 This method fires the OnDidDisconnect Event with the specified VisionEventArgs More...
 
virtual void OnDidFailToConnect (VisionEventArgs e)
 This method fires the OnDidFailToConnect Event with the specified VisionEventArgs More...
 
virtual void OnDidFailToDisconnect (VisionEventArgs e)
 This method fires the OnDidFailToDisconnect Event with the specified VisionEventArgs More...
 
virtual void OnWillTryToConnect (VisionEventArgs e)
 This method fires the OnWillTryToConnect Event with the specified VisionEventArgs More...
 

Protected Attributes

Boolean shouldAutoReconnect = true
 Stores the value of ShouldAutoReconnect More...
 
Boolean connectionLost = false
 
Boolean connected = false
 
VisionDeviceConnectionDetails connectionDetails
 The connection details More...
 
IEventsScheduler eventScheduler
 

Properties

Boolean ShouldAutoReconnect [get, set]
 Specify if the connection should automatically try to reconnect if the connection is lost More...
 
VisionDeviceConnectionRestorer ConnectionRestorer [get, set]
 The object that tries to reconnect if the connection is lost and ShouldAutoReconnect is enabled More...
 
Boolean IsConnectionLost [get]
 Keep trace if the connection is lost More...
 
Boolean IsConnected [get]
 True if currently successsfully connected to a Vision Device More...
 

Events

EventHandler< VisionEventArgs > DidConnectHandler
 Fired when a successful connection occurs More...
 
EventHandler< VisionEventArgs > DidDisconnectHandler
 Fired when a successful disconnection occurs More...
 
EventHandler< VisionEventArgs > DidFailToConnectHandler
 Fired when an unsuccessful connection attempt occurs More...
 
EventHandler< VisionEventArgs > DidFailToDisconnectHandler
 Fired when an unsuccessful disconnection attempt occurs More...
 
EventHandler< VisionEventArgs > WillTryToConnectHandler
 Fired when a connection attempt occurs More...
 

Detailed Description

This abstract object encapsulates the connection to a Vision Device

VisionDeviceConnectionDetails connectionDetails = new VisionDeviceConnectionDetailsNetwork("127.0.0.1", 10001);
VisionDeviceConnection visionDeviceConnection = new VisionDeviceConnection( connectionDetails );

Constructor & Destructor Documentation

VisionSDK.VisionDeviceConnection.VisionDeviceConnection ( VisionDeviceConnectionDetails  connectionDetails,
IEventsScheduler  eventsScheduler 
)
protected

Constructor

Parameters
connectionDetailsThe connection details
eventsSchedulerThe connection scheduler that will execute the events on the right dispatcher

Member Function Documentation

virtual void VisionSDK.VisionDeviceConnection.Connect ( )
virtual

Override this method to perform the connection

virtual void VisionSDK.VisionDeviceConnection.Disconnect ( )
virtual

Override this method to perform the disconnection

void VisionSDK.VisionDeviceConnection.NotiftyConnectionLost ( )

This method is used by an external object to notify that the connection is lost

virtual void VisionSDK.VisionDeviceConnection.OnDidConnect ( VisionEventArgs  e)
protectedvirtual

This method fires the OnDidConnect Event with the specified VisionEventArgs and,
if StopTryingToReconnect was enabled, will stop the ConnectionRestorer from trying to reconnect

Parameters
eThe VisionEventArgs
virtual void VisionSDK.VisionDeviceConnection.OnDidDisconnect ( VisionEventArgs  e)
protectedvirtual

This method fires the OnDidDisconnect Event with the specified VisionEventArgs

Parameters
eThe VisionEventArgs
virtual void VisionSDK.VisionDeviceConnection.OnDidFailToConnect ( VisionEventArgs  e)
protectedvirtual

This method fires the OnDidFailToConnect Event with the specified VisionEventArgs

Parameters
eThe VisionEventArgs
virtual void VisionSDK.VisionDeviceConnection.OnDidFailToDisconnect ( VisionEventArgs  e)
protectedvirtual

This method fires the OnDidFailToDisconnect Event with the specified VisionEventArgs

Parameters
eThe VisionEventArgs
virtual void VisionSDK.VisionDeviceConnection.OnWillTryToConnect ( VisionEventArgs  e)
protectedvirtual

This method fires the OnWillTryToConnect Event with the specified VisionEventArgs

Parameters
eThe VisionEventArgs

Member Data Documentation

Boolean VisionSDK.VisionDeviceConnection.connected = false
protected
VisionDeviceConnectionDetails VisionSDK.VisionDeviceConnection.connectionDetails
protected

The connection details

Boolean VisionSDK.VisionDeviceConnection.connectionLost = false
protected
IEventsScheduler VisionSDK.VisionDeviceConnection.eventScheduler
protected
Boolean VisionSDK.VisionDeviceConnection.shouldAutoReconnect = true
protected

Stores the value of ShouldAutoReconnect

Property Documentation

VisionDeviceConnectionRestorer VisionSDK.VisionDeviceConnection.ConnectionRestorer
getset

The object that tries to reconnect if the connection is lost and ShouldAutoReconnect is enabled

Boolean VisionSDK.VisionDeviceConnection.IsConnected
get

True if currently successsfully connected to a Vision Device

Boolean VisionSDK.VisionDeviceConnection.IsConnectionLost
get

Keep trace if the connection is lost

Boolean VisionSDK.VisionDeviceConnection.ShouldAutoReconnect
getset

Specify if the connection should automatically try to reconnect if the connection is lost

Event Documentation

EventHandler<VisionEventArgs> VisionSDK.VisionDeviceConnection.DidConnectHandler

Fired when a successful connection occurs

EventHandler<VisionEventArgs> VisionSDK.VisionDeviceConnection.DidDisconnectHandler

Fired when a successful disconnection occurs

EventHandler<VisionEventArgs> VisionSDK.VisionDeviceConnection.DidFailToConnectHandler

Fired when an unsuccessful connection attempt occurs

EventHandler<VisionEventArgs> VisionSDK.VisionDeviceConnection.DidFailToDisconnectHandler

Fired when an unsuccessful disconnection attempt occurs

EventHandler<VisionEventArgs> VisionSDK.VisionDeviceConnection.WillTryToConnectHandler

Fired when a connection attempt occurs

HTML Footer Datalogic Automation, Inc.    ©2016 Datalogic Automation Inc. All Rights Reserved