24 #ifndef SAMPLED_VALUES_SV_SUBSCRIBER_H_ 25 #define SAMPLED_VALUES_SV_SUBSCRIBER_H_ 27 #include "libiec61850_common_api.h" 112 typedef void (*
SVUpdateListener)(SVSubscriber subscriber,
void* parameter, SVClientASDU asdu);
int16_t SVClientASDU_getINT16(SVClientASDU self, int index)
Get an INT16 data value in the data part of the ASDU.
int32_t SVClientASDU_getINT32(SVClientASDU self, int index)
Get an INT32 data value in the data part of the ASDU.
uint16_t SVClientASDU_getINT16U(SVClientASDU self, int index)
Get an INT16U data value in the data part of the ASDU.
uint16_t SVClientASDU_getSmpCnt(SVClientASDU self)
return the SmpCnt value included in the SV ASDU
bool SVReceiver_tick(SVReceiver self)
void SVSubscriber_destroy(SVSubscriber self)
void SVReceiver_removeSubscriber(SVReceiver self, SVSubscriber subscriber)
Disconnect subscriber and receiver.
int8_t SVClientASDU_getINT8(SVClientASDU self, int index)
Get an INT8 data value in the data part of the ASDU.
uint32_t SVClientASDU_getINT32U(SVClientASDU self, int index)
Get an INT32U data value in the data part of the ASDU.
void SVReceiver_disableDestAddrCheck(SVReceiver self)
Disable check for destination address of the received SV messages.
const char * SVClientASDU_getSvId(SVClientASDU self)
return the SvID value included in the SV ASDU
void SVReceiver_destroy(SVReceiver self)
Destroy receiver instance (cleanup resources)
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:117
uint8_t SVClientASDU_getINT8U(SVClientASDU self, int index)
Get an INT8U data value in the data part of the ASDU.
void SVReceiver_stop(SVReceiver self)
Receiver stops listening for SV messages.
SVReceiver SVReceiver_create(void)
Create a new SV receiver instance.
struct sSVSubscriber * SVSubscriber
opaque handle to a SV subscriber instance
Definition: sv_subscriber.h:101
void SVReceiver_startThreadless(SVReceiver self)
double SVClientASDU_getFLOAT64(SVClientASDU self, int index)
Get an FLOAT64 data value in the data part of the ASDU.
int SVClientASDU_getDataSize(SVClientASDU self)
Returns the size of the data part of the ASDU.
void SVReceiver_start(SVReceiver self)
Receiver starts listening for SV messages.
void SVReceiver_setInterfaceId(SVReceiver self, const char *interfaceId)
Set the Ethernet interface ID for the receiver instance.
void(* SVUpdateListener)(SVSubscriber subscriber, void *parameter, SVClientASDU asdu)
Callback function for received SV messages.
Definition: sv_subscriber.h:112
SVSubscriber SVSubscriber_create(const uint8_t *ethAddr, uint16_t appID)
struct sSVClientASDU * SVClientASDU
opaque handle to a SV ASDU (Application service data unit) instance.
Definition: sv_subscriber.h:92
void SVReceiver_addSubscriber(SVReceiver self, SVSubscriber subscriber)
Add a subscriber instance to the receiver.
float SVClientASDU_getFLOAT32(SVClientASDU self, int index)
Get an FLOAT32 data value in the data part of the ASDU.
uint32_t SVClientASDU_getConfRev(SVClientASDU self)
return the ConfRev value included in the SV ASDU
void SVReceiver_stopThreadless(SVReceiver self)