UBIK® Live Value Server Plugins can be injected to UBIK® by using the Injection Management.
Provided Live Value Server
Name | Since Version | Comment |
---|---|---|
OPCLiveValueServer | 2.5 | Provided access to live values provided on a OPC UA Server |
Implementation
The plugin must implement the UBIK.Injection.IUBIKLiveValueServer interface and has to be registered for MEF composition by defining the export contract via attributes.
namespace UBIK.Injection
{
public interface IUBIKLiveValueServer
{
/// <summary>
/// Initializes the opc live value server.
/// </summary>
/// <param name="environment">The environment.</param>
void InitLiveValueServer(UBIKEnvironment environment);
/// <summary>
/// Starts the live value server and starts to read data from the 3rd party system
/// </summary>
void Startup();
/// <summary>
/// Stops the live value server.
/// </summary>
void Shutdown();
/// <summary>
/// Tries the get a live value specified by the given data point id.
/// </summary>
/// <param name="dataPointID">The data point identifier.</param>
/// <param name="ILiveValueInformation">The i live value information.</param>
/// <returns>true as a configured live value was found, false otherwise</returns>
bool TryGetLiveValue(Guid dataPointID, out ILiveValueInformation value);
/// <summary>
/// Gets status information of the current live value server
/// </summary>
/// <returns>status information</returns>
ILiveValueServerStatus GetStatus();
}
}
{
public interface IUBIKLiveValueServer
{
/// <summary>
/// Initializes the opc live value server.
/// </summary>
/// <param name="environment">The environment.</param>
void InitLiveValueServer(UBIKEnvironment environment);
/// <summary>
/// Starts the live value server and starts to read data from the 3rd party system
/// </summary>
void Startup();
/// <summary>
/// Stops the live value server.
/// </summary>
void Shutdown();
/// <summary>
/// Tries the get a live value specified by the given data point id.
/// </summary>
/// <param name="dataPointID">The data point identifier.</param>
/// <param name="ILiveValueInformation">The i live value information.</param>
/// <returns>true as a configured live value was found, false otherwise</returns>
bool TryGetLiveValue(Guid dataPointID, out ILiveValueInformation value);
/// <summary>
/// Gets status information of the current live value server
/// </summary>
/// <returns>status information</returns>
ILiveValueServerStatus GetStatus();
}
}
Example
[Export(typeof(UBIK.Injection.IUbikPlugin))]
[ExportMetadata("ID", "4AD25939-C2F3-4E25-88F8-D1143E3D566B")]
[ExportMetadata("Type", typeof(OPCLiveValueServer))]
[ExportMetadata("Name", "OPCLiveValueServer")]
[ExportMetadata("Description", "OPCUA Live Value Server")]
[ExportMetadata("Version", 1)]
[ExportMetadata("Company", "Augmensys GmbH")]
[ExportMetadata("Copyright", "2015, Augmensys GmbH")]
[ExportMetadata("MinimumKernelVersion", "2.5.0.0")]
[ExportMetadata("TargetApplication", TargetApplication.UBIK_WebService)]
public class OPCLiveValueServer : IUBIKLiveValueServer, UBIK.Injection.IUbikPlugin
{
....
}
[ExportMetadata("ID", "4AD25939-C2F3-4E25-88F8-D1143E3D566B")]
[ExportMetadata("Type", typeof(OPCLiveValueServer))]
[ExportMetadata("Name", "OPCLiveValueServer")]
[ExportMetadata("Description", "OPCUA Live Value Server")]
[ExportMetadata("Version", 1)]
[ExportMetadata("Company", "Augmensys GmbH")]
[ExportMetadata("Copyright", "2015, Augmensys GmbH")]
[ExportMetadata("MinimumKernelVersion", "2.5.0.0")]
[ExportMetadata("TargetApplication", TargetApplication.UBIK_WebService)]
public class OPCLiveValueServer : IUBIKLiveValueServer, UBIK.Injection.IUbikPlugin
{
....
}