Merge remote-tracking branch 'refs/remotes/mz-automation/master'

pull/11/head
yiqifeiyang 9 years ago
commit df6177b4c3

@ -1,5 +1,10 @@
Changes to version 1.0.1 Changes to version 1.0.1
------------------------ ------------------------
- server: fixed problem in COTP src/dst reference handling (returning zero src reference)
- client: fixed problem in report handling when RCB contains no rptID
- Python: added pyiec61850 tutorial and example thanks to Cédric Boudinet
- .NET API: fixed server side bug with connection indication handler
- added Lantronix XPORT PRO uclinux make target
- .NET API: fixed bug in client readValue functions - .NET API: fixed bug in client readValue functions
- .NET API: added MmsValue.GetDataAccessError() method - .NET API: added MmsValue.GetDataAccessError() method

@ -79,10 +79,13 @@ set(API_HEADERS
src/hal/inc/hal_time.h src/hal/inc/hal_time.h
src/hal/inc/hal_thread.h src/hal/inc/hal_thread.h
src/hal/inc/hal_filesystem.h src/hal/inc/hal_filesystem.h
src/hal/inc/platform_endian.h
src/common/inc/libiec61850_common_api.h src/common/inc/libiec61850_common_api.h
src/common/inc/libiec61850_platform_includes.h
src/common/inc/linked_list.h src/common/inc/linked_list.h
src/common/inc/byte_buffer.h src/common/inc/byte_buffer.h
src/common/inc/lib_memory.h src/common/inc/lib_memory.h
src/common/inc/string_utilities.h
src/iec61850/inc/iec61850_client.h src/iec61850/inc/iec61850_client.h
src/iec61850/inc/iec61850_common.h src/iec61850/inc/iec61850_common.h
src/iec61850/inc/iec61850_server.h src/iec61850/inc/iec61850_server.h
@ -108,6 +111,7 @@ set(API_HEADERS
src/sampled_values/sv_subscriber.h src/sampled_values/sv_subscriber.h
src/sampled_values/sv_publisher.h src/sampled_values/sv_publisher.h
src/logging/logging_api.h src/logging/logging_api.h
${CMAKE_CURRENT_BINARY_DIR}/config/stack_config.h
) )
IF(MSVC) IF(MSVC)

@ -24,6 +24,7 @@
#define DEBUG_GOOSE_SUBSCRIBER 0 #define DEBUG_GOOSE_SUBSCRIBER 0
#define DEBUG_GOOSE_PUBLISHER 0 #define DEBUG_GOOSE_PUBLISHER 0
#define DEBUG_SV_SUBSCRIBER 0 #define DEBUG_SV_SUBSCRIBER 0
#define DEBUG_SV_PUBLISHER 0
#define DEBUG_HAL_ETHERNET 0 #define DEBUG_HAL_ETHERNET 0
/* Maximum MMS PDU SIZE - default is 65000 */ /* Maximum MMS PDU SIZE - default is 65000 */

@ -432,19 +432,26 @@ namespace IEC61850
IedConnection_destroy (connection); IedConnection_destroy (connection);
} }
} }
private IsoConnectionParameters isoConnectionParameters = null;
/// <summary> /// <summary>
/// Gets the connection parameters /// Gets the connection parameters
/// </summary> /// </summary>
/// <returns>The connection parameters</returns> /// <returns>The connection parameters</returns>
public IsoConnectionParameters GetConnectionParameters () public IsoConnectionParameters GetConnectionParameters ()
{ {
IntPtr mmsConnection = IedConnection_getMmsConnection(connection); if (isoConnectionParameters == null)
{
IntPtr parameters = MmsConnection_getIsoConnectionParameters(mmsConnection); IntPtr mmsConnection = IedConnection_getMmsConnection(connection);
return new IsoConnectionParameters(parameters); IntPtr parameters = MmsConnection_getIsoConnectionParameters(mmsConnection);
isoConnectionParameters = new IsoConnectionParameters(parameters);
}
return isoConnectionParameters;
} }
private void FreeHGlobaleDeleteFunction (IntPtr pointer) private void FreeHGlobaleDeleteFunction (IntPtr pointer)

@ -102,8 +102,6 @@ namespace IEC61850
{ {
if (authParameter != IntPtr.Zero) if (authParameter != IntPtr.Zero)
AcseAuthenticationParameter_destroy(authParameter); AcseAuthenticationParameter_destroy(authParameter);
//IsoConnectionParameters_destroy(self);
} }
/// <summary> /// <summary>

@ -21,7 +21,6 @@ namespace authenticate
Console.WriteLine("Connect to " + hostname); Console.WriteLine("Connect to " + hostname);
try try
{ {
IsoConnectionParameters parameters = con.GetConnectionParameters(); IsoConnectionParameters parameters = con.GetConnectionParameters();

@ -93,8 +93,6 @@ namespace reporting
rcb1.SetIntgPd(5000); rcb1.SetIntgPd(5000);
rcb1.SetRptEna(true); rcb1.SetRptEna(true);
rcb1.SetRCBValues();
rcb2.GetRCBValues(); rcb2.GetRCBValues();
if (rcb2.IsBuffered()) if (rcb2.IsBuffered())

@ -29,7 +29,9 @@ gooseListener(GooseSubscriber subscriber, void* parameter)
printf(" stNum: %u sqNum: %u\n", GooseSubscriber_getStNum(subscriber), printf(" stNum: %u sqNum: %u\n", GooseSubscriber_getStNum(subscriber),
GooseSubscriber_getSqNum(subscriber)); GooseSubscriber_getSqNum(subscriber));
printf(" timeToLive: %u\n", GooseSubscriber_getTimeAllowedToLive(subscriber)); printf(" timeToLive: %u\n", GooseSubscriber_getTimeAllowedToLive(subscriber));
#ifndef _WIN32
printf(" timestamp: %"PRIu64"\n", GooseSubscriber_getTimestamp(subscriber)); printf(" timestamp: %"PRIu64"\n", GooseSubscriber_getTimestamp(subscriber));
#endif
MmsValue* values = GooseSubscriber_getDataSetValues(subscriber); MmsValue* values = GooseSubscriber_getDataSetValues(subscriber);

@ -65,8 +65,8 @@ int main(int argc, char** argv) {
if (error != IED_ERROR_OK) if (error != IED_ERROR_OK)
printf("failed to write simpleIOGenericIO/GGIO1.NamPlt.vendor!\n"); printf("failed to write simpleIOGenericIO/GGIO1.NamPlt.vendor!\n");
else
MmsValue_delete(value); MmsValue_delete(value);
/* read data set */ /* read data set */
@ -117,6 +117,8 @@ int main(int argc, char** argv) {
ClientDataSet_destroy(clientDataSet); ClientDataSet_destroy(clientDataSet);
ClientReportControlBlock_destroy(rcb);
close_connection: close_connection:
IedConnection_close(con); IedConnection_close(con);

@ -42,8 +42,9 @@ printDataDirectory(char* doRef, IedConnection con, int spaces)
sprintf(daRef, "%s.%s", doRef, daName); sprintf(daRef, "%s.%s", doRef, daName);
printDataDirectory(daRef, con, spaces + 2); printDataDirectory(daRef, con, spaces + 2);
} }
} }
LinkedList_destroy(dataAttributes);
} }
int int
@ -145,6 +146,8 @@ main(int argc, char** argv)
dataSetMemberRef = LinkedList_getNext(dataSetMemberRef); dataSetMemberRef = LinkedList_getNext(dataSetMemberRef);
} }
LinkedList_destroy(dataSetMembers);
dataSet = LinkedList_getNext(dataSet); dataSet = LinkedList_getNext(dataSet);
} }

@ -14,8 +14,9 @@
#include "hal_thread.h" #include "hal_thread.h"
int main(int argc, char** argv) { int
main(int argc, char** argv)
{
char* hostname; char* hostname;
int tcpPort = 102; int tcpPort = 102;
@ -46,25 +47,22 @@ int main(int argc, char** argv) {
/* use this to skip AP-Title completely - this may be required by some "obscure" servers */ /* use this to skip AP-Title completely - this may be required by some "obscure" servers */
// IsoConnectionParameters_setRemoteApTitle(parameters, NULL, 0); // IsoConnectionParameters_setRemoteApTitle(parameters, NULL, 0);
// IsoConnectionParameters_setLocalApTitle(parameters, NULL, 0); // IsoConnectionParameters_setLocalApTitle(parameters, NULL, 0);
TSelector localTSelector = { 3, { 0x00, 0x01, 0x02 } };
TSelector remoteTSelector = { 2, { 0x00, 0x01 } };
TSelector localTSelector = { 3, { 0x00, 0x01, 0x02 } }; SSelector sSelector1 = { 2, { 0, 1 } };
TSelector remoteTSelector = { 2, { 0x00, 0x01 } }; SSelector sSelector2 = { 5, { 0, 1, 2, 3, 4 } };
SSelector sSelector1 = {2, { 0, 1 } };
SSelector sSelector2 = {5, { 0, 1, 2, 3, 4 } };
/* change parameters for presentation, session and transport layers */ /* change parameters for presentation, session and transport layers */
IsoConnectionParameters_setRemoteAddresses(parameters, 0x12345678, sSelector1, localTSelector); IsoConnectionParameters_setRemoteAddresses(parameters, 0x12345678, sSelector1, localTSelector);
IsoConnectionParameters_setLocalAddresses(parameters, 0x87654321, sSelector2 , remoteTSelector); IsoConnectionParameters_setLocalAddresses(parameters, 0x87654321, sSelector2, remoteTSelector);
char* password = "top secret"; char* password = "top secret";
/* use authentication */ /* use authentication */
AcseAuthenticationParameter auth = (AcseAuthenticationParameter) calloc(1, sizeof(struct sAcseAuthenticationParameter)); AcseAuthenticationParameter auth = AcseAuthenticationParameter_create();
auth->mechanism = ACSE_AUTH_PASSWORD; AcseAuthenticationParameter_setAuthMechanism(auth, ACSE_AUTH_PASSWORD);
auth->value.password.octetString = (uint8_t*) password; AcseAuthenticationParameter_setPassword(auth, password);
auth->value.password.passwordLength = strlen(password);
IsoConnectionParameters_setAcseAuthenticationParameter(parameters, auth); IsoConnectionParameters_setAcseAuthenticationParameter(parameters, auth);
@ -84,6 +82,8 @@ int main(int argc, char** argv) {
} }
IedConnection_destroy(con); IedConnection_destroy(con);
AcseAuthenticationParameter_destroy(auth);
} }

@ -53,10 +53,6 @@ int main(int argc, char** argv) {
IedConnection con = IedConnection_create(); IedConnection con = IedConnection_create();
MmsConnection mmsCon = IedConnection_getMmsConnection(con);
MmsConnection_setLocalDetail(mmsCon, 800);
IedConnection_connect(con, &error, hostname, tcpPort); IedConnection_connect(con, &error, hostname, tcpPort);
if (error == IED_ERROR_OK) { if (error == IED_ERROR_OK) {

@ -4,6 +4,7 @@
#include <unistd.h> #include <unistd.h>
#include "string_utilities.h" #include "string_utilities.h"
#include "mms_client_connection.h" #include "mms_client_connection.h"
#include "conversions.h"
static void static void
print_help() print_help()
@ -351,6 +352,7 @@ int main(int argc, char** argv) {
} }
exit: exit:
free(hostname);
MmsConnection_destroy(con); MmsConnection_destroy(con);
} }

@ -87,9 +87,9 @@
<TrgOps dchg="true" qchg="true"/> <TrgOps dchg="true" qchg="true"/>
</LogControl> </LogControl>
<LogControl name="GeneralLog" datSet="" logName=""> <LogControl name="GeneralLog" logName="">
<TrgOps dchg="true" qchg="true"/> <TrgOps dchg="true" qchg="true"/>
</LogControl> </LogControl>
<Log /> <Log />

@ -1944,13 +1944,13 @@ extern ReportControlBlock iedModel_GenericIO_LLN0_report4;
extern ReportControlBlock iedModel_GenericIO_LLN0_report5; extern ReportControlBlock iedModel_GenericIO_LLN0_report5;
extern ReportControlBlock iedModel_GenericIO_LLN0_report6; extern ReportControlBlock iedModel_GenericIO_LLN0_report6;
ReportControlBlock iedModel_GenericIO_LLN0_report0 = {&iedModel_GenericIO_LLN0, "EventsRCB01", "Events1", false, "Events", 4294967295, 24, 111, 50, 1000, &iedModel_GenericIO_LLN0_report1}; ReportControlBlock iedModel_GenericIO_LLN0_report0 = {&iedModel_GenericIO_LLN0, "EventsRCB01", "Events1", false, "Events", 4294967295, 24, 239, 50, 1000, &iedModel_GenericIO_LLN0_report1};
ReportControlBlock iedModel_GenericIO_LLN0_report1 = {&iedModel_GenericIO_LLN0, "EventsIndexed01", "Events2", false, "Events", 1, 24, 111, 50, 1000, &iedModel_GenericIO_LLN0_report2}; ReportControlBlock iedModel_GenericIO_LLN0_report1 = {&iedModel_GenericIO_LLN0, "EventsIndexed01", "Events2", false, "Events", 1, 24, 239, 50, 1000, &iedModel_GenericIO_LLN0_report2};
ReportControlBlock iedModel_GenericIO_LLN0_report2 = {&iedModel_GenericIO_LLN0, "EventsIndexed02", "Events2", false, "Events", 1, 24, 111, 50, 1000, &iedModel_GenericIO_LLN0_report3}; ReportControlBlock iedModel_GenericIO_LLN0_report2 = {&iedModel_GenericIO_LLN0, "EventsIndexed02", "Events2", false, "Events", 1, 24, 239, 50, 1000, &iedModel_GenericIO_LLN0_report3};
ReportControlBlock iedModel_GenericIO_LLN0_report3 = {&iedModel_GenericIO_LLN0, "EventsIndexed03", "Events2", false, "Events", 1, 24, 111, 50, 1000, &iedModel_GenericIO_LLN0_report4}; ReportControlBlock iedModel_GenericIO_LLN0_report3 = {&iedModel_GenericIO_LLN0, "EventsIndexed03", "Events2", false, "Events", 1, 24, 239, 50, 1000, &iedModel_GenericIO_LLN0_report4};
ReportControlBlock iedModel_GenericIO_LLN0_report4 = {&iedModel_GenericIO_LLN0, "Measurements01", "Measurements", true, "Measurements", 1, 16, 111, 50, 1000, &iedModel_GenericIO_LLN0_report5}; ReportControlBlock iedModel_GenericIO_LLN0_report4 = {&iedModel_GenericIO_LLN0, "Measurements01", "Measurements", true, "Measurements", 1, 16, 239, 50, 1000, &iedModel_GenericIO_LLN0_report5};
ReportControlBlock iedModel_GenericIO_LLN0_report5 = {&iedModel_GenericIO_LLN0, "Measurements02", "Measurements", true, "Measurements", 1, 16, 111, 50, 1000, &iedModel_GenericIO_LLN0_report6}; ReportControlBlock iedModel_GenericIO_LLN0_report5 = {&iedModel_GenericIO_LLN0, "Measurements02", "Measurements", true, "Measurements", 1, 16, 239, 50, 1000, &iedModel_GenericIO_LLN0_report6};
ReportControlBlock iedModel_GenericIO_LLN0_report6 = {&iedModel_GenericIO_LLN0, "Measurements03", "Measurements", true, "Measurements", 1, 16, 111, 50, 1000, NULL}; ReportControlBlock iedModel_GenericIO_LLN0_report6 = {&iedModel_GenericIO_LLN0, "Measurements03", "Measurements", true, "Measurements", 1, 16, 239, 50, 1000, NULL};

@ -1,7 +1,7 @@
FIND_PACKAGE(SWIG REQUIRED) FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE}) INCLUDE(${SWIG_USE_FILE})
FIND_PACKAGE(PythonLibs REQUIRED) FIND_PACKAGE(PythonLibs REQUIRED)
FIND_PACKAGE ( PythonInterp REQUIRED ) FIND_PACKAGE ( PythonInterp ${PYTHONLIBS_VERSION_STRING} EXACT REQUIRED )
INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH}) INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
SET(CMAKE_SWIG_FLAGS "") SET(CMAKE_SWIG_FLAGS "")

@ -55,20 +55,20 @@ def testClient():
theVal = "testmodelSENSORS/TTMP1.TmpSp.setMag.f" theVal = "testmodelSENSORS/TTMP1.TmpSp.setMag.f"
theValType = iec61850.IEC61850_FC_SP theValType = iec61850.IEC61850_FC_SP
temperatureSetpoint = iec61850.IedConnection_readFloatValue(con, theVal, theValType) temperatureSetpoint = iec61850.IedConnection_readFloatValue(con, theVal, theValType)
print temperatureSetpoint print(temperatureSetpoint)
assert(temperatureValue[1]==0) assert(temperatureValue[1]==0)
newValue= temperatureValue[0]+10 newValue= temperatureValue[0]+10
err = iec61850.IedConnection_writeFloatValue(con, theVal, theValType, newValue) err = iec61850.IedConnection_writeFloatValue(con, theVal, theValType, newValue)
assert(err==0) assert(err==0)
temperatureSetpoint = iec61850.IedConnection_readFloatValue(con, theVal, theValType) temperatureSetpoint = iec61850.IedConnection_readFloatValue(con, theVal, theValType)
print temperatureSetpoint print(temperatureSetpoint)
assert(temperatureSetpoint[0]==newValue) assert(temperatureSetpoint[0]==newValue)
iec61850.IedConnection_close(con) iec61850.IedConnection_close(con)
else: else:
print "Connection error" print("Connection error")
sys.exit(-1) sys.exit(-1)
iec61850.IedConnection_destroy(con) iec61850.IedConnection_destroy(con)
print "client ok" print("client ok")
try: try:
srv=myIECServer() srv=myIECServer()
srvThread = threading.Thread(target = srv.run) srvThread = threading.Thread(target = srv.run)
@ -78,6 +78,6 @@ try:
#signal.pause() #signal.pause()
except: except:
running = 0 running = 0
print "Error :" print("Error :")
traceback.print_exc(file=sys.stdout) traceback.print_exc(file=sys.stdout)
sys.exit(-1) sys.exit(-1)

@ -15,7 +15,7 @@
#include "platform_endian.h" #include "platform_endian.h"
#define LIBIEC61850_VERSION "1.0.0" #define LIBIEC61850_VERSION "1.0.1"
#ifndef CONFIG_DEFAULT_MMS_VENDOR_NAME #ifndef CONFIG_DEFAULT_MMS_VENDOR_NAME
#define CONFIG_DEFAULT_MMS_VENDOR_NAME "libiec61850.com" #define CONFIG_DEFAULT_MMS_VENDOR_NAME "libiec61850.com"

@ -359,11 +359,14 @@ private_IedConnection_handleReport(IedConnection self, MmsValue* value)
while (element != NULL) { while (element != NULL) {
ClientReport report = (ClientReport) element->data; ClientReport report = (ClientReport) element->data;
char defaultRptId[129];
char* rptId = report->rptId; char* rptId = report->rptId;
if (rptId == NULL) if ((rptId == NULL) || (rptId && (strlen(rptId) == 0))) {
rptId = report->rcbReference; strncpy(defaultRptId, report->rcbReference, 129);
StringUtils_replace(defaultRptId, '.', '$');
rptId = defaultRptId;
}
if (strcmp(MmsValue_toString(rptIdValue), rptId) == 0) { if (strcmp(MmsValue_toString(rptIdValue), rptId) == 0) {
matchingReport = report; matchingReport = report;

@ -38,8 +38,8 @@ typedef struct {
typedef struct { typedef struct {
int state; int state;
int srcRef; int remoteRef;
int dstRef; int localRef;
int protocolClass; int protocolClass;
Socket socket; Socket socket;
CotpOptions options; CotpOptions options;
@ -97,9 +97,9 @@ ByteBuffer*
CotpConnection_getPayload(CotpConnection* self); CotpConnection_getPayload(CotpConnection* self);
int int
CotpConnection_getSrcRef(CotpConnection* self); CotpConnection_getRemoteRef(CotpConnection* self);
int int
CotpConnection_getDstRef(CotpConnection* self); CotpConnection_getLocalRef(CotpConnection* self);
#endif /* COTP_H_ */ #endif /* COTP_H_ */

@ -123,10 +123,10 @@ writeStaticConnectResponseHeader(CotpConnection* self, int optionsLength)
buffer[4] = 6 + optionsLength; buffer[4] = 6 + optionsLength;
buffer[5] = 0xd0; buffer[5] = 0xd0;
buffer[6] = (uint8_t) (self->srcRef / 0x100); buffer[6] = (uint8_t) (self->remoteRef / 0x100);
buffer[7] = (uint8_t) (self->srcRef & 0xff); buffer[7] = (uint8_t) (self->remoteRef & 0xff);
buffer[8] = (uint8_t) (self->dstRef / 0x100); buffer[8] = (uint8_t) (self->localRef / 0x100);
buffer[9] = (uint8_t) (self->dstRef & 0xff); buffer[9] = (uint8_t) (self->localRef & 0xff);
buffer[10] = (uint8_t) (self->protocolClass); buffer[10] = (uint8_t) (self->protocolClass);
self->writeBuffer->size = 11; self->writeBuffer->size = 11;
@ -312,8 +312,8 @@ CotpConnection_sendConnectionRequestMessage(CotpConnection* self, IsoConnectionP
buffer[7] = 0x00; buffer[7] = 0x00;
/* SRC REF */ /* SRC REF */
buffer[8] = 0x00; buffer[8] = (uint8_t) (self->localRef / 0x100);
buffer[9] = 0x02; /* or 0x01 ? */ buffer[9] = (uint8_t) (self->localRef & 0xff);
/* Class */ /* Class */
buffer[10] = 0x00; buffer[10] = 0x00;
@ -435,8 +435,8 @@ CotpConnection_init(CotpConnection* self, Socket socket,
{ {
self->state = 0; self->state = 0;
self->socket = socket; self->socket = socket;
self->srcRef = -1; self->remoteRef = -1;
self->dstRef = -1; self->localRef = 1;
self->protocolClass = -1; self->protocolClass = -1;
self->options.tpduSize = 0; self->options.tpduSize = 0;
@ -487,15 +487,15 @@ CotpConnection_getPayload(CotpConnection* self)
} }
int int
CotpConnection_getSrcRef(CotpConnection* self) CotpConnection_getRemoteRef(CotpConnection* self)
{ {
return self->srcRef; return self->remoteRef;
} }
int int
CotpConnection_getDstRef(CotpConnection* self) CotpConnection_getLocalRef(CotpConnection* self)
{ {
return self->dstRef; return self->localRef;
} }
/* /*
@ -515,8 +515,7 @@ parseConnectRequestTpdu(CotpConnection* self, uint8_t* buffer, uint8_t len)
if (len < 6) if (len < 6)
return false; return false;
self->dstRef = getUint16(buffer); self->remoteRef = getUint16(buffer + 2);
self->srcRef = getUint16(buffer + 2);
self->protocolClass = getUint8(buffer + 4); self->protocolClass = getUint8(buffer + 4);
return parseOptions(self, buffer + 5, len - 6); return parseOptions(self, buffer + 5, len - 6);
@ -528,8 +527,7 @@ parseConnectConfirmTpdu(CotpConnection* self, uint8_t* buffer, uint8_t len)
if (len < 6) if (len < 6)
return false; return false;
self->srcRef = getUint16(buffer); self->remoteRef = getUint16(buffer);
self->dstRef = getUint16(buffer + 2);
self->protocolClass = getUint8(buffer + 4); self->protocolClass = getUint8(buffer + 4);
return parseOptions(self, buffer + 5, len - 6); return parseOptions(self, buffer + 5, len - 6);

@ -1999,6 +1999,7 @@ MmsValue_printToBuffer(const MmsValue* self, char* buffer, int bufferSize)
case MMS_STRUCTURE: case MMS_STRUCTURE:
case MMS_ARRAY: case MMS_ARRAY:
{ {
if (bufferSize==0) break;
buffer[0] = '{'; buffer[0] = '{';
int bufPos = 1; int bufPos = 1;

@ -134,7 +134,7 @@ createTypeSpecification (
break; break;
default: default:
if (DEBUG_MMS_SERVER) if (DEBUG_MMS_SERVER)
printf("MMS-SERVER: Unsupported type %i!\n", namedVariable->type); printf("MMS-SERVER: Unsupported type %i!\n", namedVariable->type);
return -1; return -1;
break; break;
} }

@ -30,7 +30,9 @@
#include "hal_ethernet.h" #include "hal_ethernet.h"
#include "ber_encoder.h" #include "ber_encoder.h"
#ifndef DEBUG_SV_PUBLISHER
#define DEBUG_SV_PUBLISHER 1 #define DEBUG_SV_PUBLISHER 1
#endif
#define CONFIG_SV_DEFAULT_DST_ADDRESS CONFIG_GOOSE_DEFAULT_DST_ADDRESS #define CONFIG_SV_DEFAULT_DST_ADDRESS CONFIG_GOOSE_DEFAULT_DST_ADDRESS
@ -567,6 +569,11 @@ SV_ASDU_setFLOAT64(SV_ASDU self, int index, double value)
} }
} }
uint16_t
SV_ASDU_getSmpCnt(SV_ASDU self)
{
return self->smpCnt;
}
void void
SV_ASDU_setSmpCnt(SV_ASDU self, uint16_t value) SV_ASDU_setSmpCnt(SV_ASDU self, uint16_t value)

@ -89,6 +89,9 @@ SV_ASDU_setFLOAT64(SV_ASDU self, int index, double value);
void void
SV_ASDU_setSmpCnt(SV_ASDU self, uint16_t value); SV_ASDU_setSmpCnt(SV_ASDU self, uint16_t value);
uint16_t
SV_ASDU_getSmpCnt(SV_ASDU self);
void void
SV_ASDU_increaseSmpCnt(SV_ASDU self); SV_ASDU_increaseSmpCnt(SV_ASDU self);

@ -90,11 +90,11 @@ public class OptionFields {
if (boolVal != null) if (boolVal != null)
this.entryID = boolVal; this.entryID = boolVal;
boolVal = ParserUtils.parseBooleanAttribute(optFieldsNode, "bufOvfl"); boolVal = ParserUtils.parseBooleanAttribute(optFieldsNode, "configRef");
if (boolVal != null) if (boolVal != null)
this.configRef = boolVal; this.configRef = boolVal;
boolVal = ParserUtils.parseBooleanAttribute(optFieldsNode, "reasonCode"); boolVal = ParserUtils.parseBooleanAttribute(optFieldsNode, "bufOvlf");
if (boolVal != null) if (boolVal != null)
this.bufOvfl = boolVal; this.bufOvfl = boolVal;
} }

Loading…
Cancel
Save