24 #ifndef SAMPLED_VALUES_SV_SUBSCRIBER_H_
25 #define SAMPLED_VALUES_SV_SUBSCRIBER_H_
27 #include "libiec61850_common_api.h"
29 #include "r_session.h"
30 #include "hal_ethernet.h"
306 LIB61850_API uint16_t
314 LIB61850_API
const char*
322 LIB61850_API
const char*
330 LIB61850_API uint32_t
346 LIB61850_API uint16_t
396 LIB61850_API uint64_t
406 LIB61850_API nsSinceEpoch
472 LIB61850_API uint16_t
483 LIB61850_API uint32_t
494 LIB61850_API uint64_t
uint16_t Quality
Definition: iec61850_common.h:326
struct sSVSubscriber_ASDU * SVSubscriber_ASDU
opaque handle to a SV ASDU (Application service data unit) instance.
Definition: sv_subscriber.h:97
LIB61850_API void SVReceiver_enableDestAddrCheck(SVReceiver self)
Enable check for destination address of the received SV messages.
LIB61850_API void SVReceiver_start(SVReceiver self)
Receiver starts listening for SV messages.
LIB61850_API SVReceiver SVReceiver_create(void)
Create a new SV receiver instance.
LIB61850_API void SVSubscriber_setListener(SVSubscriber self, SVUpdateListener listener, void *parameter)
Set a callback handler to process received SV messages.
struct sSVReceiver * SVReceiver
opaque handle to a SV receiver instance
Definition: sv_subscriber.h:122
LIB61850_API void SVReceiver_setInterfaceId(SVReceiver self, const char *interfaceId)
Set the Ethernet interface ID for the receiver instance.
LIB61850_API void SVSubscriber_destroy(SVSubscriber self)
LIB61850_API bool SVReceiver_tick(SVReceiver self)
Parse SV messages if they are available.
LIB61850_API void SVReceiver_disableDestAddrCheck(SVReceiver self)
Disable check for destination address of the received SV messages.
LIB61850_API bool SVReceiver_startThreadless(SVReceiver self)
struct sSVSubscriber * SVSubscriber
opaque handle to a SV subscriber instance
Definition: sv_subscriber.h:106
LIB61850_API void SVReceiver_stop(SVReceiver self)
Receiver stops listening for SV messages.
LIB61850_API void SVReceiver_destroy(SVReceiver self)
Destroy receiver instance (cleanup resources)
LIB61850_API SVReceiver SVReceiver_createRemote(RSession session)
Create a new R-SV receiver instance.
LIB61850_API void SVReceiver_removeSubscriber(SVReceiver self, SVSubscriber subscriber)
Disconnect subscriber and receiver.
LIB61850_API SVSubscriber SVSubscriber_create(const uint8_t *ethAddr, uint16_t appID)
LIB61850_API void SVReceiver_addSubscriber(SVReceiver self, SVSubscriber subscriber)
Add a subscriber instance to the receiver.
LIB61850_API void SVReceiver_stopThreadless(SVReceiver self)
void(* SVUpdateListener)(SVSubscriber subscriber, void *parameter, SVSubscriber_ASDU asdu)
Callback function for received SV messages.
Definition: sv_subscriber.h:117
LIB61850_API bool SVReceiver_isRunning(SVReceiver self)
Check if SV receiver is running.
LIB61850_API uint64_t SVSubscriber_ASDU_getRefrTmAsMs(SVSubscriber_ASDU self)
Get the RefrTim value included in SV ASDU as milliseconds timestamp.
LIB61850_API int8_t SVSubscriber_ASDU_getINT8(SVSubscriber_ASDU self, int index)
Get an INT8 data value in the data part of the ASDU.
LIB61850_API bool SVSubscriber_ASDU_hasRefrTm(SVSubscriber_ASDU self)
Check if RefrTm value is included in the SV ASDU.
LIB61850_API bool SVSubscriber_ASDU_hasSmpRate(SVSubscriber_ASDU self)
Check if SmpRate value is included in the SV ASDU.
LIB61850_API bool SVSubscriber_ASDU_hasDatSet(SVSubscriber_ASDU self)
Check if DatSet value is included in the SV ASDU.
LIB61850_API Timestamp SVSubscriber_ASDU_getTimestamp(SVSubscriber_ASDU self, int index)
Get a timestamp data value in the data part of the ASDU.
LIB61850_API nsSinceEpoch SVSubscriber_ASDU_getRefrTmAsNs(SVSubscriber_ASDU self)
Get the RefrTim value included in SV ASDU as nanoseconds timestamp.
LIB61850_API uint32_t SVSubscriber_ASDU_getConfRev(SVSubscriber_ASDU self)
return the ConfRev value included in the SV ASDU
LIB61850_API const char * SVSubscriber_ASDU_getDatSet(SVSubscriber_ASDU self)
return the DatSet value included in the SV ASDU
LIB61850_API Quality SVSubscriber_ASDU_getQuality(SVSubscriber_ASDU self, int index)
Get a quality value in the data part of the ASDU.
LIB61850_API int SVSubscriber_ASDU_getDataSize(SVSubscriber_ASDU self)
Returns the size of the data part of the ASDU.
LIB61850_API uint64_t SVSubscriber_ASDU_getINT64U(SVSubscriber_ASDU self, int index)
Get an INT64U data value in the data part of the ASDU.
LIB61850_API int64_t SVSubscriber_ASDU_getINT64(SVSubscriber_ASDU self, int index)
Get an INT64 data value in the data part of the ASDU.
LIB61850_API int32_t SVSubscriber_ASDU_getINT32(SVSubscriber_ASDU self, int index)
Get an INT32 data value in the data part of the ASDU.
LIB61850_API bool SVSubscriber_ASDU_hasSmpMod(SVSubscriber_ASDU self)
Check if SmpMod value is included in the SV ASDU.
LIB61850_API uint8_t SVSubscriber_ASDU_getSmpMod(SVSubscriber_ASDU self)
return the SmpMod value included in the SV ASDU
LIB61850_API uint16_t SVSubscriber_ASDU_getINT16U(SVSubscriber_ASDU self, int index)
Get an INT16U data value in the data part of the ASDU.
LIB61850_API uint32_t SVSubscriber_ASDU_getINT32U(SVSubscriber_ASDU self, int index)
Get an INT32U data value in the data part of the ASDU.
uint8_t SVSubscriber_ASDU_getSmpSynch(SVSubscriber_ASDU self)
return the SmpSynch value included in the SV ASDU
LIB61850_API double SVSubscriber_ASDU_getFLOAT64(SVSubscriber_ASDU self, int index)
Get an FLOAT64 data value in the data part of the ASDU.
LIB61850_API uint16_t SVSubscriber_ASDU_getSmpCnt(SVSubscriber_ASDU self)
return the SmpCnt value included in the SV ASDU
LIB61850_API uint8_t SVSubscriber_ASDU_getINT8U(SVSubscriber_ASDU self, int index)
Get an INT8U data value in the data part of the ASDU.
LIB61850_API int16_t SVSubscriber_ASDU_getINT16(SVSubscriber_ASDU self, int index)
Get an INT16 data value in the data part of the ASDU.
LIB61850_API const char * SVSubscriber_ASDU_getSvId(SVSubscriber_ASDU self)
return the SvID value included in the SV ASDU
LIB61850_API float SVSubscriber_ASDU_getFLOAT32(SVSubscriber_ASDU self, int index)
Get an FLOAT32 data value in the data part of the ASDU.
LIB61850_API uint16_t SVSubscriber_ASDU_getSmpRate(SVSubscriber_ASDU self)
return the SmpRate value included in the SV ASDU
Definition: iec61850_common.h:417