adding getSmpSynch in sv subscriber

pull/268/head
Cedric Boudinet 5 years ago
parent bb0a313db1
commit 068b4eae99

@ -878,6 +878,24 @@ SVSubscriber_ASDU_getDataSize(SVSubscriber_ASDU self)
return self->dataBufferLength; return self->dataBufferLength;
} }
uint16_t
SVSubscriber_ASDU_getSmpSynch(SVSubscriber_ASDU self)
{
uint16_t retVal;
uint8_t* valBytes = (uint8_t*) &retVal;
#if (ORDER_LITTLE_ENDIAN == 1)
valBytes[0] = self->smpSynch[1];
valBytes[1] = self->smpSynch[0];
#else
valBytes[0] = self->smpSynch[0];
valBytes[1] = self->smpSynch[1];
#endif
return retVal;
}
uint16_t uint16_t
SVClientASDU_getSmpCnt(SVSubscriber_ASDU self) SVClientASDU_getSmpCnt(SVSubscriber_ASDU self)
{ {

@ -528,6 +528,16 @@ SVSubscriber_ASDU_getQuality(SVSubscriber_ASDU self, int index);
int int
SVSubscriber_ASDU_getDataSize(SVSubscriber_ASDU self); SVSubscriber_ASDU_getDataSize(SVSubscriber_ASDU self);
/**
* \brief return the SmpSynch value included in the SV ASDU
*
* The SmpSynch gives information about the clock synchronization.
*
* \param self ASDU object instance
*/
uint16_t
SVSubscriber_ASDU_getSmpSynch(SVSubscriber_ASDU self);
#ifndef DEPRECATED #ifndef DEPRECATED
#if defined(__GNUC__) || defined(__clang__) #if defined(__GNUC__) || defined(__clang__)
#define DEPRECATED __attribute__((deprecated)) #define DEPRECATED __attribute__((deprecated))

Loading…
Cancel
Save