x4Trace Documentation v1.0
Loading...
Searching...
No Matches
Ix4Trace.Engine.Controller Class Reference

Controller object of x4Trace. Represents every basic functions to communicate with server. More...

Public Member Functions

 Controller (string ipAddress, int port)
 Constructor.
 
virtual bool Connect ()
 Connects to server.
 
virtual void Initialize (Ix4Trace.Engine.SerializationType serializationType)
 Initializes the controller.
 
virtual List< Assembly > LoadPlugins ()
 Loads the plugins.
 
virtual void SendASyncMessage (Ix4Trace.Messages.Message msg)
 Sends async message to server.
 
virtual Ix4Trace.Messages.Message SendSyncMessage (Ix4Trace.Messages.SyncMessage msg)
 Sends sync message to server.
 
bool HasTerminalData ()
 The controllser has terminal data.
 
virtual bool NeedUpdate ()
 Returns true when system needs update.
 
virtual string[] GetUpdateFileNames ()
 Returns the update file names.
 
virtual byte[] GetUpdateFile (string file)
 Returns the file for update.
 

Protected Member Functions

void OnRemoteCommandReceived (Ix4Trace.Messages.RemoteCommand remoteControl)
 Fires remote command received event.
 
void OnMessageReceived (Ix4Trace.Messages.Message message)
 Fires message arrived from server event.
 
void OnEventReceived (Ix4Trace.Messages.Event evt)
 Fires event received event.
 
void OnDisconnected ()
 Fires disconnected from server event.
 
void OnReconnect ()
 Fires reconnect event.
 
void OnReconnected ()
 Fires reconnected event.
 

Protected Attributes

SerializationType serializationType = SerializationType.JsonDataContract
 Type of serialization of communication.
 
string ipAddress = "127.0.0.1"
 Address of the server.
 
int port = 2222
 Port of the server.
 
Features.FeatureManager featureManager
 The feature manager.
 
Tools.LOG log
 Logs error messages.
 
Ix4Trace.Engine.Database.SQLConnection sqlConnection
 Connection of SQL.
 
SystemParameters systemParameters
 Parameters.
 
Features.Terminal.TerminalData terminalData = new Features.Terminal.TerminalData()
 Data of terminal.
 

Properties

SystemParameters SystemParameters [get]
 Parameters.
 
Features.FeatureManager FeatureManager [get]
 The feature manager.
 
Ix4Trace.Engine.Database.SQLConnection SqlConnection [get]
 Connection of SQL.
 
Features.Terminal.TerminalData TerminalData [get]
 Data of terminal.
 

Events

ReconnectEvent ReconnectEvent = null
 Event of reconnect.
 
ReconnectedEvent ReconnectedEvent = null
 Event of reconnected.
 
EventReceived EventReceived = null
 Event of received an event of server.
 
MessageReceived MessageReceived = null
 Event of message arrived from server.
 
RemoteControlReceived RemoteCommandReceived = null
 Event of recore command received from server.
 
Disconnected Disconnected
 Event of connection is disconnected.
 

Detailed Description

Controller object of x4Trace. Represents every basic functions to communicate with server.

Constructor & Destructor Documentation

◆ Controller()

Ix4Trace.Engine.Controller.Controller ( string ipAddress,
int port )

Constructor.

Parameters
ipAddressAddress of server.
portTCP port of server.

Member Function Documentation

◆ Connect()

virtual bool Ix4Trace.Engine.Controller.Connect ( )
virtual

Connects to server.

Returns
True when the connection is successful.

◆ GetUpdateFile()

virtual byte[] Ix4Trace.Engine.Controller.GetUpdateFile ( string file)
virtual

Returns the file for update.

Parameters
fileName of file.
Returns
The file.

◆ GetUpdateFileNames()

virtual string[] Ix4Trace.Engine.Controller.GetUpdateFileNames ( )
virtual

Returns the update file names.

Returns
Name of files.

◆ HasTerminalData()

bool Ix4Trace.Engine.Controller.HasTerminalData ( )

The controllser has terminal data.

Returns
True whe has.

◆ Initialize()

virtual void Ix4Trace.Engine.Controller.Initialize ( Ix4Trace.Engine.SerializationType serializationType)
virtual

Initializes the controller.

Parameters
serializationTypeType of serialization of communication.

◆ LoadPlugins()

virtual List< Assembly > Ix4Trace.Engine.Controller.LoadPlugins ( )
virtual

Loads the plugins.

Returns

◆ NeedUpdate()

virtual bool Ix4Trace.Engine.Controller.NeedUpdate ( )
virtual

Returns true when system needs update.

Returns
True when needs update.

◆ OnEventReceived()

void Ix4Trace.Engine.Controller.OnEventReceived ( Ix4Trace.Messages.Event evt)
protected

Fires event received event.

Parameters
evt

◆ OnMessageReceived()

void Ix4Trace.Engine.Controller.OnMessageReceived ( Ix4Trace.Messages.Message message)
protected

Fires message arrived from server event.

Parameters
messageMessage from server.

◆ OnRemoteCommandReceived()

void Ix4Trace.Engine.Controller.OnRemoteCommandReceived ( Ix4Trace.Messages.RemoteCommand remoteControl)
protected

Fires remote command received event.

Parameters
remoteControlCommand.

◆ SendASyncMessage()

virtual void Ix4Trace.Engine.Controller.SendASyncMessage ( Ix4Trace.Messages.Message msg)
virtual

Sends async message to server.

Parameters
msgMessage to send.

◆ SendSyncMessage()

virtual Ix4Trace.Messages.Message Ix4Trace.Engine.Controller.SendSyncMessage ( Ix4Trace.Messages.SyncMessage msg)
virtual

Sends sync message to server.

Parameters
msgMessage to send.
Returns
The response from server.

The documentation for this class was generated from the following file: