25 #ifndef LIBIEC61850_SRC_SAMPLED_VALUES_SV_PUBLISHER_H_
26 #define LIBIEC61850_SRC_SAMPLED_VALUES_SV_PUBLISHER_H_
34 #ifndef GOOSE_SV_COMM_PARAMETERS
35 #define GOOSE_SV_COMM_PARAMETERS
37 typedef struct sCommParameters {
41 uint8_t dstAddress[6];
51 #define IEC61850_SV_SMPSYNC_NOT_SYNCHRONIZED 0
52 #define IEC61850_SV_SMPSYNC_SYNCED_UNSPEC_LOCAL_CLOCK 1
53 #define IEC61850_SV_SMPSYNC_SYNCED_GLOBAL_CLOCK 2
55 #define IEC61850_SV_SMPMOD_PER_NOMINAL_PERIOD 0
56 #define IEC61850_SV_SMPMOD_SAMPLES_PER_SECOND 1
57 #define IEC61850_SV_SMPMOD_SECONDS_PER_SAMPLE 2
295 LIB61850_API uint16_t
408 #if defined(__GNUC__) || defined(__clang__)
409 #define DEPRECATED __attribute__((deprecated))
uint16_t Quality
Definition: iec61850_common.h:330
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.
LIB61850_API SVPublisher SVPublisher_createEx(CommParameters *parameters, const char *interfaceId, bool useVlanTag)
Create a new IEC61850-9-2 Sampled Values publisher.
LIB61850_API void SVPublisher_destroy(SVPublisher self)
Destroy an IEC61850-9-2 Sampled Values instance.
struct sSVPublisher_ASDU * SVPublisher_ASDU
An opaque type representing an IEC 61850-9-2 Sampled Values Application Service Data Unit (ASDU).
Definition: sv_publisher.h:67
LIB61850_API void SVPublisher_publish(SVPublisher self)
Publish all registered ASDUs.
LIB61850_API void SVPublisher_setupComplete(SVPublisher self)
Prepare the publisher for publishing.
LIB61850_API SVPublisher SVPublisher_create(CommParameters *parameters, const char *interfaceId)
Create a new IEC61850-9-2 Sampled Values publisher.
#define DEPRECATED
Definition: sv_publisher.h:411
struct sSVPublisher * SVPublisher
An opaque type representing an IEC 61850-9-2 Sampled Values publisher.
Definition: sv_publisher.h:62
LIB61850_API int SVPublisher_ASDU_addINT64(SVPublisher_ASDU self)
Reserve memory for a signed 64-bit integer in the ASDU.
LIB61850_API void SVPublisher_ASDU_setINT32(SVPublisher_ASDU self, int index, int32_t value)
Set the value of a 32-bit integer in the ASDU.
LIB61850_API void SVPublisher_ASDU_enableRefrTm(SVPublisher_ASDU self)
Enables the transmission of refresh time attribute of the ASDU.
LIB61850_API void SVPublisher_ASDU_setSmpCntWrap(SVPublisher_ASDU self, uint16_t value)
Set the roll-over (wrap) limit for the sample counter. When reaching the limit the sample counter wil...
LIB61850_API void SVPublisher_ASDU_setSmpRate(SVPublisher_ASDU self, uint16_t smpRate)
Set the sample rate attribute of the ASDU.
LIB61850_API uint16_t SVPublisher_ASDU_getSmpCnt(SVPublisher_ASDU self)
Get the sample count attribute of the ASDU.
LIB61850_API void SVPublisher_ASDU_increaseSmpCnt(SVPublisher_ASDU self)
Increment the sample count attribute of the ASDU.
LIB61850_API int SVPublisher_ASDU_addTimestamp(SVPublisher_ASDU self)
Reserve memory for a 64 bit time stamp in the ASDU.
LIB61850_API int SVPublisher_ASDU_addINT8(SVPublisher_ASDU self)
Reserve memory for a signed 8-bit integer in the ASDU.
LIB61850_API int SVPublisher_ASDU_addFLOAT(SVPublisher_ASDU self)
Reserve memory for a single precision floating point number in the ASDU.
LIB61850_API void SVPublisher_ASDU_setSmpMod(SVPublisher_ASDU self, uint8_t smpMod)
Set the sample mode attribute of the ASDU.
LIB61850_API void SVPublisher_ASDU_setINT8(SVPublisher_ASDU self, int index, int8_t value)
Set the value of a 8-bit integer in the ASDU.
LIB61850_API void SVPublisher_ASDU_setINT64(SVPublisher_ASDU self, int index, int64_t value)
Set the value of a 64-bit integer in the ASDU.
LIB61850_API void SVPublisher_ASDU_setSmpCnt(SVPublisher_ASDU self, uint16_t value)
Set the sample count attribute of the ASDU.
LIB61850_API void SVPublisher_ASDU_resetBuffer(SVPublisher_ASDU self)
Reset the internal data buffer of an ASDU.
LIB61850_API void SVPublisher_ASDU_setTimestamp(SVPublisher_ASDU self, int index, Timestamp value)
Set the value of a 64 bit time stamp in the ASDU.
LIB61850_API int SVPublisher_ASDU_addFLOAT64(SVPublisher_ASDU self)
Reserve memory for a double precision floating point number in the ASDU.
LIB61850_API int SVPublisher_ASDU_addQuality(SVPublisher_ASDU self)
Reserve memory for a quality value in the ASDU.
LIB61850_API void SVPublisher_ASDU_setRefrTm(SVPublisher_ASDU self, msSinceEpoch refrTm)
Set the refresh time attribute of the ASDU with millisecond resolution.
LIB61850_API int SVPublisher_ASDU_addINT32(SVPublisher_ASDU self)
Reserve memory for a signed 32-bit integer in the ASDU.
LIB61850_API void SVPublisher_ASDU_setFLOAT(SVPublisher_ASDU self, int index, float value)
Set the value of a single precision floating point number in the ASDU.
LIB61850_API void SVPublisher_ASDU_setRefrTmByTimestamp(SVPublisher_ASDU self, Timestamp *refrTm)
Set the refresh time attribute of the ASDU.
LIB61850_API void SVPublisher_ASDU_setQuality(SVPublisher_ASDU self, int index, Quality value)
Set the value of a quality attribute in the ASDU.
LIB61850_API void SVPublisher_ASDU_setFLOAT64(SVPublisher_ASDU self, int index, double value)
Set the value of a double precision floating pointer number in the ASDU.
LIB61850_API void SVPublisher_ASDU_setSmpSynch(SVPublisher_ASDU self, uint16_t smpSynch)
Set the clock synchronization information.
LIB61850_API void SVPublisher_ASDU_setRefrTmNs(SVPublisher_ASDU self, nsSinceEpoch refrTmNs)
Set the refresh time attribute of the ASDU with nanosecond resolution.
LIB61850_API DEPRECATED void SV_ASDU_resetBuffer(SVPublisher_ASDU self)
LIB61850_API DEPRECATED void SampledValuesPublisher_publish(SVPublisher self)
LIB61850_API DEPRECATED int SV_ASDU_addINT64(SVPublisher_ASDU self)
LIB61850_API DEPRECATED void SV_ASDU_setFLOAT64(SVPublisher_ASDU self, int index, double value)
LIB61850_API DEPRECATED int SV_ASDU_addINT8(SVPublisher_ASDU self)
LIB61850_API DEPRECATED void SV_ASDU_setINT32(SVPublisher_ASDU self, int index, int32_t value)
LIB61850_API DEPRECATED int SV_ASDU_addFLOAT64(SVPublisher_ASDU self)
LIB61850_API DEPRECATED void SampledValuesPublisher_setupComplete(SVPublisher self)
LIB61850_API DEPRECATED void SV_ASDU_increaseSmpCnt(SVPublisher_ASDU self)
struct sSV_ASDU * SV_ASDU
Definition: sv_publisher.h:424
LIB61850_API DEPRECATED void SV_ASDU_setINT8(SVPublisher_ASDU self, int index, int8_t value)
LIB61850_API DEPRECATED void SV_ASDU_setSmpRate(SVPublisher_ASDU self, uint16_t smpRate)
LIB61850_API DEPRECATED int SV_ASDU_addFLOAT(SVPublisher_ASDU self)
LIB61850_API DEPRECATED SVPublisher_ASDU SampledValuesPublisher_addASDU(SVPublisher self, char *svID, char *datset, uint32_t confRev)
LIB61850_API DEPRECATED int SV_ASDU_addINT32(SVPublisher_ASDU self)
LIB61850_API DEPRECATED SVPublisher SampledValuesPublisher_create(CommParameters *parameters, const char *interfaceId)
struct sSVPublisher * SampledValuesPublisher
Definition: sv_publisher.h:422
LIB61850_API DEPRECATED void SV_ASDU_setINT64(SVPublisher_ASDU self, int index, int64_t value)
LIB61850_API DEPRECATED uint16_t SV_ASDU_getSmpCnt(SVPublisher_ASDU self)
LIB61850_API DEPRECATED void SampledValuesPublisher_destroy(SVPublisher self)
LIB61850_API DEPRECATED void SV_ASDU_setSmpMod(SVPublisher_ASDU self, uint8_t smpMod)
LIB61850_API DEPRECATED void SV_ASDU_setSmpCnt(SVPublisher_ASDU self, uint16_t value)
LIB61850_API DEPRECATED void SV_ASDU_setFLOAT(SVPublisher_ASDU self, int index, float value)
LIB61850_API DEPRECATED void SV_ASDU_setRefrTm(SVPublisher_ASDU self, uint64_t refrTm)
Definition: goose_publisher.h:43
Definition: iec61850_common.h:421