- merge github master branch

This commit is contained in:
Michael Zillgith 2017-03-29 18:33:12 +02:00
commit eb22cb1ed9
7 changed files with 22 additions and 6 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -30,7 +30,9 @@
#include "hal_ethernet.h"
#include "ber_encoder.h"
#ifndef DEBUG_SV_PUBLISHER
#define DEBUG_SV_PUBLISHER 1
#endif
#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
SV_ASDU_setSmpCnt(SV_ASDU self, uint16_t value)

View file

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