- added function ReportControlBlock_getResv

pull/345/head
Michael Zillgith 3 years ago
parent 030ae3f7b5
commit ee948a0c08

@ -1356,6 +1356,10 @@ namespace IEC61850
[DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)]
static extern UInt16 ReportControlBlock_getResvTms(IntPtr self);
[DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)]
static extern bool ReportControlBlock_getResv(IntPtr self);
[DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr ReportControlBlock_getOwner(IntPtr self);
@ -1548,6 +1552,14 @@ namespace IEC61850
}
}
public bool Resv
{
get
{
return ReportControlBlock_getResv(self);
}
}
public byte[] Owner
{
get

@ -354,6 +354,9 @@ ReportControlBlock_getTimeofEntry(ReportControlBlock* self);
LIB61850_API int16_t
ReportControlBlock_getResvTms(ReportControlBlock* self);
LIB61850_API bool
ReportControlBlock_getResv(ReportControlBlock* self);
LIB61850_API MmsValue*
ReportControlBlock_getOwner(ReportControlBlock* self);

@ -4256,6 +4256,31 @@ ReportControlBlock_getResvTms(ReportControlBlock* self)
}
}
bool
ReportControlBlock_getResv(ReportControlBlock* self)
{
if (self->trgOps & 64) {
ReportControl* rc = (ReportControl*)(self->sibling);
#if (CONFIG_MMS_THREADLESS_STACK != 1)
Semaphore_wait(rc->rcbValuesLock);
#endif
MmsValue* resvValue = ReportControl_getRCBValue(rc, "Resv");
bool resv = MmsValue_getBoolean(resvValue);
#if (CONFIG_MMS_THREADLESS_STACK != 1)
Semaphore_post(rc->rcbValuesLock);
#endif
return resv;
}
else {
return false;
}
}
MmsValue*
ReportControlBlock_getOwner(ReportControlBlock* self)
{

Loading…
Cancel
Save