- fixed issue with configurable file path in HAL filesystem implementations for win32 and linux

- fixed missing function names in def files for GOOSE/SV configurations
pull/6/head
Michael Zillgith 10 years ago
parent 6e5d911166
commit 9e12159d8b

@ -97,6 +97,7 @@ set(API_HEADERS
src/mms/inc/asn1_ber_primitive_value.h
src/goose/goose_subscriber.h
src/goose/goose_receiver.h
src/goose/goose_publisher.h
src/sampled_values/sv_subscriber.h
src/sampled_values/sv_publisher.h
)

@ -94,7 +94,9 @@ LIB_API_HEADER_FILES += src/mms/inc/ber_integer.h
LIB_API_HEADER_FILES += src/mms/inc/asn1_ber_primitive_value.h
LIB_API_HEADER_FILES += src/goose/goose_subscriber.h
LIB_API_HEADER_FILES += src/goose/goose_receiver.h
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
get_sources_from_directory = $(wildcard $1/*.c)
get_sources = $(foreach dir, $1, $(call get_sources_from_directory,$(dir)))

@ -94,15 +94,6 @@ GooseSubscriber_setAppId(GooseSubscriber self, uint16_t appId);
bool
GooseSubscriber_isValid(GooseSubscriber self);
//uint16_t
//GooseSubscriber_getAppId(GooseSubscriber self);
void
GooseSubscriber_setGoId(GooseSubscriber self, const char* goId);
//char*
//GooseSubscriber_getGoId(GooseSubscriber self);
void
GooseSubscriber_destroy(GooseSubscriber self);

@ -38,7 +38,8 @@
#define CONFIG_VIRTUAL_FILESTORE_BASEPATH "./vmd-filestore/"
#endif
static char* fileBasePath = CONFIG_VIRTUAL_FILESTORE_BASEPATH;
static char fileBasePath[256];
static bool fileBasePathInitialized = false;
struct sDirectoryHandle {
DIR* handle;
@ -47,6 +48,11 @@ struct sDirectoryHandle {
static void
createFullPathFromFileName(char* fullPath, char* filename)
{
if (!fileBasePathInitialized) {
strcpy(fileBasePath, CONFIG_VIRTUAL_FILESTORE_BASEPATH);
fileBasePathInitialized = true;
}
strcpy(fullPath, fileBasePath);
if (filename != NULL)
@ -57,7 +63,8 @@ createFullPathFromFileName(char* fullPath, char* filename)
void
FileSystem_setBasePath(char* basePath)
{
fileBasePath = basePath;
strcpy(fileBasePath, basePath);
fileBasePathInitialized = true;
}
FileHandle
@ -191,24 +198,3 @@ FileSystem_closeDirectory(DirectoryHandle directory)
GLOBAL_FREEMEM(directory);
}
#if 0
int
main(int argc, char** argv)
{
DirectoryHandle directory = FileSystem_openDirectory("/");
if (directory != NULL) {
char* fileName = FileSystem_readDirectory(directory);
while (fileName != NULL) {
printf("FILE: (%s)\n", fileName);
fileName = FileSystem_readDirectory(directory);
}
FileSystem_closeDirectory(directory);
}
else
printf("Error opening directory!\n");
}
#endif

@ -41,7 +41,10 @@
#define CONFIG_VIRTUAL_FILESTORE_BASEPATH ".\\vmd-filestore\\"
#endif
static char* fileBasePath = CONFIG_VIRTUAL_FILESTORE_BASEPATH;
//static char* fileBasePath = CONFIG_VIRTUAL_FILESTORE_BASEPATH;
static char fileBasePath[256];
static bool fileBasePathInitialized = false;
struct sDirectoryHandle {
HANDLE handle;
@ -53,6 +56,11 @@ struct sDirectoryHandle {
static void
createFullPathFromFileName(char* fullPath, char* filename)
{
if (!fileBasePathInitialized) {
strcpy(fileBasePath, CONFIG_VIRTUAL_FILESTORE_BASEPATH);
fileBasePathInitialized = true;
}
strcpy(fullPath, fileBasePath);
if (filename != NULL)
@ -62,7 +70,8 @@ createFullPathFromFileName(char* fullPath, char* filename)
void
FileSystem_setBasePath(char* basePath)
{
fileBasePath = basePath;
strcpy(fileBasePath, basePath);
fileBasePathInitialized = true;
}
FileHandle

@ -515,4 +515,5 @@ EXPORTS
ClientSVControlBlock_getSmpMod
ClientSVControlBlock_getNoASDU
IedServer_setSVCBHandler
IedModel_getSVControlBlock
IedModel_getSVControlBlock
MmsValue_printToBuffer

@ -522,7 +522,6 @@ EXPORTS
SVControlBlock_create
SVControlBlock_addPhyComAddress
GSEControlBlock_addPhyComAddress
GooseSubscriber_getConfRev
SVReceiver_create
SVReceiver_setInterfaceId
SVReceiver_addSubscriber
@ -566,4 +565,32 @@ EXPORTS
ClientSVControlBlock_getNoASDU
IedServer_setSVCBHandler
IedModel_getSVControlBlock
GooseSubscriber_getConfRev
GooseSubscriber_isValid
GooseReceiver_create
GooseReceiver_setInterfaceId
GooseReceiver_addSubscriber
GooseReceiver_removeSubscriber
GooseReceiver_start
GooseReceiver_stop
GooseReceiver_destroy
GooseReceiver_startThreadless
GooseReceiver_stopThreadless
GooseReceiver_tick
SampledValuesPublisher_create
SampledValuesPublisher_addASDU
SampledValuesPublisher_setupComplete
SampledValuesPublisher_publish
SampledValuesPublisher_destroy
SV_ASDU_resetBuffer
SV_ASDU_addINT8
SV_ASDU_setINT8
SV_ASDU_addINT32
SV_ASDU_setINT32
SV_ASDU_addFLOAT
SV_ASDU_setFLOAT
SV_ASDU_setSmpCnt
SV_ASDU_increaseSmpCnt
SV_ASDU_setRefrTm
SV_ASDU_setSmpMod
MmsValue_printToBuffer

Loading…
Cancel
Save