libiec61850  1.2.0
Macros | Typedefs | Functions
sv_subscriber.h File Reference
#include "libiec61850_common_api.h"
#include "iec61850_common.h"
#include "hal_ethernet.h"

Go to the source code of this file.

Macros

#define DEPRECATED
 

Typedefs

typedef struct sSVSubscriber_ASDU * SVSubscriber_ASDU
 opaque handle to a SV ASDU (Application service data unit) instance. More...
 
typedef struct sSVSubscriber * SVSubscriber
 opaque handle to a SV subscriber instance More...
 
typedef void(* SVUpdateListener) (SVSubscriber subscriber, void *parameter, SVSubscriber_ASDU asdu)
 Callback function for received SV messages. More...
 
typedef struct sSVReceiver * SVReceiver
 opaque handle to a SV receiver instance More...
 
typedef struct sSVSubscriberASDU * SVClientASDU
 

Functions

SVReceiver SVReceiver_create (void)
 Create a new SV receiver instance. More...
 
void SVReceiver_disableDestAddrCheck (SVReceiver self)
 Disable check for destination address of the received SV messages. More...
 
void SVReceiver_setInterfaceId (SVReceiver self, const char *interfaceId)
 Set the Ethernet interface ID for the receiver instance. More...
 
void SVReceiver_addSubscriber (SVReceiver self, SVSubscriber subscriber)
 Add a subscriber instance to the receiver. More...
 
void SVReceiver_removeSubscriber (SVReceiver self, SVSubscriber subscriber)
 Disconnect subscriber and receiver. More...
 
void SVReceiver_start (SVReceiver self)
 Receiver starts listening for SV messages. More...
 
void SVReceiver_stop (SVReceiver self)
 Receiver stops listening for SV messages. More...
 
bool SVReceiver_isRunning (SVReceiver self)
 Check if SV receiver is running. More...
 
void SVReceiver_destroy (SVReceiver self)
 Destroy receiver instance (cleanup resources) More...
 
EthernetSocket SVReceiver_startThreadless (SVReceiver self)
 
void SVReceiver_stopThreadless (SVReceiver self)
 
bool SVReceiver_tick (SVReceiver self)
 Parse SV messages if they are available. More...
 
SVSubscriber SVSubscriber_create (const uint8_t *ethAddr, uint16_t appID)
 
void SVSubscriber_setListener (SVSubscriber self, SVUpdateListener listener, void *parameter)
 Set a callback handler to process received SV messages. More...
 
void SVSubscriber_destroy (SVSubscriber self)
 
uint16_t SVSubscriber_ASDU_getSmpCnt (SVSubscriber_ASDU self)
 return the SmpCnt value included in the SV ASDU More...
 
const char * SVSubscriber_ASDU_getSvId (SVSubscriber_ASDU self)
 return the SvID value included in the SV ASDU More...
 
const char * SVSubscriber_ASDU_getDatSet (SVSubscriber_ASDU self)
 return the DatSet value included in the SV ASDU More...
 
uint32_t SVSubscriber_ASDU_getConfRev (SVSubscriber_ASDU self)
 return the ConfRev value included in the SV ASDU More...
 
uint8_t SVSubscriber_ASDU_getSmpMod (SVSubscriber_ASDU self)
 return the SmpMod value included in the SV ASDU More...
 
uint16_t SVSubscriber_ASDU_getSmpRate (SVSubscriber_ASDU self)
 return the SmpRate value included in the SV ASDU More...
 
bool SVSubscriber_ASDU_hasDatSet (SVSubscriber_ASDU self)
 Check if DatSet value is included in the SV ASDU. More...
 
bool SVSubscriber_ASDU_hasRefrTm (SVSubscriber_ASDU self)
 Check if RefrTm value is included in the SV ASDU. More...
 
bool SVSubscriber_ASDU_hasSmpMod (SVSubscriber_ASDU self)
 Check if SmpMod value is included in the SV ASDU. More...
 
bool SVSubscriber_ASDU_hasSmpRate (SVSubscriber_ASDU self)
 Check if SmpRate value is included in the SV ASDU. More...
 
uint64_t SVSubscriber_ASDU_getRefrTmAsMs (SVSubscriber_ASDU self)
 Get the RefrTim value included in SV ASDU as ms timestamp. More...
 
int8_t SVSubscriber_ASDU_getINT8 (SVSubscriber_ASDU self, int index)
 Get an INT8 data value in the data part of the ASDU. More...
 
int16_t SVSubscriber_ASDU_getINT16 (SVSubscriber_ASDU self, int index)
 Get an INT16 data value in the data part of the ASDU. More...
 
int32_t SVSubscriber_ASDU_getINT32 (SVSubscriber_ASDU self, int index)
 Get an INT32 data value in the data part of the ASDU. More...
 
int64_t SVSubscriber_ASDU_getINT64 (SVSubscriber_ASDU self, int index)
 Get an INT64 data value in the data part of the ASDU. More...
 
uint8_t SVSubscriber_ASDU_getINT8U (SVSubscriber_ASDU self, int index)
 Get an INT8U data value in the data part of the ASDU. More...
 
uint16_t SVSubscriber_ASDU_getINT16U (SVSubscriber_ASDU self, int index)
 Get an INT16U data value in the data part of the ASDU. More...
 
uint32_t SVSubscriber_ASDU_getINT32U (SVSubscriber_ASDU self, int index)
 Get an INT32U data value in the data part of the ASDU. More...
 
uint64_t SVSubscriber_ASDU_getINT64U (SVSubscriber_ASDU self, int index)
 Get an INT64U data value in the data part of the ASDU. More...
 
float SVSubscriber_ASDU_getFLOAT32 (SVSubscriber_ASDU self, int index)
 Get an FLOAT32 data value in the data part of the ASDU. More...
 
double SVSubscriber_ASDU_getFLOAT64 (SVSubscriber_ASDU self, int index)
 Get an FLOAT64 data value in the data part of the ASDU. More...
 
Timestamp SVSubscriber_ASDU_getTimestamp (SVSubscriber_ASDU self, int index)
 Get a timestamp data value in the data part of the ASDU. More...
 
Quality SVSubscriber_ASDU_getQuality (SVSubscriber_ASDU self, int index)
 Get a quality value in the data part of the ASDU. More...
 
int SVSubscriber_ASDU_getDataSize (SVSubscriber_ASDU self)
 Returns the size of the data part of the ASDU. More...
 
DEPRECATED uint16_t SVClientASDU_getSmpCnt (SVSubscriber_ASDU self)
 
DEPRECATED const char * SVClientASDU_getSvId (SVSubscriber_ASDU self)
 
DEPRECATED uint32_t SVClientASDU_getConfRev (SVSubscriber_ASDU self)
 
DEPRECATED bool SVClientASDU_hasRefrTm (SVSubscriber_ASDU self)
 
DEPRECATED uint64_t SVClientASDU_getRefrTmAsMs (SVSubscriber_ASDU self)
 
DEPRECATED int8_t SVClientASDU_getINT8 (SVSubscriber_ASDU self, int index)
 
DEPRECATED int16_t SVClientASDU_getINT16 (SVSubscriber_ASDU self, int index)
 
DEPRECATED int32_t SVClientASDU_getINT32 (SVSubscriber_ASDU self, int index)
 
DEPRECATED int64_t SVClientASDU_getINT64 (SVSubscriber_ASDU self, int index)
 
DEPRECATED uint8_t SVClientASDU_getINT8U (SVSubscriber_ASDU self, int index)
 
DEPRECATED uint16_t SVClientASDU_getINT16U (SVSubscriber_ASDU self, int index)
 
DEPRECATED uint32_t SVClientASDU_getINT32U (SVSubscriber_ASDU self, int index)
 
DEPRECATED uint64_t SVClientASDU_getINT64U (SVSubscriber_ASDU self, int index)
 
DEPRECATED float SVClientASDU_getFLOAT32 (SVSubscriber_ASDU self, int index)
 
DEPRECATED double SVClientASDU_getFLOAT64 (SVSubscriber_ASDU self, int index)
 
DEPRECATED int SVClientASDU_getDataSize (SVSubscriber_ASDU self)