libiec61850  1.5.3
Modules | Macros | Typedefs | Functions | Variables
IEC 61850 Sampled Values (SV) publisher API

Modules

 Values Application Service Data Unit (ASDU)
 
 Deprecated API
 

Macros

#define IEC61850_SV_SMPSYNC_NOT_SYNCHRONIZED   0
 
#define IEC61850_SV_SMPSYNC_SYNCED_UNSPEC_LOCAL_CLOCK   1
 
#define IEC61850_SV_SMPSYNC_SYNCED_GLOBAL_CLOCK   2
 
#define IEC61850_SV_SMPMOD_PER_NOMINAL_PERIOD   0
 
#define IEC61850_SV_SMPMOD_SAMPLES_PER_SECOND   1
 
#define IEC61850_SV_SMPMOD_SECONDS_PER_SAMPLE   2
 
#define DEPRECATED
 

Typedefs

typedef struct sSVPublisher * SVPublisher
 An opaque type representing an IEC 61850-9-2 Sampled Values publisher. More...
 
typedef struct sSVPublisher_ASDU * SVPublisher_ASDU
 An opaque type representing an IEC 61850-9-2 Sampled Values Application Service Data Unit (ASDU). More...
 

Functions

LIB61850_API SVPublisher SVPublisher_create (CommParameters *parameters, const char *interfaceId)
 Create a new IEC61850-9-2 Sampled Values publisher. More...
 
LIB61850_API SVPublisher SVPublisher_createEx (CommParameters *parameters, const char *interfaceId, bool useVlanTag)
 Create a new IEC61850-9-2 Sampled Values publisher. More...
 
LIB61850_API SVPublisher_ASDU SVPublisher_addASDU (SVPublisher self, const char *svID, const char *datset, uint32_t confRev)
 Create an Application Service Data Unit (ASDU) and add it to an existing Sampled Values publisher. More...
 
LIB61850_API void SVPublisher_setupComplete (SVPublisher self)
 Prepare the publisher for publishing. More...
 
LIB61850_API void SVPublisher_publish (SVPublisher self)
 Publish all registered ASDUs. More...
 
LIB61850_API void SVPublisher_destroy (SVPublisher self)
 Destroy an IEC61850-9-2 Sampled Values instance. More...
 

Variables

uint8_t CommParameters::vlanPriority
 
uint16_t CommParameters::vlanId
 
uint16_t CommParameters::appId
 
uint8_t CommParameters::dstAddress [6]
 

Detailed Description

Macro Definition Documentation

◆ DEPRECATED

#define DEPRECATED

◆ IEC61850_SV_SMPMOD_PER_NOMINAL_PERIOD

#define IEC61850_SV_SMPMOD_PER_NOMINAL_PERIOD   0

◆ IEC61850_SV_SMPMOD_SAMPLES_PER_SECOND

#define IEC61850_SV_SMPMOD_SAMPLES_PER_SECOND   1

◆ IEC61850_SV_SMPMOD_SECONDS_PER_SAMPLE

#define IEC61850_SV_SMPMOD_SECONDS_PER_SAMPLE   2

◆ IEC61850_SV_SMPSYNC_NOT_SYNCHRONIZED

#define IEC61850_SV_SMPSYNC_NOT_SYNCHRONIZED   0

◆ IEC61850_SV_SMPSYNC_SYNCED_GLOBAL_CLOCK

#define IEC61850_SV_SMPSYNC_SYNCED_GLOBAL_CLOCK   2

◆ IEC61850_SV_SMPSYNC_SYNCED_UNSPEC_LOCAL_CLOCK

#define IEC61850_SV_SMPSYNC_SYNCED_UNSPEC_LOCAL_CLOCK   1

Typedef Documentation

◆ SVPublisher

typedef struct sSVPublisher* SVPublisher

An opaque type representing an IEC 61850-9-2 Sampled Values publisher.

◆ SVPublisher_ASDU

typedef struct sSVPublisher_ASDU* SVPublisher_ASDU

An opaque type representing an IEC 61850-9-2 Sampled Values Application Service Data Unit (ASDU).

Function Documentation

◆ SVPublisher_addASDU()

LIB61850_API SVPublisher_ASDU SVPublisher_addASDU ( SVPublisher  self,
const char *  svID,
const char *  datset,
uint32_t  confRev 
)

Create an Application Service Data Unit (ASDU) and add it to an existing Sampled Values publisher.

Parameters
[in]svID
[in]datset
[in]confRevConfiguration revision number. Should be incremented each time that the configuration of the logical device changes.
Returns
the new ASDU instance.

◆ SVPublisher_create()

LIB61850_API SVPublisher SVPublisher_create ( CommParameters parameters,
const char *  interfaceId 
)

Create a new IEC61850-9-2 Sampled Values publisher.

NOTE: VLAN tagging is enabled when calling this constructor. To disable VLAN tagging use SVPublisher_createEx instead.

Parameters
[in]interfaceIdthe name of the interface over which the SV publisher should send SV packets.
[in]parametersoptional parameters for setting VLAN options and destination MAC address. Use NULL for default values.
Returns
the new SV publisher instance.

◆ SVPublisher_createEx()

LIB61850_API SVPublisher SVPublisher_createEx ( CommParameters parameters,
const char *  interfaceId,
bool  useVlanTag 
)

Create a new IEC61850-9-2 Sampled Values publisher.

Parameters
[in]interfaceIdthe name of the interface over which the SV publisher should send SV packets.
[in]parametersoptional parameters for setting VLAN options and destination MAC address. Use NULL for default values.
[in]useVlanTagsenable(true)/disable(false) VLAN tagging
Returns
the new SV publisher instance.

◆ SVPublisher_destroy()

LIB61850_API void SVPublisher_destroy ( SVPublisher  self)

Destroy an IEC61850-9-2 Sampled Values instance.

Parameters
[in]selfthe Sampled Values publisher instance.

◆ SVPublisher_publish()

LIB61850_API void SVPublisher_publish ( SVPublisher  self)

Publish all registered ASDUs.

Parameters
[in]selfthe Sampled Values publisher instance.

◆ SVPublisher_setupComplete()

LIB61850_API void SVPublisher_setupComplete ( SVPublisher  self)

Prepare the publisher for publishing.

This method must be called before SVPublisher_publish().

Parameters
[in]selfthe Sampled Values publisher instance.

Variable Documentation

◆ appId

uint16_t CommParameters::appId

◆ dstAddress

uint8_t CommParameters::dstAddress

◆ vlanId

uint16_t CommParameters::vlanId

◆ vlanPriority

uint8_t CommParameters::vlanPriority