- fixed r-session related problems when compiling with Makefile

pull/521/head
Michael Zillgith 1 year ago
parent 7276b98c3c
commit 6c91e34b5e

@ -72,6 +72,7 @@ LIB_INCLUDE_DIRS += src/sampled_values
LIB_INCLUDE_DIRS += src/iec61850/inc
LIB_INCLUDE_DIRS += src/iec61850/inc_private
LIB_INCLUDE_DIRS += src/logging
LIB_INCLUDE_DIRS += src/r_session
LIB_INCLUDE_DIRS += src/tls
ifeq ($(HAL_IMPL), WIN32)
LIB_INCLUDE_DIRS += third_party/winpcap/Include
@ -84,6 +85,8 @@ LIB_INCLUDE_DIRS += third_party/mbedtls/mbedtls-2.28/include
LIB_INCLUDE_DIRS += hal/tls/mbedtls
CFLAGS += -D'MBEDTLS_CONFIG_FILE="mbedtls_config.h"'
CFLAGS += -D'CONFIG_MMS_SUPPORT_TLS=1'
CFLAGS += -D'CONFIG_IEC61850_R_GOOSE=1'
CFLAGS += -D'CONFIG_IEC61850_R_SMV=1'
endif
LIB_INCLUDES = $(addprefix -I,$(LIB_INCLUDE_DIRS))
@ -120,6 +123,7 @@ LIB_API_HEADER_FILES += src/goose/goose_publisher.h
LIB_API_HEADER_FILES += src/sampled_values/sv_subscriber.h
LIB_API_HEADER_FILES += src/sampled_values/sv_publisher.h
LIB_API_HEADER_FILES += src/logging/logging_api.h
LIB_API_HEADER_FILES += src/r_session/r_session.h
get_sources_from_directory = $(wildcard $1/*.c)
get_sources = $(foreach dir, $1, $(call get_sources_from_directory,$(dir)))
@ -137,13 +141,13 @@ ifneq ($(HAL_IMPL), WIN32)
CFLAGS += -Wuninitialized
endif
CFLAGS += -Wsign-compare
CFLAGS += -Wpointer-arith
CFLAGS += -Wnested-externs
CFLAGS += -Wmissing-declarations
CFLAGS += -Wshadow
CFLAGS += -Wall
CFLAGS += -Wextra
CFLAGS += -Wno-sign-compare
CFLAGS += -Wno-format
#CFLAGS += -Wconditional-uninitialized
#CFLAGS += -Werror

@ -1159,7 +1159,7 @@ gooseReceiverLoop(void *threadParameter)
EthernetHandleSet_destroy(handleSet);
}
#if (CONFIG_IEC61850_R_GOOSE == 0)
#if (CONFIG_IEC61850_R_GOOSE == 1)
else if (self->session)
{
HandleSet handleSet = Handleset_new();
@ -1357,13 +1357,16 @@ GooseReceiver_stopThreadless(GooseReceiver self)
self->running = false;
}
#if (CONFIG_IEC61850_R_GOOSE == 1)
static void
handleSessionPayloadElement(void* parameter, uint16_t appId, uint8_t* payloadData, int payloadSize)
{
(void)appId;
GooseReceiver self = (GooseReceiver) parameter;
parseGoosePayload(self, payloadData, payloadSize);
}
#endif /* (CONFIG_IEC61850_R_GOOSE == 1) */
/* call after reception of ethernet frame */

@ -81,7 +81,7 @@ struct sRSessionPayloadElement
* \return new RSession instance
*/
LIB61850_API RSession
RSession_create();
RSession_create(void);
/**
* \brief Set the maximum buffer size for session messages (range: 128 - 65535)

@ -710,13 +710,16 @@ parseSVMessage(SVReceiver self, int numbytes)
handleSVApdu(self, appId, buffer + bufPos, apduLength, dstAddr);
}
#if (CONFIG_IEC61850_R_SMV == 1)
static void
handleSessionPayloadElement(void* parameter, uint16_t appId, uint8_t* payloadData, int payloadSize)
{
(void)appId;
SVReceiver self = (SVReceiver) parameter;
handleSVApdu(self, appId, payloadData, payloadSize, NULL);
}
#endif /* (CONFIG_IEC61850_R_SMV == 1) */
bool
SVReceiver_tick(SVReceiver self)

Loading…
Cancel
Save