using IEC61850.Server;
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
// IEC 61850 API for the libiec61850 .NET wrapper library
namespace IEC61850
{
// IEC 61850 server API.
namespace Model
{
public enum SMVEvent
{
IEC61850_SVCB_EVENT_ENABLE = 1,
IEC61850_SVCB_EVENT_DISABLE = 0,
}
public class SVControlBlock : ModelNode
{
private IntPtr self = IntPtr.Zero;
public IedModel parent { get; }
internal IntPtr Self { get => self; }
[DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr SVControlBlock_create(string name, IntPtr parent, string svID,string dataSet, UInt32 confRev, uint smpMod,
UInt16 smpRate, uint optFlds, bool isUnicast);
///
/// create a new Multicast/Unicast Sampled Value (SV) control block (SvCB)
/// Create a new Sampled Value control block(SvCB) and add it to the given logical node(LN)
///
/// name of the SvCB relative to the parent LN
/// the parent LN
/// the application ID of the SvCB
/// the data set reference to be used by the SVCB
/// the configuration revision
/// the sampling mode used
/// the sampling rate used
///
/// the optional element configuration
public SVControlBlock(string name, IedModel parent, string svID, string dataSet, UInt32 confRev, uint smpMod,
UInt16 smpRate, uint optFlds, bool isUnicast)
{
this.self = SVControlBlock_create(name, parent.self, svID, dataSet, confRev, smpMod, smpRate, optFlds, isUnicast);
this.parent = parent;
}
///
/// create a new Multicast/Unicast Sampled Value (SV) control block (SvCB)
/// Create a new Sampled Value control block(SvCB) and add it to the given logical node(LN)
///
/// the svcontrol instance
public SVControlBlock(IntPtr self)
{
this.self = self;
}
}
}
}