WFServerConnector Class Overview
Check out this article and learn more details about the WFServerConnector Class and the parameters involved in its management.
WFServerConnector provides methods and events to create own WEBfactory 2010 signals.
The following methods and events are implemented by WFServerConnector class:
Create and Release Signal Operations
int CreateSignal(string signalName, out int result);
int CreateSignals(string[] signalNames, out int[] results);
int ReleaseSignal (string signalName, out int result);
int ReleaseSignals(string[] signalNames, out int[] results);
Update Signal Operations
int UpdateSignal(string signalName, object signalValue, out int result);
int UpdateSignals(string[] signalNames, object[] signalValues, out int[] results);
User Interaction Operations
event WFWriteAsyncRequestEventHandler WriteAsyncRequest;
int WriteAsyncRequestResult (string asynchID, int[] results);
Debug Operations
int WriteTrace(WFTraceLevels level, string message);
The following sections will describe each method and event of the WFServerConnector class:
CreateSignal
Method definition | int CreateSignal(string signalName, out int result); |
Calling parameters |
|
Return value |
|
Result |
|
Description | This method creates a signal inside the custom connector. This signal is then available for WEBfactory 2010 Server after it was added inside WEBfactory 2010 Studio. Before the connector can operate with signals it has to create them. |
CreateSignals
Method definition | int CreateSignals(string[] signalNames, out int[] results); |
Calling parameters |
|
Return value |
|
Result |
|
Description | This method creates multiple signals inside the custom connector at once. Therefore it gets Details for creating signals can be taken from CreateSignal. |
ReleaseSignal
Method definition | int ReleaseSignal (string signalName, out int result); |
Calling parameters |
|
Return value |
|
Result |
|
Description | This method releases a signal that was created before. Afterward the value of the signal will become empty for WEBfactory 2010. |
ReleaseSignals
Method definition | int ReleaseSignals(string[] signalNames, out int[] results); |
Calling parameters |
|
Return value |
|
Result |
|
Description | This method releases multiple signals inside the custom connector at once. Therefore it gets Details for releasing signals can be taken from ReleaseSignal. |
UpdateSignal
Method definition | int UpdateSignal(string signalName, object signalValue, out int result); |
Calling parameters |
|
Return value |
|
Result |
|
Description | This method updates a value of a signal. WEBfactory 2010 Server will get this update like an update from an OPC server. This change for a custom connector is normally triggered by an external device or data source. A simulation connector could invoke that method periodically. |
UpdateSignals
Method definition | int UpdateSignals(string[] signalNames, object[] signalValues, out int[] results); |
Calling parameters |
|
Return value |
|
Result |
|
Description | This method updates multiple signals inside the custom connector at once. Therefore it gets Details for updating signals can be taken from UpdateSignal. |
WriteAsyncRequest
Method definition | event WFWriteAsyncRequestEventHandler WriteAsyncRequest; delegate void WFWriteAsyncRequestEventHandler(string[] signalNames, object[] signalValues, string asyncID); |
Calling parameters |
|
Description | This event is fired after a user tries to change a signal of the custom connector. The event handler defines which signal the user wants to change and what value he tries to setup. The The connector must invoke |
WriteAsynchRequestResult
Method definition | int WriteAsyncRequestResult (string asynchID, int[] results); |
Calling parameters |
|
Return value |
|
Result |
|
Description | The connector should invoke The |
WriteTrace
Method definition | int WriteTrace(WFTraceLevels level, string message); |
Calling parameters |
|
Return value |
|
Result |
|
Description | This method writes a message to WEBfactory 2010Activity Analyzer. All error messages from WEBfactory 2010 server modules can be displayed in that tool. This allows finding out any problems between them. Parameter level is an enumeration: enum WFTraceLevels { TraceInfo = 4, TraceWarning = 2, TraceError = 1, NoTrace = 0 }; |