Class Connection
Inheritance
System.Object
Connection
Implements
System.IComparable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Experior.Core.dll
Syntax
[TypeConverter(typeof(ObjectConverter))]
public abstract class Connection : IComparable, IConnection
Constructors
Connection(ConnectionInfo)
Declaration
public Connection(ConnectionInfo info)
Parameters
Fields
COMTEST
Declaration
public static bool COMTEST
Field Value
Type |
Description |
System.Boolean |
|
iolog
Declaration
protected Xcelgo.Utils.Logger iolog
Field Value
Type |
Description |
Xcelgo.Utils.Logger |
|
Items
Declaration
[Browsable(false)]
public static readonly ConnectionCollection Items
Field Value
Properties
AutoConnect
Declaration
[PropertyOrder(100)]
[PropertyAttributesProvider("DynamicPropertyConnected")]
public virtual bool AutoConnect { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
AutoConnectDelay
Declaration
[PropertyOrder(101)]
[PropertyAttributesProvider("DynamicPropertyConnectedAutoConnect")]
public virtual uint AutoConnectDelay { get; set; }
Property Value
Type |
Description |
System.UInt32 |
|
Context
Declaration
protected Connection.ContextMenu Context { get; set; }
Property Value
Direction
Declaration
[Browsable(false)]
public virtual Directions Direction { get; }
Property Value
Disposed
Declaration
[Browsable(false)]
public bool Disposed { get; }
Property Value
Type |
Description |
System.Boolean |
|
Error
Declaration
[Browsable(false)]
public virtual bool Error { get; }
Property Value
Type |
Description |
System.Boolean |
|
HighLevel
Declaration
[Browsable(false)]
public virtual bool HighLevel { get; }
Property Value
Type |
Description |
System.Boolean |
|
HighLevelProtocols
Declaration
public static List<IConnection> HighLevelProtocols { get; }
Property Value
Type |
Description |
System.Collections.Generic.List<IConnection> |
|
Id
Declaration
[Browsable(false)]
public int Id { get; }
Property Value
Type |
Description |
System.Int32 |
|
Image
Declaration
[Browsable(false)]
public virtual ImageSource Image { get; }
Property Value
Type |
Description |
System.Windows.Media.ImageSource |
|
Info
Declaration
[Browsable(false)]
public ConnectionInfo Info { get; }
Property Value
LowLevelProtocols
Declaration
public static List<IConnection> LowLevelProtocols { get; }
Property Value
Type |
Description |
System.Collections.Generic.List<IConnection> |
|
Declaration
protected Connection.ContextMenu Menu { get; set; }
Property Value
Name
Declaration
[PropertyOrder(0)]
[Display(Order = 0, GroupName = "Identification")]
[PropertyAttributesProvider("DynamicPropertyConnectedEmbedded")]
[Required(ErrorMessage = "Name is required")]
public virtual string Name { get; set; }
Property Value
Type |
Description |
System.String |
|
Notification
Declaration
[Browsable(false)]
public virtual bool Notification { get; }
Property Value
Type |
Description |
System.Boolean |
|
NumberOfDigits
Declaration
[Browsable(false)]
public int NumberOfDigits { get; }
Property Value
Type |
Description |
System.Int32 |
|
ObjectType
Declaration
[Display(Order = 0, GroupName = "Identification")]
[PropertyOrder(9)]
public string ObjectType { get; }
Property Value
Type |
Description |
System.String |
|
Protocol
Declaration
[Browsable(false)]
public abstract string Protocol { get; }
Property Value
Type |
Description |
System.String |
|
Replayable
Declaration
[Browsable(false)]
public bool Replayable { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
State
Declaration
[Browsable(false)]
public abstract State State { get; }
Property Value
Warning
Declaration
[Browsable(false)]
public virtual bool Warning { get; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
Add(Connection)
Declaration
public static void Add(Connection connection)
Parameters
AutoConnectAll()
Declaration
public static void AutoConnectAll()
CloseLog()
Declaration
public virtual void CloseLog()
CompareTo(Object)
Declaration
public int CompareTo(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Int32 |
|
ConnectionEstablished()
Declaration
protected virtual void ConnectionEstablished()
ConnectionIdUsed(Int32)
Declaration
public static bool ConnectionIdUsed(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
System.Boolean |
|
ConnectionLost()
Declaration
protected virtual void ConnectionLost()
Count(Type)
Declaration
public static int Count(Type type)
Parameters
Type |
Name |
Description |
System.Type |
type |
|
Returns
Type |
Description |
System.Int32 |
|
CreateLog(Int32)
Declaration
protected virtual void CreateLog(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
DataReceived(Byte[])
Declaration
public virtual void DataReceived(byte[] data)
Parameters
Type |
Name |
Description |
System.Byte[] |
data |
|
DataReceivedInvoked(Byte[], String)
Declaration
public virtual void DataReceivedInvoked(byte[] data, string converted)
Parameters
Type |
Name |
Description |
System.Byte[] |
data |
|
System.String |
converted |
|
Diagnostic(String)
Declaration
protected void Diagnostic(string message)
Parameters
Type |
Name |
Description |
System.String |
message |
|
Disconnect()
Declaration
public abstract void Disconnect()
Dispose(Boolean)
Declaration
public virtual bool Dispose(bool force)
Parameters
Type |
Name |
Description |
System.Boolean |
force |
|
Returns
Type |
Description |
System.Boolean |
|
EstablishConnection()
Declaration
public abstract void EstablishConnection()
Get(Int32)
Declaration
public static Connection Get(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
GetValideConnectionId()
Declaration
public static int GetValideConnectionId()
Returns
Type |
Description |
System.Int32 |
|
GetValideConnectionPortNumber()
Declaration
public static int GetValideConnectionPortNumber()
Returns
Type |
Description |
System.Int32 |
|
GetValidName(String)
Declaration
public static string GetValidName(string prefix)
Parameters
Type |
Name |
Description |
System.String |
prefix |
|
Returns
Type |
Description |
System.String |
|
Declaration
protected void Information(string message)
Parameters
Type |
Name |
Description |
System.String |
message |
|
NameUsed(String)
Declaration
public static bool NameUsed(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
Type |
Description |
System.Boolean |
|
Remove(Connection)
Declaration
public static void Remove(Connection connection)
Parameters
Reset()
Declaration
[Browsable(false)]
public virtual void Reset()
Send(Byte[])
Declaration
public abstract void Send(byte[] data)
Parameters
Type |
Name |
Description |
System.Byte[] |
data |
|
Declaration
public virtual void ShowContextMenu(List<Environment.UI.Toolbar.BarItem> menuitems)
Parameters
StateChanged()
Declaration
protected virtual void StateChanged()
StateChanged(States)
Declaration
protected virtual void StateChanged(States state)
Parameters
Type |
Name |
Description |
States |
state |
|
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()
TruncateLog()
Declaration
public virtual void TruncateLog()
ValidDataLength(Int32, Int32, UInt32)
Declaration
public static string ValidDataLength(int id, int datalength, uint offset)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
System.Int32 |
datalength |
|
System.UInt32 |
offset |
|
Returns
Type |
Description |
System.String |
|
Events
OnBeforeDisconnectManually
Declaration
public event Connection.ConnectionEvent OnBeforeDisconnectManually
Event Type
OnConnected
Declaration
public event Connection.ConnectionEvent OnConnected
Event Type
OnConnectionIdChanged
Declaration
public event Connection.ConnectionEvent OnConnectionIdChanged
Event Type
OnDiagnostic
Declaration
public event Connection.DiagnosticEvent OnDiagnostic
Event Type
OnDisconnected
Declaration
public event Connection.ConnectionEvent OnDisconnected
Event Type
OnDisposed
Declaration
public event Connection.ConnectionEvent OnDisposed
Event Type
OnMessageReceived
Declaration
public event Connection.MessageReceivedEvent OnMessageReceived
Event Type
OnNameChanged
Declaration
public event Connection.ConnectionEvent OnNameChanged
Event Type
Implements
System.IComparable