- added function MmsConnection_getMmsConnectionParameters

This commit is contained in:
Michael Zillgith 2016-05-06 12:21:19 +02:00
parent 8f45ac88c6
commit 29b9e46697
11 changed files with 45 additions and 19 deletions

View file

@ -104,11 +104,11 @@ set(API_HEADERS
src/sampled_values/sv_publisher.h
)
IF(WIN32)
IF(MSVC)
include_directories(
src/vs
)
ENDIF(WIN32)
ENDIF(MSVC)
# write the detected stuff to this file
configure_file(config/stack_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config/stack_config.h)

View file

@ -3,10 +3,10 @@ set(iec61850_client_example4_SRCS
client_example4.c
)
IF(WIN32)
IF(MSVC)
set_source_files_properties(${iec61850_client_example4_SRCS}
PROPERTIES LANGUAGE CXX)
ENDIF(WIN32)
ENDIF(MSVC)
add_executable(iec61850_client_example4
${iec61850_client_example4_SRCS}

View file

@ -3,10 +3,10 @@ set(iec61850_client_example_files_SRCS
client_example_files.c
)
IF(WIN32)
IF(MSVC)
set_source_files_properties(${iec61850_client_example_files_SRCS}
PROPERTIES LANGUAGE CXX)
ENDIF(WIN32)
ENDIF(MSVC)
add_executable(iec61850_client_example_files
${iec61850_client_example_files_SRCS}

View file

@ -3,10 +3,10 @@ set(iec61850_client_example_reporting_SRCS
client_example_reporting.c
)
IF(WIN32)
IF(MSVC)
set_source_files_properties(${iec61850_client_example_reporting_SRCS}
PROPERTIES LANGUAGE CXX)
ENDIF(WIN32)
ENDIF(MSVC)
add_executable(iec61850_client_example_reporting
${iec61850_client_example_reporting_SRCS}

View file

@ -3,10 +3,10 @@ set(mms_client_example2_SRCS
mms_client_example2.c
)
IF(WIN32)
IF(MSVC)
set_source_files_properties(${mms_client_example2_SRCS}
PROPERTIES LANGUAGE CXX)
ENDIF(WIN32)
ENDIF(MSVC)
add_executable(mms_client_example2
${mms_client_example2_SRCS}

View file

@ -3,10 +3,10 @@ set(mms_client_example3_SRCS
mms_client_example3.c
)
IF(WIN32)
IF(MSVC)
set_source_files_properties(${mms_client_example3_SRCS}
PROPERTIES LANGUAGE CXX)
ENDIF(WIN32)
ENDIF(MSVC)
add_executable(mms_client_example3
${mms_client_example3_SRCS}

View file

@ -3,10 +3,10 @@ set(mms_client_example4_SRCS
mms_client_example4.c
)
IF(WIN32)
IF(MSVC)
set_source_files_properties(${mms_client_example4_SRCS}
PROPERTIES LANGUAGE CXX)
ENDIF(WIN32)
ENDIF(MSVC)
add_executable(mms_client_example4
${mms_client_example4_SRCS}

View file

@ -213,14 +213,18 @@ endif()
set_source_files_properties(${lib_asn1c_SRCS}
PROPERTIES LANGUAGE C)
IF(MSVC)
set_source_files_properties(${lib_common_SRCS} ${lib_windows_SRCS}
PROPERTIES LANGUAGE CXX)
ENDIF()
IF(WITH_WPCAP)
IF(MSVC)
set_source_files_properties(${lib_goose_SRCS}
PROPERTIES LANGUAGE CXX)
set_source_files_properties(${lib_sv_SRCS}
PROPERTIES LANGUAGE CXX)
ENDIF()
ELSE()
add_definitions(-DEXCLUDE_ETHERNET_WINDOWS)
ENDIF()
@ -311,8 +315,10 @@ IF(UNIX)
)
ENDIF (CONFIG_SYSTEM_HAS_CLOCK_GETTIME)
ENDIF(UNIX)
IF(MINGW)
target_link_libraries(iec61850-shared ws2_32 iphlpapi)
target_link_libraries(iec61850 ws2_32 iphlpapi)
ENDIF(MINGW)
iF(WITH_WPCAP)
target_link_libraries(iec61850
${CMAKE_CURRENT_SOURCE_DIR}/../third_party/winpcap/lib/wpcap.lib
@ -330,7 +336,6 @@ if(MSVC)
)
endif()
ELSE(WITH_WPCAP)
if(MSVC)
set_target_properties(iec61850-shared PROPERTIES

View file

@ -1,7 +1,7 @@
/*
* mms_client_connection.h
*
* Copyright 2013 Michael Zillgith
* Copyright 2013-2016 Michael Zillgith
*
* This file is part of libIEC61850.
*
@ -49,6 +49,7 @@ typedef struct sMmsConnectionParameters {
int maxServOutstandingCalled;
int dataStructureNestingLevel;
int maxPduSize; /* local detail */
uint8_t servicesSupported[11];
} MmsConnectionParameters;
typedef struct {
@ -112,7 +113,7 @@ MmsConnection_setInformationReportHandler(MmsConnection self, MmsInformationRepo
void* parameter);
/**
* \brief Get the connection parameters for an MmsConnection instance
* \brief Get the ISO connection parameters for an MmsConnection instance
*
* \param self MmsConnection instance to operate on
* \return params the to be used by this connection
@ -120,6 +121,15 @@ MmsConnection_setInformationReportHandler(MmsConnection self, MmsInformationRepo
IsoConnectionParameters
MmsConnection_getIsoConnectionParameters(MmsConnection self);
/**
* \brief Get the MMS specific connection parameters for an MmsConnection instance
*
* \param self MmsConnection instance to operate on
* \return params the to be used by this connection
*/
MmsConnectionParameters
MmsConnection_getMmsConnectionParameters(MmsConnection self);
/**
* \brief User provided handler function that will be called if the connection to the server is lost
*

View file

@ -841,6 +841,12 @@ MmsConnection_getIsoConnectionParameters(MmsConnection self)
return self->isoParameters;
}
MmsConnectionParameters
MmsConnection_getMmsConnectionParameters(MmsConnection self)
{
return self->parameters;
}
static void
waitForConnectResponse(MmsConnection self)
{

View file

@ -130,6 +130,11 @@ mmsClient_parseInitiateResponse(MmsConnection self)
self->parameters.maxServOutstandingCalling = initiateResponse->negotiatedMaxServOutstandingCalling;
int i;
for (i = 0; i < 11; i++)
self->parameters.servicesSupported[i] = initiateResponse->mmsInitResponseDetail.servicesSupportedCalled.buf[i];
result = true;
}
else