diff --git a/CMakeLists.txt b/CMakeLists.txt index c5c53a15..abae1fbb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ project(libiec61850) ENABLE_TESTING() set(LIB_VERSION_MAJOR "1") -set(LIB_VERSION_MINOR "3") +set(LIB_VERSION_MINOR "4") set(LIB_VERSION_PATCH "0") set(LIB_VERSION "${LIB_VERSION_MAJOR}.${LIB_VERSION_MINOR}.${LIB_VERSION_PATCH}") diff --git a/Makefile b/Makefile index 1c6ce571..66158026 100644 --- a/Makefile +++ b/Makefile @@ -103,15 +103,9 @@ LIB_API_HEADER_FILES += src/iec61850/inc/iec61850_config_file_parser.h LIB_API_HEADER_FILES += src/mms/inc/mms_value.h LIB_API_HEADER_FILES += src/mms/inc/mms_common.h LIB_API_HEADER_FILES += src/mms/inc/mms_types.h -LIB_API_HEADER_FILES += src/mms/inc/mms_device_model.h -LIB_API_HEADER_FILES += src/mms/inc/mms_server.h -LIB_API_HEADER_FILES += src/mms/inc/mms_named_variable_list.h LIB_API_HEADER_FILES += src/mms/inc/mms_type_spec.h LIB_API_HEADER_FILES += src/mms/inc/mms_client_connection.h LIB_API_HEADER_FILES += src/mms/inc/iso_connection_parameters.h -LIB_API_HEADER_FILES += src/mms/inc/iso_server.h -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 diff --git a/hal/inc/hal_base.h b/hal/inc/hal_base.h new file mode 100644 index 00000000..b8a3611b --- /dev/null +++ b/hal/inc/hal_base.h @@ -0,0 +1,66 @@ +/* + * hal_base.h + * + * Copyright 2018 MZ Automation GmbH + * + * This file is part of Platform Abstraction Layer (libpal) + * for libiec61850 and lib60870. + * + * libpal is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * libpal is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with libpal. If not, see . + * + * See COPYING file for the complete license text. + */ + +#ifndef HAL_INC_HAL_BASE_H_ +#define HAL_INC_HAL_BASE_H_ + +#include +#include +#include +#include +#include + +#ifdef __GNUC__ +#define ATTRIBUTE_PACKED __attribute__ ((__packed__)) +#else +#define ATTRIBUTE_PACKED +#endif + +#ifndef DEPRECATED +#if defined(__GNUC__) || defined(__clang__) + #define DEPRECATED __attribute__((deprecated)) +#else + #define DEPRECATED +#endif +#endif + +#if defined _WIN32 || defined __CYGWIN__ + #ifdef EXPORT_FUNCTIONS_FOR_DLL + #define PAL_API __declspec(dllexport) + #else + #define PAL_API + #endif + + #define PAL_INTERNAL +#else + #if __GNUC__ >= 4 + #define PAL_API __attribute__ ((visibility ("default"))) + #define PAL_INTERNAL __attribute__ ((visibility ("hidden"))) + #else + #define PAL_API + #define PAL_INTERNAL + #endif +#endif + +#endif /* HAL_INC_HAL_BASE_H_ */ diff --git a/hal/inc/hal_ethernet.h b/hal/inc/hal_ethernet.h index 4efb3670..7f243dce 100644 --- a/hal/inc/hal_ethernet.h +++ b/hal/inc/hal_ethernet.h @@ -24,8 +24,7 @@ #ifndef ETHERNET_HAL_H_ #define ETHERNET_HAL_H_ -#include -#include +#include "hal_base.h" #ifdef __cplusplus extern "C" { @@ -56,7 +55,7 @@ typedef struct sEthernetHandleSet* EthernetHandleSet; * * \return new EthernetHandleSet instance */ -EthernetHandleSet +PAL_API EthernetHandleSet EthernetHandleSet_new(void); /** @@ -65,7 +64,7 @@ EthernetHandleSet_new(void); * \param self the HandleSet instance * \param sock the socket to add */ -void +PAL_API void EthernetHandleSet_addSocket(EthernetHandleSet self, const EthernetSocket sock); /** @@ -74,7 +73,7 @@ EthernetHandleSet_addSocket(EthernetHandleSet self, const EthernetSocket sock); * \param self the HandleSet instance * \param sock the socket to add */ -void +PAL_API void EthernetHandleSet_removeSocket(EthernetHandleSet self, const EthernetSocket sock); /** @@ -89,7 +88,7 @@ EthernetHandleSet_removeSocket(EthernetHandleSet self, const EthernetSocket sock * or 0 if no data is pending on any of the monitored connections. * The function shall return -1 if a socket error occures. */ -int +PAL_API int EthernetHandleSet_waitReady(EthernetHandleSet self, unsigned int timeoutMs); /** @@ -97,7 +96,7 @@ EthernetHandleSet_waitReady(EthernetHandleSet self, unsigned int timeoutMs); * * \param self the HandleSet instance to destroy */ -void +PAL_API void EthernetHandleSet_destroy(EthernetHandleSet self); /** @@ -108,7 +107,7 @@ EthernetHandleSet_destroy(EthernetHandleSet self); * \param interfaceId the ID of the Ethernet interface * \param addr pointer to a buffer to store the MAC address */ -void +PAL_API void Ethernet_getInterfaceMACAddress(const char* interfaceId, uint8_t* addr); /** @@ -118,7 +117,7 @@ Ethernet_getInterfaceMACAddress(const char* interfaceId, uint8_t* addr); * \param interfaceId the ID of the Ethernet interface * \param destAddress byte array that contains the Ethernet MAC address */ -EthernetSocket +PAL_API EthernetSocket Ethernet_createSocket(const char* interfaceId, uint8_t* destAddress); /** @@ -126,10 +125,10 @@ Ethernet_createSocket(const char* interfaceId, uint8_t* destAddress); * * \param ethSocket the ethernet socket handle */ -void +PAL_API void Ethernet_destroySocket(EthernetSocket ethSocket); -void +PAL_API void Ethernet_sendPacket(EthernetSocket ethSocket, uint8_t* buffer, int packetSize); /* @@ -138,7 +137,7 @@ Ethernet_sendPacket(EthernetSocket ethSocket, uint8_t* buffer, int packetSize); * \param ethSocket the ethernet socket handle * \param etherType the ether type of messages to accept */ -void +PAL_API void Ethernet_setProtocolFilter(EthernetSocket ethSocket, uint16_t etherType); /** @@ -150,7 +149,7 @@ Ethernet_setProtocolFilter(EthernetSocket ethSocket, uint16_t etherType); * * \return size of message received in bytes */ -int +PAL_API int Ethernet_receivePacket(EthernetSocket ethSocket, uint8_t* buffer, int bufferSize); /** @@ -158,7 +157,7 @@ Ethernet_receivePacket(EthernetSocket ethSocket, uint8_t* buffer, int bufferSize * * \return true if Ethernet support is available, false otherwise */ -bool +PAL_API bool Ethernet_isSupported(void); /*! @} */ diff --git a/hal/inc/hal_filesystem.h b/hal/inc/hal_filesystem.h index b22ca846..d4ff6691 100644 --- a/hal/inc/hal_filesystem.h +++ b/hal/inc/hal_filesystem.h @@ -24,6 +24,8 @@ #ifndef FILESYSTEM_HAL_H_ #define FILESYSTEM_HAL_H_ +#include "hal_base.h" + #ifdef __cplusplus extern "C" { #endif @@ -55,7 +57,7 @@ typedef struct sDirectoryHandle* DirectoryHandle; * \return a handle for the file. Has to be used by subsequent calls to file functions to identify the file or * NULL if opening fails */ -FileHandle +PAL_API FileHandle FileSystem_openFile(char* pathName, bool readWrite); /** @@ -72,7 +74,7 @@ FileSystem_openFile(char* pathName, bool readWrite); * * \return the number of bytes actually read */ -int +PAL_API int FileSystem_readFile(FileHandle handle, uint8_t* buffer, int maxSize); /** @@ -84,7 +86,7 @@ FileSystem_readFile(FileHandle handle, uint8_t* buffer, int maxSize); * * \return the number of bytes actually written */ -int +PAL_API int FileSystem_writeFile(FileHandle handle, uint8_t* buffer, int size); /** @@ -92,7 +94,7 @@ FileSystem_writeFile(FileHandle handle, uint8_t* buffer, int size); * * \param handle the file handle to identify the file */ -void +PAL_API void FileSystem_closeFile(FileHandle handle); /** @@ -108,7 +110,7 @@ FileSystem_closeFile(FileHandle handle); * * \return true if file exists, false if not */ -bool +PAL_API bool FileSystem_getFileInfo(char* filename, uint32_t* fileSize, uint64_t* lastModificationTimestamp); /** @@ -118,7 +120,7 @@ FileSystem_getFileInfo(char* filename, uint32_t* fileSize, uint64_t* lastModific * * \return true on success, false on error */ -bool +PAL_API bool FileSystem_deleteFile(char* filename); /** @@ -129,7 +131,7 @@ FileSystem_deleteFile(char* filename); * * \return true on success, false on error */ -bool +PAL_API bool FileSystem_renameFile(char* oldFilename, char* newFilename); /** @@ -139,7 +141,7 @@ FileSystem_renameFile(char* oldFilename, char* newFilename); * * \return a handle for the opened directory to be used in subsequent calls to identify the directory */ -DirectoryHandle +PAL_API DirectoryHandle FileSystem_openDirectory(char* directoryName); /** @@ -154,7 +156,7 @@ FileSystem_openDirectory(char* directoryName); * * \return the name of the directory entry */ -char* +PAL_API char* FileSystem_readDirectory(DirectoryHandle directory, bool* isDirectory); @@ -163,7 +165,7 @@ FileSystem_readDirectory(DirectoryHandle directory, bool* isDirectory); * * \param directory the handle to identify the directory */ -void +PAL_API void FileSystem_closeDirectory(DirectoryHandle directory); diff --git a/hal/inc/hal_serial.h b/hal/inc/hal_serial.h index b28804d5..a56a5fb5 100644 --- a/hal/inc/hal_serial.h +++ b/hal/inc/hal_serial.h @@ -24,8 +24,7 @@ #ifndef SRC_IEC60870_LINK_LAYER_SERIAL_PORT_H_ #define SRC_IEC60870_LINK_LAYER_SERIAL_PORT_H_ -#include -#include +#include "hal_base.h" #ifdef __cplusplus extern "C" { @@ -72,13 +71,13 @@ typedef enum { * * \return the new SerialPort instance */ -SerialPort +PAL_API SerialPort SerialPort_create(const char* interfaceName, int baudRate, uint8_t dataBits, char parity, uint8_t stopBits); /** * \brief Destroy the SerialPort instance and release all resources */ -void +PAL_API void SerialPort_destroy(SerialPort self); /** @@ -86,13 +85,13 @@ SerialPort_destroy(SerialPort self); * * \return true in case of success, false otherwise (use \ref SerialPort_getLastError for a detailed error code) */ -bool +PAL_API bool SerialPort_open(SerialPort self); /** * \brief Close (release) the serial interface */ -void +PAL_API void SerialPort_close(SerialPort self); /** @@ -100,7 +99,7 @@ SerialPort_close(SerialPort self); * * \return the baud rate in baud */ -int +PAL_API int SerialPort_getBaudRate(SerialPort self); /** @@ -108,13 +107,13 @@ SerialPort_getBaudRate(SerialPort self); * * \param timeout the timeout value in ms. */ -void +PAL_API void SerialPort_setTimeout(SerialPort self, int timeout); /** * \brief Discard all data in the input buffer of the serial interface */ -void +PAL_API void SerialPort_discardInBuffer(SerialPort self); /** @@ -122,7 +121,7 @@ SerialPort_discardInBuffer(SerialPort self); * * \return number of read bytes of -1 in case of an error */ -int +PAL_API int SerialPort_readByte(SerialPort self); /** @@ -134,13 +133,13 @@ SerialPort_readByte(SerialPort self); * * \return number of bytes written, or -1 in case of an error */ -int +PAL_API int SerialPort_write(SerialPort self, uint8_t* buffer, int startPos, int numberOfBytes); /** * \brief Get the error code of the last operation */ -SerialPortError +PAL_API SerialPortError SerialPort_getLastError(SerialPort self); /*! @} */ diff --git a/hal/inc/hal_socket.h b/hal/inc/hal_socket.h index f1545167..0f8bb1dc 100644 --- a/hal/inc/hal_socket.h +++ b/hal/inc/hal_socket.h @@ -24,8 +24,7 @@ #ifndef SOCKET_HAL_H_ #define SOCKET_HAL_H_ -#include -#include +#include "hal_base.h" /** * \file hal_socket.h @@ -78,13 +77,13 @@ typedef enum * * \return new HandleSet instance */ -HandleSet +PAL_API HandleSet Handleset_new(void); /** * \brief Reset the handle set for reuse */ -void +PAL_API void Handleset_reset(HandleSet self); /** @@ -93,7 +92,7 @@ Handleset_reset(HandleSet self); * \param self the HandleSet instance * \param sock the socket to add */ -void +PAL_API void Handleset_addSocket(HandleSet self, const Socket sock); /** @@ -111,7 +110,7 @@ Handleset_addSocket(HandleSet self, const Socket sock); * or 0 if no data is pending on any of the monitored connections. * The function shall return -1 if a socket error occures. */ -int +PAL_API int Handleset_waitReady(HandleSet self, unsigned int timeoutMs); /** @@ -119,7 +118,7 @@ Handleset_waitReady(HandleSet self, unsigned int timeoutMs); * * \param self the HandleSet instance to destroy */ -void +PAL_API void Handleset_destroy(HandleSet self); /** @@ -132,11 +131,11 @@ Handleset_destroy(HandleSet self); * * \return the newly create TcpServerSocket instance */ -ServerSocket +PAL_API ServerSocket TcpServerSocket_create(const char* address, int port); -void +PAL_API void ServerSocket_listen(ServerSocket self); /** @@ -153,7 +152,7 @@ ServerSocket_listen(ServerSocket self); * * \return handle of the new connection socket or NULL if no new connection is available */ -Socket +PAL_API Socket ServerSocket_accept(ServerSocket self); /** @@ -166,7 +165,7 @@ ServerSocket_accept(ServerSocket self); * \param interval time (in s) between subsequent keep alive messages if no ACK received * \param count number of not missing keep alive ACKs until socket is considered dead */ -void +PAL_API void Socket_activateTcpKeepAlive(Socket self, int idleTime, int interval, int count); /** @@ -178,7 +177,7 @@ Socket_activateTcpKeepAlive(Socket self, int idleTime, int interval, int count); * \param backlog the number of pending connections in the queue * */ -void +PAL_API void ServerSocket_setBacklog(ServerSocket self, int backlog); /** @@ -190,7 +189,7 @@ ServerSocket_setBacklog(ServerSocket self, int backlog); * * \param self server socket instance */ -void +PAL_API void ServerSocket_destroy(ServerSocket self); /** @@ -200,7 +199,7 @@ ServerSocket_destroy(ServerSocket self); * * \return a new client socket instance. */ -Socket +PAL_API Socket TcpSocket_create(void); /** @@ -209,7 +208,7 @@ TcpSocket_create(void); * \param self the client socket instance * \param timeoutInMs the timeout in ms */ -void +PAL_API void Socket_setConnectTimeout(Socket self, uint32_t timeoutInMs); /** @@ -230,13 +229,13 @@ Socket_setConnectTimeout(Socket self, uint32_t timeoutInMs); * * \return true if the connection was established successfully, false otherwise */ -bool +PAL_API bool Socket_connect(Socket self, const char* address, int port); -bool +PAL_API bool Socket_connectAsync(Socket self, const char* address, int port); -SocketState +PAL_API SocketState Socket_checkAsyncConnectState(Socket self); /** @@ -255,7 +254,7 @@ Socket_checkAsyncConnectState(Socket self); * * \return the number of bytes read or -1 if an error occurred */ -int +PAL_API int Socket_read(Socket self, uint8_t* buf, int size); /** @@ -267,7 +266,7 @@ Socket_read(Socket self, uint8_t* buf, int size); * * \return number of bytes transmitted of -1 in case of an error */ -int +PAL_API int Socket_write(Socket self, uint8_t* buf, int size); /** @@ -281,7 +280,7 @@ Socket_write(Socket self, uint8_t* buf, int size); * * \return the IP address and port number as strings separated by the ':' character. */ -char* +PAL_API char* Socket_getPeerAddress(Socket self); /** @@ -298,7 +297,7 @@ Socket_getPeerAddress(Socket self); * \return the IP address and port number as strings separated by the ':' character. If the * address is an IPv6 address the IP part is encapsulated in square brackets. */ -char* +PAL_API char* Socket_getPeerAddressStatic(Socket self, char* peerAddressString); /** @@ -311,7 +310,7 @@ Socket_getPeerAddressStatic(Socket self, char* peerAddressString); * * \param self the client, connection or server socket instance */ -void +PAL_API void Socket_destroy(Socket self); /*! @} */ diff --git a/hal/inc/hal_thread.h b/hal/inc/hal_thread.h index 7dbb390a..0558f9e4 100644 --- a/hal/inc/hal_thread.h +++ b/hal/inc/hal_thread.h @@ -3,7 +3,7 @@ * * Multi-threading abstraction layer * - * Copyright 2013, 2014 Michael Zillgith + * Copyright 2013-2018 Michael Zillgith * * This file is part of libIEC61850. * @@ -26,7 +26,7 @@ #ifndef THREAD_HAL_H_ #define THREAD_HAL_H_ -#include +#include "hal_base.h" #ifdef __cplusplus extern "C" { @@ -66,7 +66,7 @@ typedef void* (*ThreadExecutionFunction) (void*); * * \return the newly created Thread instance */ -Thread +PAL_API Thread Thread_create(ThreadExecutionFunction function, void* parameter, bool autodestroy); /** @@ -77,7 +77,7 @@ Thread_create(ThreadExecutionFunction function, void* parameter, bool autodestro * * \param thread the Thread instance to start */ -void +PAL_API void Thread_start(Thread thread); /** @@ -85,26 +85,26 @@ Thread_start(Thread thread); * * \param thread the Thread instance to destroy */ -void +PAL_API void Thread_destroy(Thread thread); /** * \brief Suspend execution of the Thread for the specified number of milliseconds */ -void +PAL_API void Thread_sleep(int millies); -Semaphore +PAL_API Semaphore Semaphore_create(int initialValue); /* Wait until semaphore value is greater than zero. Then decrease the semaphore value. */ -void +PAL_API void Semaphore_wait(Semaphore self); -void +PAL_API void Semaphore_post(Semaphore self); -void +PAL_API void Semaphore_destroy(Semaphore self); /*! @} */ diff --git a/hal/inc/hal_time.h b/hal/inc/hal_time.h index 5ac8080e..0e57d338 100644 --- a/hal/inc/hal_time.h +++ b/hal/inc/hal_time.h @@ -24,12 +24,12 @@ #ifndef HAL_C_ #define HAL_C_ +#include "hal_base.h" + #ifdef __cplusplus extern "C" { #endif -#include - /** * \file hal_time.h * \brief Abstraction layer for system time access @@ -54,7 +54,7 @@ extern "C" { * * \return the system time with millisecond resolution. */ -uint64_t +PAL_API uint64_t Hal_getTimeInMs(void); /*! @} */ diff --git a/hal/inc/lib_memory.h b/hal/inc/lib_memory.h index 95314af0..63463a8e 100644 --- a/hal/inc/lib_memory.h +++ b/hal/inc/lib_memory.h @@ -24,6 +24,8 @@ #ifndef MEMORY_H_ #define MEMORY_H_ +#include "hal_base.h" + #define CALLOC(nmemb, size) Memory_calloc(nmemb, size) #define MALLOC(size) Memory_malloc(size) #define REALLOC(oldptr, size) Memory_realloc(oldptr, size) @@ -38,24 +40,22 @@ extern "C" { #endif -#include - typedef void (*MemoryExceptionHandler) (void* parameter); -void +PAL_API void Memory_installExceptionHandler(MemoryExceptionHandler handler, void* parameter); -void* +PAL_API void* Memory_malloc(size_t size); -void* +PAL_API void* Memory_calloc(size_t nmemb, size_t size); -void * +PAL_API void * Memory_realloc(void *ptr, size_t size); -void +PAL_API void Memory_free(void* memb); #ifdef __cplusplus diff --git a/hal/inc/tls_config.h b/hal/inc/tls_config.h index ec70fe9b..06473faa 100644 --- a/hal/inc/tls_config.h +++ b/hal/inc/tls_config.h @@ -16,8 +16,7 @@ extern "C" { #endif -#include -#include +#include "hal_base.h" /** * \file tls_config.h @@ -42,11 +41,11 @@ typedef struct sTLSConfiguration* TLSConfiguration; * * \return the new TLS configuration */ -TLSConfiguration +PAL_API TLSConfiguration TLSConfiguration_create(void); /* will be called by stack automatically when appropriate */ -void +PAL_API void TLSConfiguration_setClientMode(TLSConfiguration self); /** @@ -54,7 +53,7 @@ TLSConfiguration_setClientMode(TLSConfiguration self); * * \param value true to enable chain validation, false to disable */ -void +PAL_API void TLSConfiguration_setChainValidation(TLSConfiguration self, bool value); /** @@ -65,7 +64,7 @@ TLSConfiguration_setChainValidation(TLSConfiguration self, bool value); * * \param value true to enable setting, false otherwise */ -void +PAL_API void TLSConfiguration_setAllowOnlyKnownCertificates(TLSConfiguration self, bool value); /** @@ -76,7 +75,7 @@ TLSConfiguration_setAllowOnlyKnownCertificates(TLSConfiguration self, bool value * * \return true, when the certificate was set, false otherwise (e.g. unknown certificate format) */ -bool +PAL_API bool TLSConfiguration_setOwnCertificate(TLSConfiguration self, uint8_t* certificate, int certLen); /** @@ -86,25 +85,25 @@ TLSConfiguration_setOwnCertificate(TLSConfiguration self, uint8_t* certificate, * * \return true, when the certificate was set, false otherwise (e.g. unknown certificate format) */ -bool +PAL_API bool TLSConfiguration_setOwnCertificateFromFile(TLSConfiguration self, const char* filename); -bool +PAL_API bool TLSConfiguration_setOwnKey(TLSConfiguration self, uint8_t* key, int keyLen, const char* keyPassword); -bool +PAL_API bool TLSConfiguration_setOwnKeyFromFile(TLSConfiguration self, const char* filename, const char* keyPassword); -bool +PAL_API bool TLSConfiguration_addAllowedCertificate(TLSConfiguration self, uint8_t* certifcate, int certLen); -bool +PAL_API bool TLSConfiguration_addAllowedCertificateFromFile(TLSConfiguration self, const char* filename); -bool +PAL_API bool TLSConfiguration_addCACertificate(TLSConfiguration self, uint8_t* certifcate, int certLen); -bool +PAL_API bool TLSConfiguration_addCACertificateFromFile(TLSConfiguration self, const char* filename); /** @@ -114,10 +113,10 @@ TLSConfiguration_addCACertificateFromFile(TLSConfiguration self, const char* fil * * \param timeInMs session renegotiation timeout in milliseconds */ -void +PAL_API void TLSConfiguration_setRenegotiationTime(TLSConfiguration self, int timeInMs); -void +PAL_API void TLSConfiguration_destroy(TLSConfiguration self); /** @} */ diff --git a/hal/inc/tls_socket.h b/hal/inc/tls_socket.h index 553cb82b..1eb39a85 100644 --- a/hal/inc/tls_socket.h +++ b/hal/inc/tls_socket.h @@ -41,7 +41,6 @@ extern "C" { * @{ */ -#include #include "tls_config.h" #include "hal_socket.h" @@ -59,13 +58,13 @@ typedef struct sTLSSocket* TLSSocket; * * \return new TLS connection instance */ -TLSSocket +PAL_API TLSSocket TLSSocket_create(Socket socket, TLSConfiguration configuration, bool storeClientCert); /** * \brief Perform a new TLS handshake/session renegotiation */ -bool +PAL_API bool TLSSocket_performHandshake(TLSSocket self); /** @@ -75,7 +74,7 @@ TLSSocket_performHandshake(TLSSocket self); * * \return the certificate byte buffer */ -uint8_t* +PAL_API uint8_t* TLSSocket_getPeerCertificate(TLSSocket self, int* certSize); /** @@ -90,7 +89,7 @@ TLSSocket_getPeerCertificate(TLSSocket self, int* certSize); * * \return the number of bytes read or -1 if an error occurred */ -int +PAL_API int TLSSocket_read(TLSSocket self, uint8_t* buf, int size); /** @@ -102,13 +101,13 @@ TLSSocket_read(TLSSocket self, uint8_t* buf, int size); * * \return number of bytes transmitted of -1 in case of an error */ -int +PAL_API int TLSSocket_write(TLSSocket self, uint8_t* buf, int size); /** * \brief Closes the TLS connection and released all resources */ -void +PAL_API void TLSSocket_close(TLSSocket self); /*! @} */ diff --git a/make/target_system.mk b/make/target_system.mk index b03a0ec7..fe6c7744 100644 --- a/make/target_system.mk +++ b/make/target_system.mk @@ -94,7 +94,7 @@ CFLAGS+=-m64 endif LDLIBS=-lws2_32 -DYNLIB_LDFLAGS=-Wl,-no-undefined -Wl,--enable-runtime-pseudo-reloc -Wl,--output-def,libiec61850.def,--out-implib,libiec61850.a +DYNLIB_LDFLAGS=-Wl,-no-undefined -Wl,--enable-runtime-pseudo-reloc -Wl,--out-implib,libiec61850.a # on Windows: only compile with ethernet support if winpcap files are in third_party/winpcap! diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 232dde6e..eee53492 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -218,8 +218,6 @@ ELSE() add_definitions(-DEXCLUDE_ETHERNET_WINDOWS) ENDIF() -set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}\"/DEF:${CMAKE_CURRENT_SOURCE_DIR}/vs/libiec61850.def\"") - include_directories( ../third_party/winpcap/include ) @@ -333,6 +331,7 @@ 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 @@ -343,19 +342,6 @@ target_link_libraries(iec61850-shared ${CMAKE_CURRENT_SOURCE_DIR}/../third_party/winpcap/lib/packet.lib ) - -if(MSVC) - set_target_properties(iec61850-shared PROPERTIES - LINK_FLAGS "/DEF:\"${CMAKE_CURRENT_SOURCE_DIR}/vs/libiec61850.def\"" - ) -endif() - -ELSE(WITH_WPCAP) -if(MSVC) - set_target_properties(iec61850-shared PROPERTIES - LINK_FLAGS "/DEF:\"${CMAKE_CURRENT_SOURCE_DIR}/vs/libiec61850-wo-goose.def\"" - ) -endif() ENDIF(WITH_WPCAP) set(BINDIR "bin") diff --git a/src/Doxyfile.in b/src/Doxyfile.in index bc9fe073..c5ea6585 100644 --- a/src/Doxyfile.in +++ b/src/Doxyfile.in @@ -794,11 +794,8 @@ INPUT = "iec61850/inc/iec61850_client.h" \ "goose/goose_receiver.h" \ "sampled_values/sv_subscriber.h" \ "sampled_values/sv_publisher.h" \ - "mms/inc/mms_device_model.h" \ "mms/inc/mms_types.h" \ "mms/inc/mms_common.h" \ - "mms/inc/mms_server.h" \ - "mms/inc/iso_server.h" \ "mms/inc/mms_named_variable_list.h" \ "mms/inc/mms_type_spec.h" \ "mms/inc/mms_types.h" \ diff --git a/src/common/buffer_chain.c b/src/common/buffer_chain.c index 96043140..e505f8f1 100644 --- a/src/common/buffer_chain.c +++ b/src/common/buffer_chain.c @@ -35,41 +35,6 @@ BufferChain_init(BufferChain self, int length, int partLength, BufferChain nextP self->buffer = buffer; } -void -BufferChain_destroy(BufferChain self) -{ - BufferChain currentChainElement = self; - - while (currentChainElement != NULL) { - BufferChain nextChainElement = currentChainElement->nextPart; - GLOBAL_FREEMEM(currentChainElement); - currentChainElement = nextChainElement; - } -} - -int /* returns the number of bytes written to the buffer */ -BufferChain_dumpToBuffer(BufferChain self, uint8_t* buffer, int bufferMaxSize) -{ - if (self->length > bufferMaxSize) - return 0; - - BufferChain currentChain = self; - - int currentBufferIndex = 0; - - do { - int currentChainIndex = 0; - int currentPartLength = self->partLength; - - while (currentChainIndex < currentPartLength) - buffer[currentBufferIndex++] = self->buffer[currentChainIndex++]; - - currentChain = currentChain->nextPart; - } while (currentChain != NULL); - - return currentBufferIndex; -} - void MemoryArea_initialize(MemoryArea* self, uint8_t* memory, int size) { diff --git a/src/common/inc/buffer_chain.h b/src/common/inc/buffer_chain.h index 9c335a8e..115f23af 100644 --- a/src/common/inc/buffer_chain.h +++ b/src/common/inc/buffer_chain.h @@ -1,13 +1,31 @@ /* - * buffer_chain.h + * buffer_chain.h * - * Created on: Nov 10, 2013 - * Author: mzillgit + * Copyright 2013-2018 Michael Zillgith + * + * This file is part of libIEC61850. + * + * libIEC61850 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * libIEC61850 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with libIEC61850. If not, see . + * + * See COPYING file for the complete license text. */ #ifndef BUFFER_CHAIN_H_ #define BUFFER_CHAIN_H_ +#include "libiec61850_platform_includes.h" + typedef struct sBufferChain* BufferChain; struct sBufferChain { @@ -18,26 +36,19 @@ struct sBufferChain { BufferChain nextPart; }; -void +LIB61850_INTERNAL void BufferChain_init(BufferChain self, int length, int partLength, BufferChain nextPart, uint8_t* buffer); -void -BufferChain_destroy(BufferChain self); - -int /* returns the number of bytes written to the buffer */ -BufferChain_dumpToBuffer(BufferChain self, uint8_t* buffer, int bufferMaxSize); - - typedef struct { uint8_t* memory; int currentPos; int size; } MemoryArea; -void +LIB61850_INTERNAL void MemoryArea_initialize(MemoryArea* self, uint8_t* memory, int size); -uint8_t* +LIB61850_INTERNAL uint8_t* MemoryArea_getNextBlock(MemoryArea* self, int size); #if 0 diff --git a/src/common/inc/byte_buffer.h b/src/common/inc/byte_buffer.h index 0358a9a3..63964a69 100644 --- a/src/common/inc/byte_buffer.h +++ b/src/common/inc/byte_buffer.h @@ -1,7 +1,7 @@ /* * byte_buffer.h * - * Copyright 2013 Michael Zillgith + * Copyright 2013-2018 Michael Zillgith * * This file is part of libIEC61850. * @@ -36,34 +36,34 @@ typedef struct { int size; } ByteBuffer; -ByteBuffer* +LIB61850_INTERNAL ByteBuffer* ByteBuffer_create(ByteBuffer* self, int maxSize); -void +LIB61850_INTERNAL void ByteBuffer_destroy(ByteBuffer* self); -void +LIB61850_INTERNAL void ByteBuffer_wrap(ByteBuffer* self, uint8_t* buf, int size, int maxSize); -int +LIB61850_INTERNAL int ByteBuffer_append(ByteBuffer* self, uint8_t* data, int dataSize); -int +LIB61850_INTERNAL int ByteBuffer_appendByte(ByteBuffer* self, uint8_t byte); -uint8_t* +LIB61850_INTERNAL uint8_t* ByteBuffer_getBuffer(ByteBuffer* self); -int +LIB61850_INTERNAL int ByteBuffer_getSize(ByteBuffer* self); -int +LIB61850_INTERNAL int ByteBuffer_getMaxSize(ByteBuffer* self); -int +LIB61850_INTERNAL int ByteBuffer_setSize(ByteBuffer* self, int size); -void +LIB61850_INTERNAL void ByteBuffer_print(ByteBuffer* self, char* message); #ifdef __cplusplus diff --git a/src/common/inc/conversions.h b/src/common/inc/conversions.h index 03b1269a..c2c7c68e 100644 --- a/src/common/inc/conversions.h +++ b/src/common/inc/conversions.h @@ -3,7 +3,7 @@ * * Some helper functions to convert data. * - * Copyright 2014 Michael Zillgith + * Copyright 2014-2018 Michael Zillgith * * This file is part of libIEC61850. * @@ -26,18 +26,18 @@ #ifndef CONVERSIONS_H_ #define CONVERSIONS_H_ -#include "libiec61850_platform_includes.h" +#include "libiec61850_common_api.h" -void +LIB61850_INTERNAL void Conversions_intToStringBuffer(int intValue, int numberOfDigits, uint8_t* buffer); -void +LIB61850_INTERNAL void Conversions_msTimeToGeneralizedTime(uint64_t msTime, uint8_t* buffer); -uint64_t +LIB61850_INTERNAL uint64_t Conversions_generalizedTimeToMsTime(const char* gtString); -void +LIB61850_INTERNAL void memcpyReverseByteOrder(uint8_t* dst, const uint8_t* src, int size); #endif /* CONVERSIONS_H_ */ diff --git a/src/common/inc/libiec61850_common_api.h b/src/common/inc/libiec61850_common_api.h index eb828656..a233ccc9 100644 --- a/src/common/inc/libiec61850_common_api.h +++ b/src/common/inc/libiec61850_common_api.h @@ -1,5 +1,5 @@ /* - * libiec61850_common_api_includes.h + * libiec61850_common_api.h */ #ifndef LIBIEC61850_COMMON_API_INCLUDES_H_ @@ -17,6 +17,32 @@ #define ATTRIBUTE_PACKED #endif +#ifndef DEPRECATED +#if defined(__GNUC__) || defined(__clang__) + #define DEPRECATED __attribute__((deprecated)) +#else + #define DEPRECATED +#endif +#endif + +#if defined _WIN32 || defined __CYGWIN__ + #ifdef EXPORT_FUNCTIONS_FOR_DLL + #define LIB61850_API __declspec(dllexport) + #else + #define LIB61850_API + #endif + + #define LIB61850_INTERNAL +#else + #if __GNUC__ >= 4 + #define LIB61850_API __attribute__ ((visibility ("default"))) + #define LIB61850_INTERNAL __attribute__ ((visibility ("hidden"))) + #else + #define LIB61850_API + #define LIB61850_INTERNAL + #endif +#endif + #include "hal_time.h" #include "mms_value.h" diff --git a/src/common/inc/linked_list.h b/src/common/inc/linked_list.h index 4cb6b451..b0054f4d 100644 --- a/src/common/inc/linked_list.h +++ b/src/common/inc/linked_list.h @@ -24,8 +24,7 @@ #ifndef LINKED_LIST_H_ #define LINKED_LIST_H_ -#include -#include +#include "libiec61850_common_api.h" #ifdef __cplusplus extern "C" { @@ -57,7 +56,7 @@ typedef struct sLinkedList* LinkedList; * * \return the newly created LinkedList instance */ -LinkedList +LIB61850_API LinkedList LinkedList_create(void); /** @@ -69,7 +68,7 @@ LinkedList_create(void); * * \param self the LinkedList instance */ -void +LIB61850_API void LinkedList_destroy(LinkedList self); @@ -86,7 +85,7 @@ typedef void (*LinkedListValueDeleteFunction) (void*); * \param valueDeleteFunction a function that is called for each data element of the LinkedList with the pointer * to the linked list data element. */ -void +LIB61850_API void LinkedList_destroyDeep(LinkedList self, LinkedListValueDeleteFunction valueDeleteFunction); /** @@ -97,7 +96,7 @@ LinkedList_destroyDeep(LinkedList self, LinkedListValueDeleteFunction valueDelet * * \param self the LinkedList instance */ -void +LIB61850_API void LinkedList_destroyStatic(LinkedList self); /** @@ -109,7 +108,7 @@ LinkedList_destroyStatic(LinkedList self); * \param self the LinkedList instance * \param data data to append to the LinkedList instance */ -void +LIB61850_API void LinkedList_add(LinkedList self, void* data); /** @@ -120,7 +119,7 @@ LinkedList_add(LinkedList self, void* data); * * \return true if data is part of the list, false otherwise */ -bool +LIB61850_API bool LinkedList_contains(LinkedList self, void* data); /** @@ -131,7 +130,7 @@ LinkedList_contains(LinkedList self, void* data); * * \return true if data has been removed from the list, false otherwise */ -bool +LIB61850_API bool LinkedList_remove(LinkedList self, void* data); /** @@ -140,7 +139,7 @@ LinkedList_remove(LinkedList self, void* data); * \param self the LinkedList instance * \param index index of the requested element. */ -LinkedList +LIB61850_API LinkedList LinkedList_get(LinkedList self, int index); /** @@ -148,7 +147,7 @@ LinkedList_get(LinkedList self, int index); * * \param self the LinkedList instance */ -LinkedList +LIB61850_API LinkedList LinkedList_getNext(LinkedList self); /** @@ -156,7 +155,7 @@ LinkedList_getNext(LinkedList self); * * \param listElement the LinkedList instance */ -LinkedList +LIB61850_API LinkedList LinkedList_getLastElement(LinkedList self); /** @@ -164,7 +163,7 @@ LinkedList_getLastElement(LinkedList self); * * \param listElement the LinkedList instance */ -LinkedList +LIB61850_API LinkedList LinkedList_insertAfter(LinkedList listElement, void* data); /** @@ -174,13 +173,13 @@ LinkedList_insertAfter(LinkedList listElement, void* data); * * \return number of data elements stored in the list */ -int +LIB61850_API int LinkedList_size(LinkedList self); -void* +LIB61850_API void* LinkedList_getData(LinkedList self); -void +LIB61850_API void LinkedList_printStringList(LinkedList self); /**@}*/ diff --git a/src/common/inc/map.h b/src/common/inc/map.h index 9b340143..ae981e8b 100644 --- a/src/common/inc/map.h +++ b/src/common/inc/map.h @@ -1,7 +1,7 @@ /* * map.h * - * Copyright 2013 Michael Zillgith + * Copyright 2013-2018 Michael Zillgith * * This file is part of libIEC61850. * @@ -24,7 +24,7 @@ #ifndef MAP_H_ #define MAP_H_ -#include "libiec61850_platform_includes.h" +#include "libiec61850_common_api.h" #include "linked_list.h" typedef struct sMap* Map; @@ -36,28 +36,28 @@ struct sMap { int (*compareKeys)(void* key1, void* key2); }; -Map +LIB61850_INTERNAL Map Map_create(void); -int +LIB61850_INTERNAL int Map_size(Map map); -void* +LIB61850_INTERNAL void* Map_addEntry(Map map, void* key, void* value); -void* +LIB61850_INTERNAL void* Map_removeEntry(Map map, void* key, bool deleteKey); -void* +LIB61850_INTERNAL void* Map_getEntry(Map map, void* key); -void +LIB61850_INTERNAL void Map_delete(Map map, bool deleteKey); -void +LIB61850_INTERNAL void Map_deleteStatic(Map map, bool deleteKey); -void +LIB61850_INTERNAL void Map_deleteDeep(Map map, bool deleteKey, void (*valueDeleteFunction) (void*)); diff --git a/src/common/inc/mem_alloc_linked_list.h b/src/common/inc/mem_alloc_linked_list.h index df88f887..c4ac10d4 100644 --- a/src/common/inc/mem_alloc_linked_list.h +++ b/src/common/inc/mem_alloc_linked_list.h @@ -37,10 +37,10 @@ extern "C" { typedef struct sMemAllocLinkedList* MemAllocLinkedList; -MemAllocLinkedList +LIB61850_INTERNAL MemAllocLinkedList MemAllocLinkedList_create(MemoryAllocator* ma); -LinkedList +LIB61850_INTERNAL LinkedList MemAllocLinkedList_add(MemAllocLinkedList list, void* data); #endif /* MEM_ALLOC_LINKED_LIST_H_ */ diff --git a/src/common/inc/simple_allocator.h b/src/common/inc/simple_allocator.h index 59da7ce4..63c93645 100644 --- a/src/common/inc/simple_allocator.h +++ b/src/common/inc/simple_allocator.h @@ -1,7 +1,7 @@ /* * simple_allocator.h * - * Copyright 2013 Michael Zillgith + * Copyright 2013-2018 Michael Zillgith * * This file is part of libIEC61850. * @@ -30,13 +30,13 @@ typedef struct { int size; } MemoryAllocator; -void +LIB61850_INTERNAL void MemoryAllocator_init(MemoryAllocator* self, char* memoryBlock, int size); -int +LIB61850_INTERNAL int MemoryAllocator_getAlignedSize(int size); -char* +LIB61850_INTERNAL char* MemoryAllocator_allocate(MemoryAllocator* self, int size); #endif /* SIMPLE_ALLOCATOR_H_ */ diff --git a/src/common/inc/string_map.h b/src/common/inc/string_map.h index 499778b1..01fa2c40 100644 --- a/src/common/inc/string_map.h +++ b/src/common/inc/string_map.h @@ -23,6 +23,6 @@ #include "map.h" -Map +LIB61850_INTERNAL Map StringMap_create(void); diff --git a/src/common/inc/string_utilities.h b/src/common/inc/string_utilities.h index 7ee0a25a..f0ce16f9 100644 --- a/src/common/inc/string_utilities.h +++ b/src/common/inc/string_utilities.h @@ -1,7 +1,7 @@ /* * string_utilities.h * - * Copyright 2013 Michael Zillgith + * Copyright 2013-2018 Michael Zillgith * * This file is part of libIEC61850. * @@ -24,64 +24,64 @@ #ifndef STRING_UTILITIES_H_ #define STRING_UTILITIES_H_ -#include "libiec61850_platform_includes.h" +#include "libiec61850_common_api.h" #include "linked_list.h" #ifdef __cplusplus extern "C" { #endif -char* +LIB61850_INTERNAL char* StringUtils_copyString(const char* string); -char* +LIB61850_INTERNAL char* StringUtils_copyStringToBuffer(const char* string, char* buffer); -char* +LIB61850_INTERNAL char* StringUtils_copySubString(char* startPos, char* endPos); /** * \brief Concatenate strings. count indicates the number of strings * to concatenate. */ -char* +LIB61850_INTERNAL char* StringUtils_createString(int count, ...); /** * \brief Concatenate strings in user provided buffer. count indicates the number of strings * to concatenate. */ -char* +LIB61850_INTERNAL char* StringUtils_createStringInBuffer(char* buffer, int count, ...); -char* +LIB61850_INTERNAL char* StringUtils_createStringFromBuffer(const uint8_t* buf, int size); -char* +LIB61850_INTERNAL char* StringUtils_createStringFromBufferInBuffer(char* newString, const uint8_t* buf, int size); -void +LIB61850_INTERNAL void StringUtils_replace(char* string, char oldChar, char newChar); -bool +LIB61850_INTERNAL bool StringUtils_isDigit(char character); -int +LIB61850_INTERNAL int StringUtils_digitToInt(char digit); -int +LIB61850_INTERNAL int StringUtils_digitsToInt(const char* digits, int count); -int +LIB61850_INTERNAL int StringUtils_createBufferFromHexString(char* hexString, uint8_t* buffer); /** * \brief test if string starts with prefix */ -bool +LIB61850_INTERNAL bool StringUtils_startsWith(char* string, char* prefix); -bool +LIB61850_INTERNAL bool StringUtils_endsWith(const char* str, const char* suffix); /** @@ -92,7 +92,7 @@ StringUtils_endsWith(const char* str, const char* suffix); * * \returns 0 if a equals b; a positive number if b > a; a negative number if b < a */ -int +LIB61850_INTERNAL int StringUtils_compareChars(char a, char b); /** @@ -103,7 +103,7 @@ StringUtils_compareChars(char a, char b); * * \returns 0 if a equals b; a positive number if b > a; a negative number if b < a */ -int +LIB61850_INTERNAL int StringUtils_compareStrings(const char* a, const char* b); /** @@ -111,7 +111,7 @@ StringUtils_compareStrings(const char* a, const char* b); * * \param list a list that contains string elements */ -void +LIB61850_INTERNAL void StringUtils_sortList(LinkedList list); #ifdef __cplusplus diff --git a/src/goose/goose_publisher.h b/src/goose/goose_publisher.h index a206e69e..9d250f8d 100644 --- a/src/goose/goose_publisher.h +++ b/src/goose/goose_publisher.h @@ -1,7 +1,7 @@ /* * goose_publisher.h * - * Copyright 2013 Michael Zillgith + * Copyright 2013-2018 Michael Zillgith * * This file is part of libIEC61850. * @@ -24,6 +24,7 @@ #ifndef GOOSE_PUBLISHER_H_ #define GOOSE_PUBLISHER_H_ +#include "libiec61850_platform_includes.h" #include "linked_list.h" #include "mms_value.h" @@ -45,40 +46,40 @@ typedef struct sCommParameters { typedef struct sGoosePublisher* GoosePublisher; -GoosePublisher +LIB61850_API GoosePublisher GoosePublisher_create(CommParameters* parameters, const char* interfaceID); -void +LIB61850_API void GoosePublisher_destroy(GoosePublisher self); -int +LIB61850_API int GoosePublisher_publish(GoosePublisher self, LinkedList dataSet); -void +LIB61850_API void GoosePublisher_setGoID(GoosePublisher self, char* goID); -void +LIB61850_API void GoosePublisher_setGoCbRef(GoosePublisher self, char* goCbRef); -void +LIB61850_API void GoosePublisher_setTimeAllowedToLive(GoosePublisher self, uint32_t timeAllowedToLive); -void +LIB61850_API void GoosePublisher_setDataSetRef(GoosePublisher self, char* dataSetRef); -void +LIB61850_API void GoosePublisher_setConfRev(GoosePublisher self, uint32_t confRev); -void +LIB61850_API void GoosePublisher_setSimulation(GoosePublisher self, bool simulation); -void +LIB61850_API void GoosePublisher_setNeedsCommission(GoosePublisher self, bool ndsCom); -uint64_t +LIB61850_API uint64_t GoosePublisher_increaseStNum(GoosePublisher self); -void +LIB61850_API void GoosePublisher_reset(GoosePublisher self); #ifdef __cplusplus diff --git a/src/goose/goose_receiver.h b/src/goose/goose_receiver.h index 4638adbe..997cb142 100644 --- a/src/goose/goose_receiver.h +++ b/src/goose/goose_receiver.h @@ -1,7 +1,7 @@ /* * goose_receiver.h * - * Copyright 2014 Michael Zillgith + * Copyright 2014-2018 Michael Zillgith * * This file is part of libIEC61850. * @@ -48,7 +48,7 @@ typedef struct sGooseReceiver* GooseReceiver; * * \return the new GooseReceiver instance */ -GooseReceiver +LIB61850_API GooseReceiver GooseReceiver_create(void); /** @@ -57,7 +57,7 @@ GooseReceiver_create(void); * \param self the GooseReceiver instance * \param interfaceId */ -void +LIB61850_API void GooseReceiver_setInterfaceId(GooseReceiver self, const char* interfaceId); /** @@ -69,7 +69,7 @@ GooseReceiver_setInterfaceId(GooseReceiver self, const char* interfaceId); * \param self the GooseReceiver instance * \param subscriber the GooseSubscriber instance to add */ -void +LIB61850_API void GooseReceiver_addSubscriber(GooseReceiver self, GooseSubscriber subscriber); /** @@ -81,7 +81,7 @@ GooseReceiver_addSubscriber(GooseReceiver self, GooseSubscriber subscriber); * \param self the GooseReceiver instance * \param subscriber the GooseSubscriber instance to remove */ -void +LIB61850_API void GooseReceiver_removeSubscriber(GooseReceiver self, GooseSubscriber subscriber); /** @@ -89,7 +89,7 @@ GooseReceiver_removeSubscriber(GooseReceiver self, GooseSubscriber subscriber); * * \param self the GooseReceiver instance */ -void +LIB61850_API void GooseReceiver_start(GooseReceiver self); /** @@ -99,7 +99,7 @@ GooseReceiver_start(GooseReceiver self); * * \param self the GooseReceiver instance */ -void +LIB61850_API void GooseReceiver_stop(GooseReceiver self); /** @@ -111,7 +111,7 @@ GooseReceiver_stop(GooseReceiver self); * * \return true if GOOSE receiver is running, false otherwise */ -bool +LIB61850_API bool GooseReceiver_isRunning(GooseReceiver self); /** @@ -119,16 +119,16 @@ GooseReceiver_isRunning(GooseReceiver self); * * \param self the GooseReceiver instance */ -void +LIB61850_API void GooseReceiver_destroy(GooseReceiver self); /*************************************** * Functions for non-threaded operation ***************************************/ -EthernetSocket +LIB61850_API EthernetSocket GooseReceiver_startThreadless(GooseReceiver self); -void +LIB61850_API void GooseReceiver_stopThreadless(GooseReceiver self); /** @@ -140,7 +140,7 @@ GooseReceiver_stopThreadless(GooseReceiver self); * * \return true if a message was available and has been parsed, false otherwise */ -bool +LIB61850_API bool GooseReceiver_tick(GooseReceiver self); /**@}*/ diff --git a/src/goose/goose_subscriber.h b/src/goose/goose_subscriber.h index 113be98c..9d908046 100644 --- a/src/goose/goose_subscriber.h +++ b/src/goose/goose_subscriber.h @@ -1,7 +1,7 @@ /* * goose_subscriber.h * - * Copyright 2013, 2014 Michael Zillgith + * Copyright 2013-2018 Michael Zillgith * * This file is part of libIEC61850. * @@ -67,7 +67,7 @@ typedef void (*GooseListener)(GooseSubscriber subscriber, void* parameter); * GOOSE publisher uses. * \param dataSetValues the MmsValue object where the data set values will be written or NULL. */ -GooseSubscriber +LIB61850_API GooseSubscriber GooseSubscriber_create(char* goCbRef, MmsValue* dataSetValues); //char* @@ -81,7 +81,7 @@ GooseSubscriber_create(char* goCbRef, MmsValue* dataSetValues); * \param self GooseSubscriber instance to operate on. * \param the APPID value the subscriber should use to filter messages */ -void +LIB61850_API void GooseSubscriber_setAppId(GooseSubscriber self, uint16_t appId); /** @@ -91,10 +91,10 @@ GooseSubscriber_setAppId(GooseSubscriber self, uint16_t appId); * message were received with correct state and sequence ID. * */ -bool +LIB61850_API bool GooseSubscriber_isValid(GooseSubscriber self); -void +LIB61850_API void GooseSubscriber_destroy(GooseSubscriber self); /** @@ -104,7 +104,7 @@ GooseSubscriber_destroy(GooseSubscriber self); * \param listener user provided callback function * \param parameter a user provided parameter that will be passed to the callback function */ -void +LIB61850_API void GooseSubscriber_setListener(GooseSubscriber self, GooseListener listener, void* parameter); /** @@ -116,7 +116,7 @@ GooseSubscriber_setListener(GooseSubscriber self, GooseListener listener, void* * * \return the state number of the last received GOOSE message */ -uint32_t +LIB61850_API uint32_t GooseSubscriber_getStNum(GooseSubscriber self); /** @@ -129,7 +129,7 @@ GooseSubscriber_getStNum(GooseSubscriber self); * * \return the sequence number of the last received GOOSE message */ -uint32_t +LIB61850_API uint32_t GooseSubscriber_getSqNum(GooseSubscriber self); /** @@ -141,7 +141,7 @@ GooseSubscriber_getSqNum(GooseSubscriber self); * * \return the state of the test flag of the last received GOOSE message. */ -bool +LIB61850_API bool GooseSubscriber_isTest(GooseSubscriber self); /** @@ -152,7 +152,7 @@ GooseSubscriber_isTest(GooseSubscriber self); * \return the confRev value of the last received GOOSE message. If the message does not contain such * a value the result is always 0 */ -uint32_t +LIB61850_API uint32_t GooseSubscriber_getConfRev(GooseSubscriber self); /** @@ -165,7 +165,7 @@ GooseSubscriber_getConfRev(GooseSubscriber self); * \return the state of the ndsCom flag of the last received GOOSE message. * */ -bool +LIB61850_API bool GooseSubscriber_needsCommission(GooseSubscriber self); /** @@ -175,7 +175,7 @@ GooseSubscriber_needsCommission(GooseSubscriber self); * * \return the TimeAllowedToLive value of the last received GOOSE message in milliseconds. */ -uint32_t +LIB61850_API uint32_t GooseSubscriber_getTimeAllowedToLive(GooseSubscriber self); /** @@ -185,7 +185,7 @@ GooseSubscriber_getTimeAllowedToLive(GooseSubscriber self); * * \return the timestamp value of the last received GOOSE message in milliseconds since epoch (1.1.1970 UTC). */ -uint64_t +LIB61850_API uint64_t GooseSubscriber_getTimestamp(GooseSubscriber self); /** @@ -199,7 +199,7 @@ GooseSubscriber_getTimestamp(GooseSubscriber self); * * \return MmsValue instance of the report data set */ -MmsValue* +LIB61850_API MmsValue* GooseSubscriber_getDataSetValues(GooseSubscriber self); #ifdef __cplusplus diff --git a/src/iec61850/client/client_report_control.c b/src/iec61850/client/client_report_control.c index 3cfd4ffc..262c60ce 100644 --- a/src/iec61850/client/client_report_control.c +++ b/src/iec61850/client/client_report_control.c @@ -520,7 +520,7 @@ IedConnection_getRCBValues(IedConnection self, IedClientError* error, const char } uint32_t -IedConnection_setRCBValues(IedConnection self, IedClientError* error, ClientReportControlBlock rcb, +IedConnection_setRCBValuesAsync(IedConnection self, IedClientError* error, ClientReportControlBlock rcb, uint32_t parametersMask, bool singleRequest, IedConnection_WriteObjectHandler handler, void* parameter) { //TODO implement diff --git a/src/iec61850/inc/iec61850_cdc.h b/src/iec61850/inc/iec61850_cdc.h index 5fca651f..8615af13 100644 --- a/src/iec61850/inc/iec61850_cdc.h +++ b/src/iec61850/inc/iec61850_cdc.h @@ -133,7 +133,7 @@ extern "C" { * Constructed Attribute Classes (CAC) ***************************************************/ -DataAttribute* +LIB61850_API DataAttribute* CAC_AnalogueValue_create(const char* name, ModelNode* parent, FunctionalConstraint fc, uint8_t triggerOptions, bool isIntegerNotFloat); @@ -143,48 +143,48 @@ CAC_AnalogueValue_create(const char* name, ModelNode* parent, FunctionalConstrai * * \param hasTransInd */ -DataAttribute* +LIB61850_API DataAttribute* CAC_ValWithTrans_create(const char* name, ModelNode* parent, FunctionalConstraint fc, uint8_t triggerOptions, bool hasTransientIndicator); /** * CDC_OPTION_AC_CLC_O */ -DataAttribute* +LIB61850_API DataAttribute* CAC_Vector_create(const char* name, ModelNode* parent, uint32_t options, FunctionalConstraint fc, uint8_t triggerOptions); -DataAttribute* +LIB61850_API DataAttribute* CAC_Point_create(const char* name, ModelNode* parent, FunctionalConstraint fc, uint8_t triggerOptions, bool hasZVal); -DataAttribute* +LIB61850_API DataAttribute* CAC_ScaledValueConfig_create(const char* name, ModelNode* parent); -DataAttribute* +LIB61850_API DataAttribute* CAC_Unit_create(const char* name, ModelNode* parent, bool hasMagnitude); -DataAttribute* +LIB61850_API DataAttribute* CDA_OperBoolean(ModelNode* parent, bool isTImeActivated); /**************************************************** * Common Data Classes (CDC) ***************************************************/ -DataObject* +LIB61850_API DataObject* CDC_SPS_create(const char* dataObjectName, ModelNode* parent, uint32_t options); -DataObject* +LIB61850_API DataObject* CDC_DPS_create(const char* dataObjectName, ModelNode* parent, uint32_t options); -DataObject* +LIB61850_API DataObject* CDC_INS_create(const char* dataObjectName, ModelNode* parent, uint32_t options); -DataObject* +LIB61850_API DataObject* CDC_ENS_create(const char* dataObjectName, ModelNode* parent, uint32_t options); -DataObject* +LIB61850_API DataObject* CDC_BCR_create(const char* dataObjectName, ModelNode* parent, uint32_t options); -DataObject* +LIB61850_API DataObject* CDC_VSS_create(const char* dataObjectName, ModelNode* parent, uint32_t options); /** @@ -202,7 +202,7 @@ CDC_VSS_create(const char* dataObjectName, ModelNode* parent, uint32_t options); * \param parent the parent of the new data object (either a LogicalNode or another DataObject) * \param options bit mask to encode required optional elements */ -DataObject* +LIB61850_API DataObject* CDC_SEC_create(const char* dataObjectName, ModelNode* parent, uint32_t options); /** @@ -222,14 +222,14 @@ CDC_SEC_create(const char* dataObjectName, ModelNode* parent, uint32_t options); * \param isIntegerNotFloat if true the AnalogueValue instance have integer instead of float * */ -DataObject* +LIB61850_API DataObject* CDC_MV_create(const char* dataObjectName, ModelNode* parent, uint32_t options, bool isIntegerNotFloat); /** * CDC_OPTION_INST_MAG * CDC_OPTION_RANGE */ -DataObject* +LIB61850_API DataObject* CDC_CMV_create(const char* dataObjectName, ModelNode* parent, uint32_t options); /** @@ -250,7 +250,7 @@ CDC_CMV_create(const char* dataObjectName, ModelNode* parent, uint32_t options); * \param isIntegerNotFloat if true the AnalogueValue instance have integer instead of float * */ -DataObject* +LIB61850_API DataObject* CDC_SAV_create(const char* dataObjectName, ModelNode* parent, uint32_t options, bool isIntegerNotFloat); /** @@ -274,7 +274,7 @@ CDC_SAV_create(const char* dataObjectName, ModelNode* parent, uint32_t options, * * \return new DataObject instance */ -DataObject* +LIB61850_API DataObject* CDC_LPL_create(const char* dataObjectName, ModelNode* parent, uint32_t options); /** @@ -298,10 +298,10 @@ CDC_LPL_create(const char* dataObjectName, ModelNode* parent, uint32_t options); * * \return new DataObject instance */ -DataObject* +LIB61850_API DataObject* CDC_DPL_create(const char* dataObjectName, ModelNode* parent, uint32_t options); -DataObject* +LIB61850_API DataObject* CDC_HST_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint16_t maxPts); /** @@ -322,13 +322,13 @@ CDC_HST_create(const char* dataObjectName, ModelNode* parent, uint32_t options, * \param parent the parent of the new data object (either a LogicalNode or another DataObject) * \param options bit mask to encode required optional elements */ -DataObject* +LIB61850_API DataObject* CDC_ACD_create(const char* dataObjectName, ModelNode* parent, uint32_t options); /** * \brief Protection activation information (ACT) */ -DataObject* +LIB61850_API DataObject* CDC_ACT_create(const char* dataObjectName, ModelNode* parent, uint32_t options); /** @@ -338,7 +338,7 @@ CDC_ACT_create(const char* dataObjectName, ModelNode* parent, uint32_t options); * \param parent the parent of the new data object (either a LogicalNode or another DataObject) * \param options bit mask to encode required optional elements */ -DataObject* +LIB61850_API DataObject* CDC_SPG_create(const char* dataObjectName, ModelNode* parent, uint32_t options); /** @@ -348,7 +348,7 @@ CDC_SPG_create(const char* dataObjectName, ModelNode* parent, uint32_t options); * \param parent the parent of the new data object (either a LogicalNode or another DataObject) * \param options bit mask to encode required optional elements */ -DataObject* +LIB61850_API DataObject* CDC_VSG_create(const char* dataObjectName, ModelNode* parent, uint32_t options); /** @@ -358,7 +358,7 @@ CDC_VSG_create(const char* dataObjectName, ModelNode* parent, uint32_t options); * \param parent the parent of the new data object (either a LogicalNode or another DataObject) * \param options bit mask to encode required optional elements */ -DataObject* +LIB61850_API DataObject* CDC_ENG_create(const char* dataObjectName, ModelNode* parent, uint32_t options); /** @@ -372,7 +372,7 @@ CDC_ENG_create(const char* dataObjectName, ModelNode* parent, uint32_t options); * standard (include standard optional elements like extension namespaces and descriptions (d, dU). * */ -DataObject* +LIB61850_API DataObject* CDC_ING_create(const char* dataObjectName, ModelNode* parent, uint32_t options); /** @@ -386,7 +386,7 @@ CDC_ING_create(const char* dataObjectName, ModelNode* parent, uint32_t options); * standard (include standard optional elements like extension namespaces and descriptions (d, dU). * */ -DataObject* +LIB61850_API DataObject* CDC_ASG_create(const char* dataObjectName, ModelNode* parent, uint32_t options, bool isIntegerNotFloat); /** @@ -395,7 +395,7 @@ CDC_ASG_create(const char* dataObjectName, ModelNode* parent, uint32_t options, * possible options: * CDC_OPTION_ANGLE_REF */ -DataObject* +LIB61850_API DataObject* CDC_WYE_create(const char* dataObjectName, ModelNode* parent, uint32_t options); /** @@ -404,7 +404,7 @@ CDC_WYE_create(const char* dataObjectName, ModelNode* parent, uint32_t options); * possible options: * CDC_OPTION_ANGLE_REF */ -DataObject* +LIB61850_API DataObject* CDC_DEL_create(const char* dataObjectName, ModelNode* parent, uint32_t options); /*************************** @@ -416,7 +416,7 @@ CDC_DEL_create(const char* dataObjectName, ModelNode* parent, uint32_t options); * * \param controlOptions specify which control model to set as default and other control related options */ -DataObject* +LIB61850_API DataObject* CDC_SPC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions); /** @@ -434,7 +434,7 @@ CDC_SPC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, * \param defaultControlModel specify which control model to set as default. * */ -DataObject* +LIB61850_API DataObject* CDC_DPC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions); /** @@ -456,7 +456,7 @@ CDC_DPC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, * \param defaultControlModel specify which control model to set as default. * */ -DataObject* +LIB61850_API DataObject* CDC_INC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions); /** @@ -474,7 +474,7 @@ CDC_INC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, * \param defaultControlModel specify which control model to set as default. * */ -DataObject* +LIB61850_API DataObject* CDC_ENC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions); /** @@ -493,7 +493,7 @@ CDC_ENC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, * \param hasTransientIndicator specifies if the step position information contains the transient indicator * */ -DataObject* +LIB61850_API DataObject* CDC_BSC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions, bool hasTransientIndicator); /** @@ -511,7 +511,7 @@ CDC_BSC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, * \param controlOptions specify which control model to set as default and other control specific options * \param isIntegerNotFloat */ -DataObject* +LIB61850_API DataObject* CDC_APC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions, bool isIntegerNotFloat); /** Minimum measured value */ @@ -559,21 +559,21 @@ CDC_APC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, /** All counting data */ #define CDC_OPTION_61400_COUNTING_ALL (CDC_OPTION_61400_COUNTING_DAILY | CDC_OPTION_61400_COUNTING_MONTHLY | CDC_OPTION_61400_COUNTING_YEARLY | CDC_OPTION_61400_COUNTING_TOTAL) -DataObject* +LIB61850_API DataObject* CDC_SPV_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions, uint32_t wpOptions, bool hasChaManRs); -DataObject* +LIB61850_API DataObject* CDC_STV_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions, uint32_t wpOptions, bool hasOldStatus); -DataObject* +LIB61850_API DataObject* CDC_CMD_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions, @@ -582,21 +582,21 @@ CDC_CMD_create(const char* dataObjectName, ModelNode* parent, bool hasCmTm, bool hasCmCt); -DataObject* +LIB61850_API DataObject* CDC_ALM_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions, uint32_t wpOptions, bool hasOldStatus); -DataObject* +LIB61850_API DataObject* CDC_CTE_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions, uint32_t wpOptions, bool hasHisRs); -DataObject* +LIB61850_API DataObject* CDC_TMS_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions, diff --git a/src/iec61850/inc/iec61850_client.h b/src/iec61850/inc/iec61850_client.h index fd628ef2..4bf6fcd7 100644 --- a/src/iec61850/inc/iec61850_client.h +++ b/src/iec61850/inc/iec61850_client.h @@ -34,14 +34,6 @@ extern "C" { #include "mms_client_connection.h" #include "linked_list.h" -#ifndef DEPRECATED -#if defined(__GNUC__) || defined(__clang__) - #define DEPRECATED __attribute__((deprecated)) -#else - #define DEPRECATED -#endif -#endif - /** * * \defgroup iec61850_client_api_group IEC 61850/MMS client API */ @@ -186,7 +178,7 @@ typedef enum { * * \return the new IedConnection instance */ -IedConnection +LIB61850_API IedConnection IedConnection_create(void); /** @@ -201,7 +193,7 @@ IedConnection_create(void); * * \return the new IedConnection instance */ -IedConnection +LIB61850_API IedConnection IedConnection_createWithTlsSupport(TLSConfiguration tlsConfig); /** @@ -212,7 +204,7 @@ IedConnection_createWithTlsSupport(TLSConfiguration tlsConfig); * * \param self the connection object */ -void +LIB61850_API void IedConnection_destroy(IedConnection self); @@ -225,7 +217,7 @@ IedConnection_destroy(IedConnection self); * \param self the connection object * \param timoutInMs the connection timeout in ms */ -void +LIB61850_API void IedConnection_setConnectTimeout(IedConnection self, uint32_t timeoutInMs); /************************************************** @@ -242,7 +234,7 @@ IedConnection_setConnectTimeout(IedConnection self, uint32_t timeoutInMs); * \param hostname the host name or IP address of the server to connect to * \param tcpPort the TCP port number of the server to connect to */ -void +LIB61850_API void IedConnection_connect(IedConnection self, IedClientError* error, const char* hostname, int tcpPort); /** @@ -253,7 +245,7 @@ IedConnection_connect(IedConnection self, IedClientError* error, const char* hos * \param hostname the host name or IP address of the server to connect to * \param tcpPort the TCP port number of the server to connect to */ -void +LIB61850_API void IedConnection_connectAsync(IedConnection self, IedClientError* error, const char* hostname, int tcpPort); /** @@ -268,7 +260,7 @@ IedConnection_connectAsync(IedConnection self, IedClientError* error, const char * \param self the connection object * \param error the error code if an error occurs */ -void +LIB61850_API void IedConnection_abort(IedConnection self, IedClientError* error); /** @@ -284,7 +276,7 @@ IedConnection_abort(IedConnection self, IedClientError* error); * \param self the connection object * \param error the error code if an error occurs */ -void +LIB61850_API void IedConnection_abortAsync(IedConnection self, IedClientError* error); /** @@ -299,7 +291,7 @@ IedConnection_abortAsync(IedConnection self, IedClientError* error); * \param self the connection object * \param error the error code if an error occurs */ -void +LIB61850_API void IedConnection_release(IedConnection self, IedClientError* error); /** @@ -314,7 +306,7 @@ IedConnection_release(IedConnection self, IedClientError* error); * \param self the connection object * \param error the error code if an error occurs */ -void +LIB61850_API void IedConnection_releaseAsync(IedConnection self, IedClientError* error); /** @@ -324,7 +316,7 @@ IedConnection_releaseAsync(IedConnection self, IedClientError* error); * * \param self the connection object */ -void +LIB61850_API void IedConnection_close(IedConnection self); /** @@ -336,7 +328,7 @@ IedConnection_close(IedConnection self); * * \return the connection state */ -IedConnectionState +LIB61850_API IedConnectionState IedConnection_getState(IedConnection self); /** @@ -346,7 +338,7 @@ IedConnection_getState(IedConnection self); * * \return the LastApplError value */ -LastApplError +LIB61850_API LastApplError IedConnection_getLastApplError(IedConnection self); @@ -360,14 +352,14 @@ typedef void * \param handler that callback function * \param parameter the user provided parameter that is handed over to the callback function */ -void +LIB61850_API void IedConnection_installConnectionClosedHandler(IedConnection self, IedConnectionClosedHandler handler, void* parameter); typedef void (*IedConnectionStateChangedHandler) (void* parameter, IedConnection connection, IedConnectionState newState); -void +LIB61850_API void IedConnection_installStateChangedHandler(IedConnection self, IedConnectionStateChangedHandler handler, void* parameter); /** @@ -380,7 +372,7 @@ IedConnection_installStateChangedHandler(IedConnection self, IedConnectionStateC * * \return the MmsConnection instance used by this IedConnection. */ -MmsConnection +LIB61850_API MmsConnection IedConnection_getMmsConnection(IedConnection self); /** @} */ @@ -427,7 +419,7 @@ typedef struct sClientSVControlBlock* ClientSVControlBlock; * * \return the new instance */ -ClientSVControlBlock +LIB61850_API ClientSVControlBlock ClientSVControlBlock_create(IedConnection connection, const char* reference); /** @@ -435,10 +427,10 @@ ClientSVControlBlock_create(IedConnection connection, const char* reference); * * \param self the ClientSVControlBlock instance to operate on */ -void +LIB61850_API void ClientSVControlBlock_destroy(ClientSVControlBlock self); -bool +LIB61850_API bool ClientSVControlBlock_isMulticast(ClientSVControlBlock self); /** @@ -448,23 +440,23 @@ ClientSVControlBlock_isMulticast(ClientSVControlBlock self); * * \return the error code of the last read or write access */ -IedClientError +LIB61850_API IedClientError ClientSVControlBlock_getLastComError(ClientSVControlBlock self); -bool +LIB61850_API bool ClientSVControlBlock_setSvEna(ClientSVControlBlock self, bool value); -bool +LIB61850_API bool ClientSVControlBlock_getSvEna(ClientSVControlBlock self); -bool +LIB61850_API bool ClientSVControlBlock_setResv(ClientSVControlBlock self, bool value); -bool +LIB61850_API bool ClientSVControlBlock_getResv(ClientSVControlBlock self); -char* +LIB61850_API char* ClientSVControlBlock_getMsvID(ClientSVControlBlock self); /** @@ -478,13 +470,13 @@ ClientSVControlBlock_getMsvID(ClientSVControlBlock self); * * \return the data set reference as a NULL terminated string */ -char* +LIB61850_API char* ClientSVControlBlock_getDatSet(ClientSVControlBlock self); -uint32_t +LIB61850_API uint32_t ClientSVControlBlock_getConfRev(ClientSVControlBlock self); -uint16_t +LIB61850_API uint16_t ClientSVControlBlock_getSmpRate(ClientSVControlBlock self); @@ -493,7 +485,7 @@ ClientSVControlBlock_getSmpRate(ClientSVControlBlock self); * * \param self the ClientSVControlBlock instance to operate on */ -PhyComAddress +LIB61850_API PhyComAddress ClientSVControlBlock_getDstAddress(ClientSVControlBlock self); /** @@ -501,7 +493,7 @@ ClientSVControlBlock_getDstAddress(ClientSVControlBlock self); * * \param self the ClientSVControlBlock instance to operate on */ -int +LIB61850_API int ClientSVControlBlock_getOptFlds(ClientSVControlBlock self); /** @@ -509,7 +501,7 @@ ClientSVControlBlock_getOptFlds(ClientSVControlBlock self); * * \param self the ClientSVControlBlock instance to operate on */ -uint8_t +LIB61850_API uint8_t ClientSVControlBlock_getSmpMod(ClientSVControlBlock self); /** @@ -517,7 +509,7 @@ ClientSVControlBlock_getSmpMod(ClientSVControlBlock self); * * \param self the ClientSVControlBlock instance to operate on */ -int +LIB61850_API int ClientSVControlBlock_getNoASDU(ClientSVControlBlock self); @@ -568,73 +560,73 @@ ClientSVControlBlock_getNoASDU(ClientSVControlBlock self); * ClientGooseControlBlock class **************************************************/ -ClientGooseControlBlock +LIB61850_API ClientGooseControlBlock ClientGooseControlBlock_create(const char* dataAttributeReference); -void +LIB61850_API void ClientGooseControlBlock_destroy(ClientGooseControlBlock self); -bool +LIB61850_API bool ClientGooseControlBlock_getGoEna(ClientGooseControlBlock self); -void +LIB61850_API void ClientGooseControlBlock_setGoEna(ClientGooseControlBlock self, bool goEna); -const char* +LIB61850_API const char* ClientGooseControlBlock_getGoID(ClientGooseControlBlock self); -void +LIB61850_API void ClientGooseControlBlock_setGoID(ClientGooseControlBlock self, const char* goID); -const char* +LIB61850_API const char* ClientGooseControlBlock_getDatSet(ClientGooseControlBlock self); -void +LIB61850_API void ClientGooseControlBlock_setDatSet(ClientGooseControlBlock self, const char* datSet); -uint32_t +LIB61850_API uint32_t ClientGooseControlBlock_getConfRev(ClientGooseControlBlock self); -bool +LIB61850_API bool ClientGooseControlBlock_getNdsComm(ClientGooseControlBlock self); -uint32_t +LIB61850_API uint32_t ClientGooseControlBlock_getMinTime(ClientGooseControlBlock self); -uint32_t +LIB61850_API uint32_t ClientGooseControlBlock_getMaxTime(ClientGooseControlBlock self); -bool +LIB61850_API bool ClientGooseControlBlock_getFixedOffs(ClientGooseControlBlock self); -PhyComAddress +LIB61850_API PhyComAddress ClientGooseControlBlock_getDstAddress(ClientGooseControlBlock self); -void +LIB61850_API void ClientGooseControlBlock_setDstAddress(ClientGooseControlBlock self, PhyComAddress value); -DEPRECATED MmsValue* /* MMS_OCTET_STRING */ +LIB61850_API DEPRECATED MmsValue* /* MMS_OCTET_STRING */ ClientGooseControlBlock_getDstAddress_addr(ClientGooseControlBlock self); -DEPRECATED void +LIB61850_API DEPRECATED void ClientGooseControlBlock_setDstAddress_addr(ClientGooseControlBlock self, MmsValue* macAddr); -DEPRECATED uint8_t +LIB61850_API DEPRECATED uint8_t ClientGooseControlBlock_getDstAddress_priority(ClientGooseControlBlock self); -DEPRECATED void +LIB61850_API DEPRECATED void ClientGooseControlBlock_setDstAddress_priority(ClientGooseControlBlock self, uint8_t priorityValue); -DEPRECATED uint16_t +LIB61850_API DEPRECATED uint16_t ClientGooseControlBlock_getDstAddress_vid(ClientGooseControlBlock self); -DEPRECATED void +LIB61850_API DEPRECATED void ClientGooseControlBlock_setDstAddress_vid(ClientGooseControlBlock self, uint16_t vidValue); -DEPRECATED uint16_t +LIB61850_API DEPRECATED uint16_t ClientGooseControlBlock_getDstAddress_appid(ClientGooseControlBlock self); -DEPRECATED void +LIB61850_API DEPRECATED void ClientGooseControlBlock_setDstAddress_appid(ClientGooseControlBlock self, uint16_t appidValue); @@ -669,7 +661,7 @@ ClientGooseControlBlock_setDstAddress_appid(ClientGooseControlBlock self, uint16 * \return new ClientGooseControlBlock instance or the instance provided by the user with * the updateRcb parameter. */ -ClientGooseControlBlock +LIB61850_API ClientGooseControlBlock IedConnection_getGoCBValues(IedConnection self, IedClientError* error, const char* goCBReference, ClientGooseControlBlock updateGoCB); /** @@ -693,12 +685,234 @@ IedConnection_getGoCBValues(IedConnection self, IedClientError* error, const cha * \param singleRequest specifies if the seGoCBValues services is mapped to a single MMS write request containing * multiple variables or to multiple MMS write requests. */ -void +LIB61850_API void IedConnection_setGoCBValues(IedConnection self, IedClientError* error, ClientGooseControlBlock goCB, uint32_t parametersMask, bool singleRequest); /** @} */ + +/**************************************** + * Data model access services + ****************************************/ + +/** + * @defgroup IEC61850_CLIENT_DATA_ACCESS Client side data access (read/write) service functions + * + * @{ + */ + +/** + * \brief read a functional constrained data attribute (FCDA) or functional constrained data (FCD). + * + * \param self the connection object to operate on + * \param error the error code if an error occurs + * \param object reference of the object/attribute to read + * \param fc the functional constraint of the data attribute or data object to read + * + * \return the MmsValue instance of the received value or NULL if the request failed + */ +LIB61850_API MmsValue* +IedConnection_readObject(IedConnection self, IedClientError* error, const char* dataAttributeReference, FunctionalConstraint fc); + +typedef void +(*IedConnection_ReadObjectHandler) (int invokeId, void* parameter, IedClientError err, MmsValue* value); + +LIB61850_API uint32_t +IedConnection_readObjectAsync(IedConnection self, IedClientError* error, const char* objRef, FunctionalConstraint fc, + IedConnection_ReadObjectHandler handler, void* parameter); + +/** + * \brief write a functional constrained data attribute (FCDA) or functional constrained data (FCD). + * + * \param self the connection object to operate on + * \param error the error code if an error occurs + * \param object reference of the object/attribute to write + * \param fc the functional constraint of the data attribute or data object to write + * \param value the MmsValue to write (has to be of the correct type - MMS_STRUCTURE for FCD) + */ +LIB61850_API void +IedConnection_writeObject(IedConnection self, IedClientError* error, const char* dataAttributeReference, FunctionalConstraint fc, + MmsValue* value); + +typedef void +(*IedConnection_WriteObjectHandler) (int invokeId, void* parameter, IedClientError err); + +LIB61850_API uint32_t +IedConnection_writeObjectAsync(IedConnection self, IedClientError* error, const char* objectReference, + FunctionalConstraint fc, MmsValue* value, IedConnection_WriteObjectHandler handler, void* parameter); + + +/** + * \brief read a functional constrained data attribute (FCDA) of type boolean + * + * \param self the connection object to operate on + * \param error the error code if an error occurs + * \param object reference of the data attribute to read + * \param fc the functional constraint of the data attribute to read + */ +LIB61850_API bool +IedConnection_readBooleanValue(IedConnection self, IedClientError* error, const char* objectReference, FunctionalConstraint fc); + +/** + * \brief read a functional constrained data attribute (FCDA) of type float + * + * \param self the connection object to operate on + * \param error the error code if an error occurs + * \param object reference of the data attribute to read + * \param fc the functional constraint of the data attribute to read + */ +LIB61850_API float +IedConnection_readFloatValue(IedConnection self, IedClientError* error, const char* objectReference, FunctionalConstraint fc); + +/** + * \brief read a functional constrained data attribute (FCDA) of type VisibleString or MmsString + * + * NOTE: the returned char buffer is dynamically allocated and has to be freed by the caller! + * + * \param self the connection object to operate on + * \param error the error code if an error occurs + * \param object reference of the data attribute to read + * \param fc the functional constraint of the data attribute to read + * + * \return a C string representation of the value. Has to be freed by the caller! + */ +LIB61850_API char* +IedConnection_readStringValue(IedConnection self, IedClientError* error, const char* objectReference, FunctionalConstraint fc); + +/** + * \brief read a functional constrained data attribute (FCDA) of type Integer or Unsigned and return the result as int32_t + * + * \param self the connection object to operate on + * \param error the error code if an error occurs + * \param object reference of the data attribute to read + * \param fc the functional constraint of the data attribute to read + * + * \return an int32_t value of the read data attributes + */ +LIB61850_API int32_t +IedConnection_readInt32Value(IedConnection self, IedClientError* error, const char* objectReference, FunctionalConstraint fc); + +/** + * \brief read a functional constrained data attribute (FCDA) of type Integer or Unsigned and return the result as int64_t + * + * \param self the connection object to operate on + * \param error the error code if an error occurs + * \param object reference of the data attribute to read + * \param fc the functional constraint of the data attribute to read + * + * \return an int64_t value of the read data attributes + */ +LIB61850_API int64_t +IedConnection_readInt64Value(IedConnection self, IedClientError* error, const char* objectReference, FunctionalConstraint fc); + +/** + * \brief read a functional constrained data attribute (FCDA) of type Integer or Unsigned and return the result as uint32_t + * + * \param self the connection object to operate on + * \param error the error code if an error occurs + * \param object reference of the data attribute to read + * \param fc the functional constraint of the data attribute to read + * + * \return an uint32_t value of the read data attributes + */ +LIB61850_API uint32_t +IedConnection_readUnsigned32Value(IedConnection self, IedClientError* error, const char* objectReference, FunctionalConstraint fc); + +/** + * \brief read a functional constrained data attribute (FCDA) of type Timestamp (UTC Time) + * + * NOTE: If the timestamp parameter is set to NULL the function allocates a new timestamp instance. Otherwise the + * return value is a pointer to the user provided timestamp instance. The new timestamp instance has to be freed by + * the caller of the function. + * + * \param self the connection object to operate on + * \param error the error code if an error occurs + * \param object reference of the data attribute to read + * \param fc the functional constraint of the data attribute to read + * \param timestamp a pointer to a user provided timestamp instance or NULL + * + * \return the timestamp value + */ +LIB61850_API Timestamp* +IedConnection_readTimestampValue(IedConnection self, IedClientError* error, const char* objectReference, FunctionalConstraint fc, + Timestamp* timeStamp); + +/** + * \brief read a functional constrained data attribute (FCDA) of type Quality + * + * \param self the connection object to operate on + * \param error the error code if an error occurs + * \param object reference of the data attribute to read + * \param fc the functional constraint of the data attribute to read + * + * \return the timestamp value + */ +LIB61850_API Quality +IedConnection_readQualityValue(IedConnection self, IedClientError* error, const char* objectReference, FunctionalConstraint fc); + +/** + * \brief write a functional constrained data attribute (FCDA) of type boolean + * + * \param self the connection object to operate on + * \param error the error code if an error occurs + * \param object reference of the data attribute to read + * \param fc the functional constraint of the data attribute or data object to write + * \param value the boolean value to write + */ +LIB61850_API void +IedConnection_writeBooleanValue(IedConnection self, IedClientError* error, const char* objectReference, + FunctionalConstraint fc, bool value); + +/** + * \brief write a functional constrained data attribute (FCDA) of type integer + * + * \param self the connection object to operate on + * \param error the error code if an error occurs + * \param object reference of the data attribute to read + * \param fc the functional constraint of the data attribute or data object to write + * \param value the int32_t value to write + */ +LIB61850_API void +IedConnection_writeInt32Value(IedConnection self, IedClientError* error, const char* objectReference, + FunctionalConstraint fc, int32_t value); + +/** + * \brief write a functional constrained data attribute (FCDA) of type unsigned (integer) + * + * \param self the connection object to operate on + * \param error the error code if an error occurs + * \param object reference of the data attribute to read + * \param fc the functional constraint of the data attribute or data object to write + * \param value the uint32_t value to write + */ +LIB61850_API void +IedConnection_writeUnsigned32Value(IedConnection self, IedClientError* error, const char* objectReference, + FunctionalConstraint fc, uint32_t value); + +/** + * \brief write a functional constrained data attribute (FCDA) of type float + * + * \param self the connection object to operate on + * \param error the error code if an error occurs + * \param object reference of the data attribute to read + * \param fc the functional constraint of the data attribute or data object to write + * \param value the float value to write + */ +LIB61850_API void +IedConnection_writeFloatValue(IedConnection self, IedClientError* error, const char* objectReference, + FunctionalConstraint fc, float value); + +LIB61850_API void +IedConnection_writeVisibleStringValue(IedConnection self, IedClientError* error, const char* objectReference, + FunctionalConstraint fc, char* value); + +LIB61850_API void +IedConnection_writeOctetString(IedConnection self, IedClientError* error, const char* objectReference, + FunctionalConstraint fc, uint8_t* value, int valueLength); + +/** @} */ + /******************************************** * Reporting services ********************************************/ @@ -742,14 +956,14 @@ IedConnection_setGoCBValues(IedConnection self, IedClientError* error, ClientGoo * \return new ClientReportControlBlock instance or the instance provided by the user with * the updateRcb parameter. */ -ClientReportControlBlock +LIB61850_API ClientReportControlBlock IedConnection_getRCBValues(IedConnection self, IedClientError* error, const char* rcbReference, ClientReportControlBlock updateRcb); typedef void (*IedConnection_GetRCBValuesHandler) (int invokeId, void* parameter, IedClientError err, ClientReportControlBlock rcb); -uint32_t +LIB61850_API uint32_t IedConnection_getRCBValuesAsync(IedConnection self, IedClientError* error, const char* rcbReference, IedConnection_GetRCBValuesHandler handler, void* parameter); @@ -857,12 +1071,12 @@ typedef enum { * \param singleRequest specifies if the setRCBValues services is mapped to a single MMS write request containing * multiple variables or to multiple MMS write requests. */ -void +LIB61850_API void IedConnection_setRCBValues(IedConnection self, IedClientError* error, ClientReportControlBlock rcb, uint32_t parametersMask, bool singleRequest); -uint32_t -IedConnection_setRCBValues(IedConnection self, IedClientError* error, ClientReportControlBlock rcb, +LIB61850_API uint32_t +IedConnection_setRCBValuesAsync(IedConnection self, IedClientError* error, ClientReportControlBlock rcb, uint32_t parametersMask, bool singleRequest, IedConnection_WriteObjectHandler handler, void* parameter); /** @@ -892,7 +1106,7 @@ typedef void (*ReportCallbackFunction) (void* parameter, ClientReport report); * \param handler user provided callback function to be invoked when a report is received. * \param handlerParameter user provided parameter that will be passed to the callback function */ -void +LIB61850_API void IedConnection_installReportHandler(IedConnection self, const char* rcbReference, const char* rptId, ReportCallbackFunction handler, void* handlerParameter); @@ -902,7 +1116,7 @@ IedConnection_installReportHandler(IedConnection self, const char* rcbReference, * \param self the connection object * \param rcbReference object reference of the report control block */ -void +LIB61850_API void IedConnection_uninstallReportHandler(IedConnection self, const char* rcbReference); /** @@ -916,7 +1130,7 @@ IedConnection_uninstallReportHandler(IedConnection self, const char* rcbReferenc * \param error the error code if an error occurs * \param rcbReference object reference of the report control block */ -void +LIB61850_API void IedConnection_triggerGIReport(IedConnection self, IedClientError* error, const char* rcbReference); /**************************************** @@ -931,7 +1145,7 @@ IedConnection_triggerGIReport(IedConnection self, IedClientError* error, const c * \param self the ClientReport instance * \return report data set name as 0 terminated string */ -const char* +LIB61850_API const char* ClientReport_getDataSetName(ClientReport self); /** @@ -944,7 +1158,7 @@ ClientReport_getDataSetName(ClientReport self); * \param self the ClientReport instance * \return an MmsValue array instance containing the data set values */ -MmsValue* +LIB61850_API MmsValue* ClientReport_getDataSetValues(ClientReport self); /** @@ -953,7 +1167,7 @@ ClientReport_getDataSetValues(ClientReport self); * \param self the ClientReport instance * \return report control block reference as string */ -char* +LIB61850_API char* ClientReport_getRcbReference(ClientReport self); /** @@ -962,7 +1176,7 @@ ClientReport_getRcbReference(ClientReport self); * \param self the ClientReport instance * \return report control block reference as string */ -char* +LIB61850_API char* ClientReport_getRptId(ClientReport self); /** @@ -973,7 +1187,7 @@ ClientReport_getRptId(ClientReport self); * * \return reason code for the inclusion of the specified element */ -ReasonForInclusion +LIB61850_API ReasonForInclusion ClientReport_getReasonForInclusion(ClientReport self, int elementIndex); /** @@ -985,7 +1199,7 @@ ClientReport_getReasonForInclusion(ClientReport self, int elementIndex); * * \return entryId or NULL */ -MmsValue* +LIB61850_API MmsValue* ClientReport_getEntryId(ClientReport self); /** @@ -995,7 +1209,7 @@ ClientReport_getEntryId(ClientReport self); * * \return true if the report contains a timestamp, false otherwise */ -bool +LIB61850_API bool ClientReport_hasTimestamp(ClientReport self); /** @@ -1005,7 +1219,7 @@ ClientReport_hasTimestamp(ClientReport self); * * \return true if the report contains a sequence number, false otherwise */ -bool +LIB61850_API bool ClientReport_hasSeqNum(ClientReport self); /** @@ -1017,7 +1231,7 @@ ClientReport_hasSeqNum(ClientReport self); * * \returns the number of the sequence number when present */ -uint16_t +LIB61850_API uint16_t ClientReport_getSeqNum(ClientReport self); /** @@ -1027,7 +1241,7 @@ ClientReport_getSeqNum(ClientReport self); * * \return true if the report contains the data set name, false otherwise */ -bool +LIB61850_API bool ClientReport_hasDataSetName(ClientReport self); /** @@ -1037,7 +1251,7 @@ ClientReport_hasDataSetName(ClientReport self); * * \return true if the report contains reason-for-inclusion information, false otherwise */ -bool +LIB61850_API bool ClientReport_hasReasonForInclusion(ClientReport self); /** @@ -1047,7 +1261,7 @@ ClientReport_hasReasonForInclusion(ClientReport self); * * \return true if the report contains the configuration revision, false otherwise */ -bool +LIB61850_API bool ClientReport_hasConfRev(ClientReport self); /** @@ -1059,7 +1273,7 @@ ClientReport_hasConfRev(ClientReport self); * * \returns the number of the configuration revision */ -uint32_t +LIB61850_API uint32_t ClientReport_getConfRev(ClientReport self); /** @@ -1069,7 +1283,7 @@ ClientReport_getConfRev(ClientReport self); * * \returns true if the report contains the bufOvfl flag, false otherwise */ -bool +LIB61850_API bool ClientReport_hasBufOvfl(ClientReport self); /** @@ -1079,7 +1293,7 @@ ClientReport_hasBufOvfl(ClientReport self); * * \returns true if bufOvfl is set, false otherwise */ -bool +LIB61850_API bool ClientReport_getBufOvfl(ClientReport self); /** @@ -1089,7 +1303,7 @@ ClientReport_getBufOvfl(ClientReport self); * * \returns true if the report contains data-references, false otherwise */ -bool +LIB61850_API bool ClientReport_hasDataReference(ClientReport self); /** @@ -1105,7 +1319,7 @@ ClientReport_hasDataReference(ClientReport self); * * \param the data reference as string as provided by the report or NULL if the data reference is not available */ -const char* +LIB61850_API const char* ClientReport_getDataReference(ClientReport self, int elementIndex); @@ -1119,7 +1333,7 @@ ClientReport_getDataReference(ClientReport self, int elementIndex); * * \return the timestamp as milliseconds since 1.1.1970 UTC */ -uint64_t +LIB61850_API uint64_t ClientReport_getTimestamp(ClientReport self); /** @@ -1129,44 +1343,44 @@ ClientReport_getTimestamp(ClientReport self); * * \return the reason for inclusion as static human readable string */ -char* +LIB61850_API char* ReasonForInclusion_getValueAsString(ReasonForInclusion reasonCode); /************************************************** * ClientReportControlBlock access class **************************************************/ -ClientReportControlBlock +LIB61850_API ClientReportControlBlock ClientReportControlBlock_create(const char* rcbReference); -void +LIB61850_API void ClientReportControlBlock_destroy(ClientReportControlBlock self); -char* +LIB61850_API char* ClientReportControlBlock_getObjectReference(ClientReportControlBlock self); -bool +LIB61850_API bool ClientReportControlBlock_isBuffered(ClientReportControlBlock self); -const char* +LIB61850_API const char* ClientReportControlBlock_getRptId(ClientReportControlBlock self); -void +LIB61850_API void ClientReportControlBlock_setRptId(ClientReportControlBlock self, const char* rptId); -bool +LIB61850_API bool ClientReportControlBlock_getRptEna(ClientReportControlBlock self); -void +LIB61850_API void ClientReportControlBlock_setRptEna(ClientReportControlBlock self, bool rptEna); -bool +LIB61850_API bool ClientReportControlBlock_getResv(ClientReportControlBlock self); -void +LIB61850_API void ClientReportControlBlock_setResv(ClientReportControlBlock self, bool resv); -const char* +LIB61850_API const char* ClientReportControlBlock_getDataSetReference(ClientReportControlBlock self); /** @@ -1185,291 +1399,70 @@ ClientReportControlBlock_getDataSetReference(ClientReportControlBlock self); * \param self the RCB instance * \param dataSetReference the reference of the data set */ -void +LIB61850_API void ClientReportControlBlock_setDataSetReference(ClientReportControlBlock self, const char* dataSetReference); -uint32_t +LIB61850_API uint32_t ClientReportControlBlock_getConfRev(ClientReportControlBlock self); -int +LIB61850_API int ClientReportControlBlock_getOptFlds(ClientReportControlBlock self); -void +LIB61850_API void ClientReportControlBlock_setOptFlds(ClientReportControlBlock self, int optFlds); -uint32_t +LIB61850_API uint32_t ClientReportControlBlock_getBufTm(ClientReportControlBlock self); -void +LIB61850_API void ClientReportControlBlock_setBufTm(ClientReportControlBlock self, uint32_t bufTm); -uint16_t +LIB61850_API uint16_t ClientReportControlBlock_getSqNum(ClientReportControlBlock self); -int +LIB61850_API int ClientReportControlBlock_getTrgOps(ClientReportControlBlock self); -void +LIB61850_API void ClientReportControlBlock_setTrgOps(ClientReportControlBlock self, int trgOps); -uint32_t +LIB61850_API uint32_t ClientReportControlBlock_getIntgPd(ClientReportControlBlock self); -void +LIB61850_API void ClientReportControlBlock_setIntgPd(ClientReportControlBlock self, uint32_t intgPd); -bool +LIB61850_API bool ClientReportControlBlock_getGI(ClientReportControlBlock self); -void +LIB61850_API void ClientReportControlBlock_setGI(ClientReportControlBlock self, bool gi); -bool +LIB61850_API bool ClientReportControlBlock_getPurgeBuf(ClientReportControlBlock self); -void +LIB61850_API void ClientReportControlBlock_setPurgeBuf(ClientReportControlBlock self, bool purgeBuf); -int16_t +LIB61850_API int16_t ClientReportControlBlock_getResvTms(ClientReportControlBlock self); -void +LIB61850_API void ClientReportControlBlock_setResvTms(ClientReportControlBlock self, int16_t resvTms); -MmsValue* /* */ +LIB61850_API MmsValue* /* */ ClientReportControlBlock_getEntryId(ClientReportControlBlock self); -void +LIB61850_API void ClientReportControlBlock_setEntryId(ClientReportControlBlock self, MmsValue* entryId); -uint64_t +LIB61850_API uint64_t ClientReportControlBlock_getEntryTime(ClientReportControlBlock self); -MmsValue* /* */ +LIB61850_API MmsValue* /* */ ClientReportControlBlock_getOwner(ClientReportControlBlock self); -/** @} */ - -/**************************************** - * Data model access services - ****************************************/ - -/** - * @defgroup IEC61850_CLIENT_DATA_ACCESS Client side data access (read/write) service functions - * - * @{ - */ - -/** - * \brief read a functional constrained data attribute (FCDA) or functional constrained data (FCD). - * - * \param self the connection object to operate on - * \param error the error code if an error occurs - * \param object reference of the object/attribute to read - * \param fc the functional constraint of the data attribute or data object to read - * - * \return the MmsValue instance of the received value or NULL if the request failed - */ -MmsValue* -IedConnection_readObject(IedConnection self, IedClientError* error, const char* dataAttributeReference, FunctionalConstraint fc); - -typedef void -(*IedConnection_ReadObjectHandler) (int invokeId, void* parameter, IedClientError err, MmsValue* value); - -uint32_t -IedConnection_readObjectAsync(IedConnection self, IedClientError* error, const char* objRef, FunctionalConstraint fc, - IedConnection_ReadObjectHandler handler, void* parameter); - -/** - * \brief write a functional constrained data attribute (FCDA) or functional constrained data (FCD). - * - * \param self the connection object to operate on - * \param error the error code if an error occurs - * \param object reference of the object/attribute to write - * \param fc the functional constraint of the data attribute or data object to write - * \param value the MmsValue to write (has to be of the correct type - MMS_STRUCTURE for FCD) - */ -void -IedConnection_writeObject(IedConnection self, IedClientError* error, const char* dataAttributeReference, FunctionalConstraint fc, - MmsValue* value); - -typedef void -(*IedConnection_WriteObjectHandler) (int invokeId, void* parameter, IedClientError err); - -uint32_t -IedConnection_writeObjectAsync(IedConnection self, IedClientError* error, const char* objectReference, - FunctionalConstraint fc, MmsValue* value, IedConnection_WriteObjectHandler handler, void* parameter); - - -/** - * \brief read a functional constrained data attribute (FCDA) of type boolean - * - * \param self the connection object to operate on - * \param error the error code if an error occurs - * \param object reference of the data attribute to read - * \param fc the functional constraint of the data attribute to read - */ -bool -IedConnection_readBooleanValue(IedConnection self, IedClientError* error, const char* objectReference, FunctionalConstraint fc); - -/** - * \brief read a functional constrained data attribute (FCDA) of type float - * - * \param self the connection object to operate on - * \param error the error code if an error occurs - * \param object reference of the data attribute to read - * \param fc the functional constraint of the data attribute to read - */ -float -IedConnection_readFloatValue(IedConnection self, IedClientError* error, const char* objectReference, FunctionalConstraint fc); - -/** - * \brief read a functional constrained data attribute (FCDA) of type VisibleString or MmsString - * - * NOTE: the returned char buffer is dynamically allocated and has to be freed by the caller! - * - * \param self the connection object to operate on - * \param error the error code if an error occurs - * \param object reference of the data attribute to read - * \param fc the functional constraint of the data attribute to read - * - * \return a C string representation of the value. Has to be freed by the caller! - */ -char* -IedConnection_readStringValue(IedConnection self, IedClientError* error, const char* objectReference, FunctionalConstraint fc); - -/** - * \brief read a functional constrained data attribute (FCDA) of type Integer or Unsigned and return the result as int32_t - * - * \param self the connection object to operate on - * \param error the error code if an error occurs - * \param object reference of the data attribute to read - * \param fc the functional constraint of the data attribute to read - * - * \return an int32_t value of the read data attributes - */ -int32_t -IedConnection_readInt32Value(IedConnection self, IedClientError* error, const char* objectReference, FunctionalConstraint fc); - -/** - * \brief read a functional constrained data attribute (FCDA) of type Integer or Unsigned and return the result as int64_t - * - * \param self the connection object to operate on - * \param error the error code if an error occurs - * \param object reference of the data attribute to read - * \param fc the functional constraint of the data attribute to read - * - * \return an int64_t value of the read data attributes - */ -int64_t -IedConnection_readInt64Value(IedConnection self, IedClientError* error, const char* objectReference, FunctionalConstraint fc); - -/** - * \brief read a functional constrained data attribute (FCDA) of type Integer or Unsigned and return the result as uint32_t - * - * \param self the connection object to operate on - * \param error the error code if an error occurs - * \param object reference of the data attribute to read - * \param fc the functional constraint of the data attribute to read - * - * \return an uint32_t value of the read data attributes - */ -uint32_t -IedConnection_readUnsigned32Value(IedConnection self, IedClientError* error, const char* objectReference, FunctionalConstraint fc); - -/** - * \brief read a functional constrained data attribute (FCDA) of type Timestamp (UTC Time) - * - * NOTE: If the timestamp parameter is set to NULL the function allocates a new timestamp instance. Otherwise the - * return value is a pointer to the user provided timestamp instance. The new timestamp instance has to be freed by - * the caller of the function. - * - * \param self the connection object to operate on - * \param error the error code if an error occurs - * \param object reference of the data attribute to read - * \param fc the functional constraint of the data attribute to read - * \param timestamp a pointer to a user provided timestamp instance or NULL - * - * \return the timestamp value - */ -Timestamp* -IedConnection_readTimestampValue(IedConnection self, IedClientError* error, const char* objectReference, FunctionalConstraint fc, - Timestamp* timeStamp); - -/** - * \brief read a functional constrained data attribute (FCDA) of type Quality - * - * \param self the connection object to operate on - * \param error the error code if an error occurs - * \param object reference of the data attribute to read - * \param fc the functional constraint of the data attribute to read - * - * \return the timestamp value - */ -Quality -IedConnection_readQualityValue(IedConnection self, IedClientError* error, const char* objectReference, FunctionalConstraint fc); - -/** - * \brief write a functional constrained data attribute (FCDA) of type boolean - * - * \param self the connection object to operate on - * \param error the error code if an error occurs - * \param object reference of the data attribute to read - * \param fc the functional constraint of the data attribute or data object to write - * \param value the boolean value to write - */ -void -IedConnection_writeBooleanValue(IedConnection self, IedClientError* error, const char* objectReference, - FunctionalConstraint fc, bool value); - -/** - * \brief write a functional constrained data attribute (FCDA) of type integer - * - * \param self the connection object to operate on - * \param error the error code if an error occurs - * \param object reference of the data attribute to read - * \param fc the functional constraint of the data attribute or data object to write - * \param value the int32_t value to write - */ -void -IedConnection_writeInt32Value(IedConnection self, IedClientError* error, const char* objectReference, - FunctionalConstraint fc, int32_t value); - -/** - * \brief write a functional constrained data attribute (FCDA) of type unsigned (integer) - * - * \param self the connection object to operate on - * \param error the error code if an error occurs - * \param object reference of the data attribute to read - * \param fc the functional constraint of the data attribute or data object to write - * \param value the uint32_t value to write - */ -void -IedConnection_writeUnsigned32Value(IedConnection self, IedClientError* error, const char* objectReference, - FunctionalConstraint fc, uint32_t value); - -/** - * \brief write a functional constrained data attribute (FCDA) of type float - * - * \param self the connection object to operate on - * \param error the error code if an error occurs - * \param object reference of the data attribute to read - * \param fc the functional constraint of the data attribute or data object to write - * \param value the float value to write - */ -void -IedConnection_writeFloatValue(IedConnection self, IedClientError* error, const char* objectReference, - FunctionalConstraint fc, float value); - -void -IedConnection_writeVisibleStringValue(IedConnection self, IedClientError* error, const char* objectReference, - FunctionalConstraint fc, char* value); - -void -IedConnection_writeOctetString(IedConnection self, IedClientError* error, const char* objectReference, - FunctionalConstraint fc, uint8_t* value, int valueLength); - /** @} */ /**************************************** @@ -1499,7 +1492,7 @@ IedConnection_writeOctetString(IedConnection self, IedClientError* error, const * * \return data set instance with retrieved values of NULL if an error occurred. */ -ClientDataSet +LIB61850_API ClientDataSet IedConnection_readDataSetValues(IedConnection self, IedClientError* error, const char* dataSetReference, ClientDataSet dataSet); /** @@ -1519,7 +1512,7 @@ IedConnection_readDataSetValues(IedConnection self, IedClientError* error, const * \param dataSetElements a list of object references defining the members of the new data set * */ -void +LIB61850_API void IedConnection_createDataSet(IedConnection self, IedClientError* error, const char* dataSetReference, LinkedList /* char* */ dataSetElements); /** @@ -1535,7 +1528,7 @@ IedConnection_createDataSet(IedConnection self, IedClientError* error, const cha * * \return true if data set has been deleted, false otherwise */ -bool +LIB61850_API bool IedConnection_deleteDataSet(IedConnection self, IedClientError* error, const char* dataSetReference); @@ -1553,7 +1546,7 @@ IedConnection_deleteDataSet(IedConnection self, IedClientError* error, const cha * * \return LinkedList containing the data set elements as char* strings. */ -LinkedList /* */ +LIB61850_API LinkedList /* */ IedConnection_getDataSetDirectory(IedConnection self, IedClientError* error, const char* dataSetReference, bool* isDeletable); /** @@ -1571,7 +1564,7 @@ IedConnection_getDataSetDirectory(IedConnection self, IedClientError* error, con * \param values the new data set values * \param accessResults the access results for each data set member */ -void +LIB61850_API void IedConnection_writeDataSetValues(IedConnection self, IedClientError* error, const char* dataSetReference, LinkedList/**/ values, /* OUTPUT */LinkedList* /* */accessResults); @@ -1588,7 +1581,7 @@ IedConnection_writeDataSetValues(IedConnection self, IedClientError* error, cons * * \param self the ClientDataSet instance */ -void +LIB61850_API void ClientDataSet_destroy(ClientDataSet self); /** @@ -1605,7 +1598,7 @@ ClientDataSet_destroy(ClientDataSet self); * * \return the locally stored data set values as MmsValue object of type MMS_ARRAY. */ -MmsValue* +LIB61850_API MmsValue* ClientDataSet_getValues(ClientDataSet self); /** @@ -1615,7 +1608,7 @@ ClientDataSet_getValues(ClientDataSet self); * * \return the object reference of the data set. */ -char* +LIB61850_API char* ClientDataSet_getReference(ClientDataSet self); /** @@ -1625,7 +1618,7 @@ ClientDataSet_getReference(ClientDataSet self); * * \return the number of member contained in the data set. */ -int +LIB61850_API int ClientDataSet_getDataSetSize(ClientDataSet self); /** @} */ @@ -1662,16 +1655,16 @@ typedef enum { * * \return the newly created instance or NULL if the creation failed */ -ControlObjectClient +LIB61850_API ControlObjectClient ControlObjectClient_create(const char* objectReference, IedConnection connection); -void +LIB61850_API void ControlObjectClient_destroy(ControlObjectClient self); -char* +LIB61850_API char* ControlObjectClient_getObjectReference(ControlObjectClient self); -ControlModel +LIB61850_API ControlModel ControlObjectClient_getControlModel(ControlObjectClient self); /** @@ -1684,7 +1677,7 @@ ControlObjectClient_getControlModel(ControlObjectClient self); * * \return MmsType required for the ctlVal value. */ -MmsType +LIB61850_API MmsType ControlObjectClient_getCtlValType(ControlObjectClient self); /** @@ -1696,7 +1689,7 @@ ControlObjectClient_getCtlValType(ControlObjectClient self); * * \return true if operation has been successful, false otherwise. */ -bool +LIB61850_API bool ControlObjectClient_operate(ControlObjectClient self, MmsValue* ctlVal, uint64_t operTime); /** @@ -1709,7 +1702,7 @@ ControlObjectClient_operate(ControlObjectClient self, MmsValue* ctlVal, uint64_t * * \return true if operation has been successful, false otherwise. */ -bool +LIB61850_API bool ControlObjectClient_select(ControlObjectClient self); /** @@ -1723,7 +1716,7 @@ ControlObjectClient_select(ControlObjectClient self); * * \return true if select has been successful, false otherwise. */ -bool +LIB61850_API bool ControlObjectClient_selectWithValue(ControlObjectClient self, MmsValue* ctlVal); /** @@ -1736,13 +1729,13 @@ ControlObjectClient_selectWithValue(ControlObjectClient self, MmsValue* ctlVal); * * \return true if operation has been successful, false otherwise. */ -bool +LIB61850_API bool ControlObjectClient_cancel(ControlObjectClient self); -void +LIB61850_API void ControlObjectClient_setLastApplError(ControlObjectClient self, LastApplError lastAppIError); -LastApplError +LIB61850_API LastApplError ControlObjectClient_getLastApplError(ControlObjectClient self); /** @@ -1754,7 +1747,7 @@ ControlObjectClient_getLastApplError(ControlObjectClient self); * \param self the control object instance to use * \param value value if the test flag (true = test mode). */ -void +LIB61850_API void ControlObjectClient_setTestMode(ControlObjectClient self, bool value); /** @@ -1764,7 +1757,7 @@ ControlObjectClient_setTestMode(ControlObjectClient self, bool value); * command. It is intended for later analysis. * */ -void +LIB61850_API void ControlObjectClient_setOrigin(ControlObjectClient self, const char* orIdent, int orCat); /** @@ -1775,19 +1768,19 @@ ControlObjectClient_setOrigin(ControlObjectClient self, const char* orIdent, int * \param self the ControlObjectClient instance * \param useContantT enable this behaviour with true, disable with false */ -void +LIB61850_API void ControlObjectClient_useConstantT(ControlObjectClient self, bool useConstantT); /** * \deprecated use ControlObjectClient_setInterlockCheck instead */ -void +LIB61850_API void ControlObjectClient_enableInterlockCheck(ControlObjectClient self); /** * \deprecated use ControlObjectClient_setSynchroCheck instead */ -void +LIB61850_API void ControlObjectClient_enableSynchroCheck(ControlObjectClient self); /** @@ -1796,7 +1789,7 @@ ControlObjectClient_enableSynchroCheck(ControlObjectClient self); * \param self the ControlObjectClient instance * \param value if true the server will perform a interlock check if supported */ -void +LIB61850_API void ControlObjectClient_setInterlockCheck(ControlObjectClient self, bool value); /** @@ -1805,7 +1798,7 @@ ControlObjectClient_setInterlockCheck(ControlObjectClient self, bool value); * \param self the ControlObjectClient instance * \param value if true the server will perform a synchro check if supported */ -void +LIB61850_API void ControlObjectClient_setSynchroCheck(ControlObjectClient self, bool value); @@ -1822,7 +1815,7 @@ ControlObjectClient_setSynchroCheck(ControlObjectClient self, bool value); */ typedef void (*CommandTerminationHandler) (void* parameter, ControlObjectClient controlClient); -void +LIB61850_API void ControlObjectClient_setCommandTerminationHandler(ControlObjectClient self, CommandTerminationHandler handler, void* handlerParameter); @@ -1848,7 +1841,7 @@ ControlObjectClient_setCommandTerminationHandler(ControlObjectClient self, Comma * \param error the error code if an error occurs * */ -void +LIB61850_API void IedConnection_getDeviceModelFromServer(IedConnection self, IedClientError* error); /** @@ -1861,7 +1854,7 @@ IedConnection_getDeviceModelFromServer(IedConnection self, IedClientError* error * * \return LinkedList with string elements representing the logical device names */ -LinkedList /**/ +LIB61850_API LinkedList /**/ IedConnection_getLogicalDeviceList(IedConnection self, IedClientError* error); /** @@ -1876,7 +1869,7 @@ IedConnection_getLogicalDeviceList(IedConnection self, IedClientError* error); * * \return LinkedList with string elements representing the logical device names or file names */ -LinkedList /**/ +LIB61850_API LinkedList /**/ IedConnection_getServerDirectory(IedConnection self, IedClientError* error, bool getFileNames); /** @@ -1891,7 +1884,7 @@ IedConnection_getServerDirectory(IedConnection self, IedClientError* error, bool * * \return LinkedList with string elements representing the logical node names */ -LinkedList /**/ +LIB61850_API LinkedList /**/ IedConnection_getLogicalDeviceDirectory(IedConnection self, IedClientError* error, const char* logicalDeviceName); typedef enum { @@ -1921,7 +1914,7 @@ typedef enum { * \return the list of all MMS named variables as C strings in a LinkedList type * */ -LinkedList /**/ +LIB61850_API LinkedList /**/ IedConnection_getLogicalNodeVariables(IedConnection self, IedClientError* error, const char* logicalNodeReference); @@ -1941,7 +1934,7 @@ IedConnection_getLogicalNodeVariables(IedConnection self, IedClientError* error, * \return list of all logical node elements of the specified ACSI class type as C strings in a LinkedList * */ -LinkedList /**/ +LIB61850_API LinkedList /**/ IedConnection_getLogicalNodeDirectory(IedConnection self, IedClientError* error, const char* logicalNodeReference, ACSIClass acsiClass); @@ -1958,7 +1951,7 @@ IedConnection_getLogicalNodeDirectory(IedConnection self, IedClientError* error, * \return list of all data attributes or sub data objects as C strings in a LinkedList * */ -LinkedList /**/ +LIB61850_API LinkedList /**/ IedConnection_getDataDirectory(IedConnection self, IedClientError* error, const char* dataReference); /** @@ -1975,7 +1968,7 @@ IedConnection_getDataDirectory(IedConnection self, IedClientError* error, const * \return list of all data attributes or sub data objects as C strings in a LinkedList * */ -LinkedList /**/ +LIB61850_API LinkedList /**/ IedConnection_getDataDirectoryFC(IedConnection self, IedClientError* error, const char* dataReference); /** @@ -1995,7 +1988,7 @@ IedConnection_getDataDirectoryFC(IedConnection self, IedClientError* error, cons * \return list of all data attributes or sub data objects as C strings in a LinkedList * */ -LinkedList +LIB61850_API LinkedList IedConnection_getDataDirectoryByFC(IedConnection self, IedClientError* error, const char* dataReference, FunctionalConstraint fc); /** @@ -2014,7 +2007,7 @@ IedConnection_getDataDirectoryByFC(IedConnection self, IedClientError* error, co * \return MmsVariableSpecification of the data attribute. * */ -MmsVariableSpecification* +LIB61850_API MmsVariableSpecification* IedConnection_getVariableSpecification(IedConnection self, IedClientError* error, const char* dataAttributeReference, FunctionalConstraint fc); @@ -2025,11 +2018,11 @@ IedConnection_getVariableSpecification(IedConnection self, IedClientError* error typedef void (*IedConnection_GetNameListHandler) (int invokeId, void* parameter, IedClientError err, LinkedList nameList, bool moreFollows); -uint32_t +LIB61850_API uint32_t IedConnection_getServerDirectoryAsync(IedConnection self, IedClientError* error, const char* continueAfter, bool getFileNames, IedConnection_GetNameListHandler handler, void* parameter); -uint32_t +LIB61850_API uint32_t IedConnection_getLogicalDeviceVariables(IedConnection self, IedClientError* error, const char* continueAfter, IedConnection_GetNameListHandler handler, void* parameter); @@ -2037,7 +2030,7 @@ IedConnection_getLogicalDeviceVariables(IedConnection self, IedClientError* erro typedef void (*IedConnection_GetVariableSpecificationHandler) (int invokeId, void* parameter, IedClientError err, MmsVariableSpecification* spec); -uint32_t +LIB61850_API uint32_t IedConnection_getVariableSpecificationAsync(IedConnection self, IedClientError* error, const char* dataAttributeReference, FunctionalConstraint fc, IedConnection_GetVariableSpecificationHandler handler, void* parameter); @@ -2066,7 +2059,7 @@ IedConnection_getVariableSpecificationAsync(IedConnection self, IedClientError* * * \return list of MmsJournalEntry objects matching the specification */ -LinkedList /* */ +LIB61850_API LinkedList /* */ IedConnection_queryLogByTime(IedConnection self, IedClientError* error, const char* logReference, uint64_t startTime, uint64_t endTime, bool* moreFollows); @@ -2087,7 +2080,7 @@ IedConnection_queryLogByTime(IedConnection self, IedClientError* error, const ch * * \return list of MmsJournalEntry objects matching the specification */ -LinkedList /* */ +LIB61850_API LinkedList /* */ IedConnection_queryLogAfter(IedConnection self, IedClientError* error, const char* logReference, MmsValue* entryID, uint64_t timeStamp, bool* moreFollows); @@ -2095,11 +2088,11 @@ IedConnection_queryLogAfter(IedConnection self, IedClientError* error, const cha typedef void (*IedConnection_QueryLogHandler) (int invokeId, void* parameter, IedClientError mmsError, LinkedList /* */ journalEntries, bool moreFollows); -uint32_t +LIB61850_API uint32_t IedConnection_queryLogByTimeAsync(IedConnection self, IedClientError* error, const char* logReference, uint64_t startTime, uint64_t endTime, IedConnection_QueryLogHandler handler, void* parameter); -uint32_t +LIB61850_API uint32_t IedConnection_queryLogAfterAsync(IedConnection self, IedClientError* error, const char* logReference, MmsValue* entryID, uint64_t timeStamp, IedConnection_QueryLogHandler handler, void* parameter); @@ -2116,7 +2109,7 @@ typedef struct sFileDirectoryEntry* FileDirectoryEntry; /** * @deprecated Will be removed from API */ -FileDirectoryEntry +LIB61850_API FileDirectoryEntry FileDirectoryEntry_create(const char* fileName, uint32_t fileSize, uint64_t lastModified); /** @@ -2126,7 +2119,7 @@ FileDirectoryEntry_create(const char* fileName, uint32_t fileSize, uint64_t last * * \param self the FileDirectoryEntry object */ -void +LIB61850_API void FileDirectoryEntry_destroy(FileDirectoryEntry self); /** @@ -2136,7 +2129,7 @@ FileDirectoryEntry_destroy(FileDirectoryEntry self); * * \return name of the file as null terminated string */ -const char* +LIB61850_API const char* FileDirectoryEntry_getFileName(FileDirectoryEntry self); /** @@ -2146,7 +2139,7 @@ FileDirectoryEntry_getFileName(FileDirectoryEntry self); * * \return size of the file in bytes, or 0 if file size is unknown */ -uint32_t +LIB61850_API uint32_t FileDirectoryEntry_getFileSize(FileDirectoryEntry self); /** @@ -2156,7 +2149,7 @@ FileDirectoryEntry_getFileSize(FileDirectoryEntry self); * * \return UTC timestamp in milliseconds */ -uint64_t +LIB61850_API uint64_t FileDirectoryEntry_getLastModified(FileDirectoryEntry self); @@ -2178,7 +2171,7 @@ FileDirectoryEntry_getLastModified(FileDirectoryEntry self); * * \return the list of directory entries. The return type is a LinkedList with FileDirectoryEntry elements */ -LinkedList /**/ +LIB61850_API LinkedList /**/ IedConnection_getFileDirectory(IedConnection self, IedClientError* error, const char* directoryName); @@ -2209,7 +2202,7 @@ IedConnection_getFileDirectory(IedConnection self, IedClientError* error, const * * \return the list of directory entries. The return type is a LinkedList with FileDirectoryEntry elements */ -LinkedList /**/ +LIB61850_API LinkedList /**/ IedConnection_getFileDirectoryEx(IedConnection self, IedClientError* error, const char* directoryName, const char* continueAfter, bool* moreFollows); @@ -2224,7 +2217,7 @@ typedef void (*IedConnection_FileDirectoryHandler) (int invokeId, void* parameter, IedClientError err, char* filename, uint32_t size, uint64_t lastModfified, bool moreFollows); -uint32_t +LIB61850_API uint32_t IedConnection_getFileDirectoryAsync(IedConnection self, IedClientError* error, const char* directoryName, const char* continueAfter, IedConnection_FileDirectoryHandler handler, void* parameter); @@ -2256,7 +2249,7 @@ typedef bool * * \return number of bytes received */ -uint32_t +LIB61850_API uint32_t IedConnection_getFile(IedConnection self, IedClientError* error, const char* fileName, IedClientGetFileHandler handler, void* handlerParameter); @@ -2270,7 +2263,7 @@ IedConnection_getFile(IedConnection self, IedClientError* error, const char* fil * \param self the connection object * \param basepath the new virtual filestore basepath */ -void +LIB61850_API void IedConnection_setFilestoreBasepath(IedConnection, const char* basepath); /** @@ -2283,7 +2276,7 @@ IedConnection_setFilestoreBasepath(IedConnection, const char* basepath); * \param sourceFilename the filename of the local (client side) file * \param destinationFilename the filename of the remote (service side) file */ -void +LIB61850_API void IedConnection_setFile(IedConnection self, IedClientError* error, const char* sourceFilename, const char* destinationFilename); @@ -2296,7 +2289,7 @@ IedConnection_setFile(IedConnection self, IedClientError* error, const char* sou * \param error the error code if an error occurs * \param fileName the name of the file to delete */ -void +LIB61850_API void IedConnection_deleteFile(IedConnection self, IedClientError* error, const char* fileName); diff --git a/src/iec61850/inc/iec61850_common.h b/src/iec61850/inc/iec61850_common.h index a41a7db4..b03c9cba 100644 --- a/src/iec61850/inc/iec61850_common.h +++ b/src/iec61850/inc/iec61850_common.h @@ -254,13 +254,13 @@ typedef enum eFunctionalConstraint { /**extern "C" { * \brief convert a function constraint to a static string */ -char* +LIB61850_API char* FunctionalConstraint_toString(FunctionalConstraint fc); /** * \brief parse a string treated as a functional constraint representation */ -FunctionalConstraint +LIB61850_API FunctionalConstraint FunctionalConstraint_fromString(const char* fcString); /** @} */ @@ -297,22 +297,22 @@ typedef uint16_t Validity; #define QUALITY_DERIVED 8192 -Validity +LIB61850_API Validity Quality_getValidity(Quality* self); -void +LIB61850_API void Quality_setValidity(Quality* self, Validity validity); -void +LIB61850_API void Quality_setFlag(Quality* self, int flag); -void +LIB61850_API void Quality_unsetFlag(Quality* self, int flag); -bool +LIB61850_API bool Quality_isFlagSet(Quality* self, int flag); -Quality +LIB61850_API Quality Quality_fromMmsValue(const MmsValue* mmsValue); /** @} */ @@ -338,7 +338,7 @@ typedef enum { * * \return the corresponding Dbpos value */ -Dbpos +LIB61850_API Dbpos Dbpos_fromMmsValue(const MmsValue* mmsValue); /** @@ -349,7 +349,7 @@ Dbpos_fromMmsValue(const MmsValue* mmsValue); * * \return the corresponding MmsValue instance */ -MmsValue* +LIB61850_API MmsValue* Dbpos_toMmsValue(MmsValue* mmsValue, Dbpos dbpos); /** @} */ @@ -364,43 +364,43 @@ typedef union { uint8_t val[8]; } Timestamp; -Timestamp* +LIB61850_API Timestamp* Timestamp_create(void); -Timestamp* +LIB61850_API Timestamp* Timestamp_createFromByteArray(uint8_t* byteArray); -void +LIB61850_API void Timestamp_destroy(Timestamp* self); -void +LIB61850_API void Timestamp_clearFlags(Timestamp* self); -uint32_t +LIB61850_API uint32_t Timestamp_getTimeInSeconds(Timestamp* self); -uint64_t +LIB61850_API uint64_t Timestamp_getTimeInMs(Timestamp* self); -bool +LIB61850_API bool Timestamp_isLeapSecondKnown(Timestamp* self); -void +LIB61850_API void Timestamp_setLeapSecondKnown(Timestamp* self, bool value); -bool +LIB61850_API bool Timestamp_hasClockFailure(Timestamp* self); -void +LIB61850_API void Timestamp_setClockFailure(Timestamp* self, bool value); -bool +LIB61850_API bool Timestamp_isClockNotSynchronized(Timestamp* self); -void +LIB61850_API void Timestamp_setClockNotSynchronized(Timestamp* self, bool value); -int +LIB61850_API int Timestamp_getSubsecondPrecision(Timestamp* self); /** @@ -408,16 +408,16 @@ Timestamp_getSubsecondPrecision(Timestamp* self); * * \param subsecondPrecision the number of significant bits of the fractionOfSecond part of the time stamp */ -void +LIB61850_API void Timestamp_setSubsecondPrecision(Timestamp* self, int subsecondPrecision); -void +LIB61850_API void Timestamp_setTimeInSeconds(Timestamp* self, uint32_t secondsSinceEpoch); -void +LIB61850_API void Timestamp_setTimeInMilliseconds(Timestamp* self, uint64_t millisSinceEpoch); -void +LIB61850_API void Timestamp_setByMmsUtcTime(Timestamp* self, MmsValue* mmsValue); /** @@ -426,7 +426,7 @@ Timestamp_setByMmsUtcTime(Timestamp* self, MmsValue* mmsValue); * \param self the Timestamp instance * \param mmsValue the mmsValue instance, if NULL a new instance will be created */ -MmsValue* +LIB61850_API MmsValue* Timestamp_toMmsValue(Timestamp* self, MmsValue* mmsValue); /** @@ -434,7 +434,7 @@ Timestamp_toMmsValue(Timestamp* self, MmsValue* mmsValue); * * \return the version of the library (e.g. "1.2.2") */ -char* +LIB61850_API char* LibIEC61850_getVersionString(void); /** @} */ diff --git a/src/iec61850/inc/iec61850_config_file_parser.h b/src/iec61850/inc/iec61850_config_file_parser.h index e595b11c..7c139b3b 100644 --- a/src/iec61850/inc/iec61850_config_file_parser.h +++ b/src/iec61850/inc/iec61850_config_file_parser.h @@ -40,7 +40,7 @@ extern "C" { * @{ */ -IedModel* +LIB61850_API IedModel* ConfigFileParser_createModelFromConfigFile(FileHandle fileHandle); /**@}*/ diff --git a/src/iec61850/inc/iec61850_dynamic_model.h b/src/iec61850/inc/iec61850_dynamic_model.h index 78c9ee76..72c69ba6 100644 --- a/src/iec61850/inc/iec61850_dynamic_model.h +++ b/src/iec61850/inc/iec61850_dynamic_model.h @@ -52,7 +52,7 @@ extern "C" { * * \return */ -IedModel* +LIB61850_API IedModel* IedModel_create(const char* name/*, MemoryAllocator allocator*/); /** @@ -66,7 +66,7 @@ IedModel_create(const char* name/*, MemoryAllocator allocator*/); * \param model the IedModel instance * \param the name of the configured IED */ -void +LIB61850_API void IedModel_setIedNameForDynamicModel(IedModel* self, const char* name); /** @@ -78,7 +78,7 @@ IedModel_setIedNameForDynamicModel(IedModel* self, const char* name); * * \param model the model instance to destroy */ -void +LIB61850_API void IedModel_destroy(IedModel* model); /** @@ -89,7 +89,7 @@ IedModel_destroy(IedModel* model); * * \return the newly created LogicalDevice instance */ -LogicalDevice* +LIB61850_API LogicalDevice* LogicalDevice_create(const char* name, IedModel* parent); @@ -101,7 +101,7 @@ LogicalDevice_create(const char* name, IedModel* parent); * * \return the newly created LogicalNode instance */ -LogicalNode* +LIB61850_API LogicalNode* LogicalNode_create(const char* name, LogicalDevice* parent); /** @@ -115,7 +115,7 @@ LogicalNode_create(const char* name, LogicalDevice* parent); * * \return the newly create DataObject instance */ -DataObject* +LIB61850_API DataObject* DataObject_create(const char* name, ModelNode* parent, int arrayElements); /** @@ -133,7 +133,7 @@ DataObject_create(const char* name, ModelNode* parent, int arrayElements); * * \return the newly create DataAttribute instance */ -DataAttribute* +LIB61850_API DataAttribute* DataAttribute_create(const char* name, ModelNode* parent, DataAttributeType type, FunctionalConstraint fc, uint8_t triggerOptions, int arrayElements, uint32_t sAddr); @@ -156,7 +156,7 @@ DataAttribute_create(const char* name, ModelNode* parent, DataAttributeType type * * \return the new RCB instance. */ -ReportControlBlock* +LIB61850_API ReportControlBlock* ReportControlBlock_create(const char* name, LogicalNode* parent, char* rptId, bool isBuffered, char* dataSetName, uint32_t confRef, uint8_t trgOps, uint8_t options, uint32_t bufTm, uint32_t intgPd); @@ -177,7 +177,7 @@ ReportControlBlock_create(const char* name, LogicalNode* parent, char* rptId, bo * * \return the new LCB instance */ -LogControlBlock* +LIB61850_API LogControlBlock* LogControlBlock_create(const char* name, LogicalNode* parent, char* dataSetName, char* logRef, uint8_t trgOps, uint32_t intgPd, bool logEna, bool reasonCode); @@ -189,7 +189,7 @@ LogControlBlock_create(const char* name, LogicalNode* parent, char* dataSetName, * * \return the new LOG instance */ -Log* +LIB61850_API Log* Log_create(const char* name, LogicalNode* parent); /** @@ -203,7 +203,7 @@ Log_create(const char* name, LogicalNode* parent); * * \return the new SGCB instance */ -SettingGroupControlBlock* +LIB61850_API SettingGroupControlBlock* SettingGroupControlBlock_create(LogicalNode* parent, uint8_t actSG, uint8_t numOfSGs); /** @@ -222,7 +222,7 @@ SettingGroupControlBlock_create(LogicalNode* parent, uint8_t actSG, uint8_t numO * * \return the new GoCB instance */ -GSEControlBlock* +LIB61850_API GSEControlBlock* GSEControlBlock_create(const char* name, LogicalNode* parent, char* appId, char* dataSet, uint32_t confRev, bool fixedOffs, int minTime, int maxTime); @@ -242,14 +242,14 @@ GSEControlBlock_create(const char* name, LogicalNode* parent, char* appId, char* * * \return the new SvCB instance */ -SVControlBlock* +LIB61850_API SVControlBlock* SVControlBlock_create(const char* name, LogicalNode* parent, char* svID, char* dataSet, uint32_t confRev, uint8_t smpMod, uint16_t smpRate, uint8_t optFlds, bool isUnicast); -void +LIB61850_API void SVControlBlock_addPhyComAddress(SVControlBlock* self, PhyComAddress* phyComAddress); -void +LIB61850_API void GSEControlBlock_addPhyComAddress(GSEControlBlock* self, PhyComAddress* phyComAddress); /** @@ -264,7 +264,7 @@ GSEControlBlock_addPhyComAddress(GSEControlBlock* self, PhyComAddress* phyComAdd * * \return the new PhyComAddress object */ -PhyComAddress* +LIB61850_API PhyComAddress* PhyComAddress_create(uint8_t vlanPriority, uint16_t vlanId, uint16_t appId, uint8_t dstAddress[]); /** @@ -275,7 +275,7 @@ PhyComAddress_create(uint8_t vlanPriority, uint16_t vlanId, uint16_t appId, uint * * \return the new data set instance */ -DataSet* +LIB61850_API DataSet* DataSet_create(const char* name, LogicalNode* parent); /** @@ -285,13 +285,13 @@ DataSet_create(const char* name, LogicalNode* parent); * * \returns the number of data set elements */ -int +LIB61850_API int DataSet_getSize(DataSet* self); -DataSetEntry* +LIB61850_API DataSetEntry* DataSet_getFirstEntry(DataSet* self); -DataSetEntry* +LIB61850_API DataSetEntry* DataSetEntry_getNext(DataSetEntry* self); /** @@ -314,7 +314,7 @@ DataSetEntry_getNext(DataSetEntry* self); * * \return the new data set entry instance */ -DataSetEntry* +LIB61850_API DataSetEntry* DataSetEntry_create(DataSet* dataSet, const char* variable, int index, const char* component); /**@}*/ diff --git a/src/iec61850/inc/iec61850_model.h b/src/iec61850/inc/iec61850_model.h index 86e64021..6bcff86f 100644 --- a/src/iec61850/inc/iec61850_model.h +++ b/src/iec61850/inc/iec61850_model.h @@ -350,7 +350,7 @@ struct sSVControlBlock { * \return the number of children of the model node * ¸ */ -int +LIB61850_API int ModelNode_getChildCount(ModelNode* self); /** @@ -361,7 +361,7 @@ ModelNode_getChildCount(ModelNode* self); * * \return the model node instance or NULL if model node does not exist. */ -ModelNode* +LIB61850_API ModelNode* ModelNode_getChild(ModelNode* self, const char* name); /** @@ -377,7 +377,7 @@ ModelNode_getChild(ModelNode* self, const char* name); * * \return the model node instance or NULL if model node does not exist. */ -ModelNode* +LIB61850_API ModelNode* ModelNode_getChildWithFc(ModelNode* self, const char* name, FunctionalConstraint fc); /** @@ -389,7 +389,7 @@ ModelNode_getChildWithFc(ModelNode* self, const char* name, FunctionalConstraint * * \return the object reference string */ -char* +LIB61850_API char* ModelNode_getObjectReference(ModelNode* self, char* objectReference); /** @@ -399,7 +399,7 @@ ModelNode_getObjectReference(ModelNode* self, char* objectReference); * * \return the type of the ModelNode (one of LD, LN, DO, DA) */ -ModelNodeType +LIB61850_API ModelNodeType ModelNode_getType(ModelNode* self); /** @@ -411,7 +411,7 @@ ModelNode_getType(ModelNode* self); * \param model the IedModel instance * \param the name of the configured IED */ -void +LIB61850_API void IedModel_setIedName(IedModel* self, const char* iedName); /** @@ -426,10 +426,10 @@ IedModel_setIedName(IedModel* self, const char* iedName); * * \return the model node instance or NULL if model node does not exist. */ -ModelNode* +LIB61850_API ModelNode* IedModel_getModelNodeByObjectReference(IedModel* self, const char* objectReference); -SVControlBlock* +LIB61850_API SVControlBlock* IedModel_getSVControlBlock(IedModel* self, LogicalNode* parentLN, const char* svcbName); /** @@ -444,7 +444,7 @@ IedModel_getSVControlBlock(IedModel* self, LogicalNode* parentLN, const char* sv * * \return the model node instance or NULL if model node does not exist. */ -ModelNode* +LIB61850_API ModelNode* IedModel_getModelNodeByShortObjectReference(IedModel* self, const char* objectReference); /** @@ -458,7 +458,7 @@ IedModel_getModelNodeByShortObjectReference(IedModel* self, const char* objectRe * * \return the model node instance or NULL if model node does not exist. */ -ModelNode* +LIB61850_API ModelNode* IedModel_getModelNodeByShortAddress(IedModel* self, uint32_t shortAddress); /** @@ -469,7 +469,7 @@ IedModel_getModelNodeByShortAddress(IedModel* self, uint32_t shortAddress); * * \return The matching LogicalDevice instance */ -LogicalDevice* +LIB61850_API LogicalDevice* IedModel_getDeviceByInst(IedModel* self, const char* ldInst); /** @@ -480,7 +480,7 @@ IedModel_getDeviceByInst(IedModel* self, const char* ldInst); * * \return the corresponding LogicalDevice* object or NULL if the index is out of range */ -LogicalDevice* +LIB61850_API LogicalDevice* IedModel_getDeviceByIndex(IedModel* self, int index); @@ -492,7 +492,7 @@ IedModel_getDeviceByIndex(IedModel* self, int index); * * \return the logical device instance or NULL if it does not exist */ -LogicalNode* +LIB61850_API LogicalNode* LogicalDevice_getLogicalNode(LogicalDevice* self, const char* lnName); /** @@ -502,7 +502,7 @@ LogicalDevice_getLogicalNode(LogicalDevice* self, const char* lnName); * * \return the SGCB instance or NULL if no SGCB is available */ -SettingGroupControlBlock* +LIB61850_API SettingGroupControlBlock* LogicalDevice_getSettingGroupControlBlock(LogicalDevice* self); /**@}*/ @@ -515,7 +515,7 @@ LogicalDevice_getSettingGroupControlBlock(LogicalDevice* self); * * \param self the IedModel instance that holds the model node */ -void +LIB61850_API void IedModel_setAttributeValuesToNull(IedModel* self); /** @@ -526,7 +526,7 @@ IedModel_setAttributeValuesToNull(IedModel* self); * * \return The matching LogicalDevice instance */ -LogicalDevice* +LIB61850_API LogicalDevice* IedModel_getDevice(IedModel* self, const char* ldName); /** @@ -537,7 +537,7 @@ IedModel_getDevice(IedModel* self, const char* ldName); * * \return The matching DataSet instance */ -DataSet* +LIB61850_API DataSet* IedModel_lookupDataSet(IedModel* self, const char* dataSetReference); /** @@ -548,7 +548,7 @@ IedModel_lookupDataSet(IedModel* self, const char* dataSetReference); * * \return the matching DataAttribute instance */ -DataAttribute* +LIB61850_API DataAttribute* IedModel_lookupDataAttributeByMmsValue(IedModel* self, MmsValue* value); @@ -559,22 +559,22 @@ IedModel_lookupDataAttributeByMmsValue(IedModel* self, MmsValue* value); * * \return the number of logical devices */ -int +LIB61850_API int IedModel_getLogicalDeviceCount(IedModel* self); -int +LIB61850_API int LogicalDevice_getLogicalNodeCount(LogicalDevice* self); -ModelNode* +LIB61850_API ModelNode* LogicalDevice_getChildByMmsVariableName(LogicalDevice* self, const char* mmsVariableName); -bool +LIB61850_API bool LogicalNode_hasFCData(LogicalNode* self, FunctionalConstraint fc); -bool +LIB61850_API bool LogicalNode_hasBufferedReports(LogicalNode* self); -bool +LIB61850_API bool LogicalNode_hasUnbufferedReports(LogicalNode* self); /** @@ -585,10 +585,10 @@ LogicalNode_hasUnbufferedReports(LogicalNode* self); * * \return the data set instance or NULL if the data set does not exist */ -DataSet* +LIB61850_API DataSet* LogicalNode_getDataSet(LogicalNode* self, const char* dataSetName); -bool +LIB61850_API bool DataObject_hasFCData(DataObject* self, FunctionalConstraint fc); diff --git a/src/iec61850/inc/iec61850_server.h b/src/iec61850/inc/iec61850_server.h index b0ad9db9..9fe87c8e 100644 --- a/src/iec61850/inc/iec61850_server.h +++ b/src/iec61850/inc/iec61850_server.h @@ -31,7 +31,7 @@ extern "C" { #endif -/** \defgroup server_api_group IEC 61850 server API +/** \defgroup server_api_group IEC 61850/MMS server API * @{ */ @@ -84,13 +84,13 @@ struct sIedServerConfig * * \return a new configuration object with default configuration values */ -IedServerConfig +LIB61850_API IedServerConfig IedServerConfig_create(void); /** * \brief Destroy the configuration object */ -void +LIB61850_API void IedServerConfig_destroy(IedServerConfig self); /** @@ -98,7 +98,7 @@ IedServerConfig_destroy(IedServerConfig self); * * \param edition IEC_61850_EDITION_1, IEC_61850_EDITION_2, or IEC_61850_EDITION_2_1 */ -void +LIB61850_API void IedServerConfig_setEdition(IedServerConfig self, uint8_t edition); /** @@ -106,7 +106,7 @@ IedServerConfig_setEdition(IedServerConfig self, uint8_t edition); * * \returns IEC_61850_EDITION_1, IEC_61850_EDITION_2, or IEC_61850_EDITION_2_1 */ -uint8_t +LIB61850_API uint8_t IedServerConfig_getEdition(IedServerConfig self); /** @@ -114,7 +114,7 @@ IedServerConfig_getEdition(IedServerConfig self); * * \param reportBufferSize the buffer size for each buffered report control block */ -void +LIB61850_API void IedServerConfig_setReportBufferSize(IedServerConfig self, int reportBufferSize); /** @@ -122,7 +122,7 @@ IedServerConfig_setReportBufferSize(IedServerConfig self, int reportBufferSize); * * \return the buffer size for each buffered report control block */ -int +LIB61850_API int IedServerConfig_getReportBufferSize(IedServerConfig self); /** @@ -133,7 +133,7 @@ IedServerConfig_getReportBufferSize(IedServerConfig self); * * \param maxConnection maximum number of TCP connections */ -void +LIB61850_API void IedServerConfig_setMaxMmsConnections(IedServerConfig self, int maxConnections); /** @@ -141,7 +141,7 @@ IedServerConfig_setMaxMmsConnections(IedServerConfig self, int maxConnections); * * \return maximum number of TCP connections */ -int +LIB61850_API int IedServerConfig_getMaxMmsConnections(IedServerConfig self); /** @@ -151,13 +151,13 @@ IedServerConfig_getMaxMmsConnections(IedServerConfig self); * * \param basepath new file service base path */ -void +LIB61850_API void IedServerConfig_setFileServiceBasePath(IedServerConfig self, const char* basepath); /** * \brief Get the basepath of the file services */ -const char* +LIB61850_API const char* IedServerConfig_getFileServiceBasePath(IedServerConfig self); /** @@ -165,7 +165,7 @@ IedServerConfig_getFileServiceBasePath(IedServerConfig self); * * \param[in] enable set true to enable the file services, otherwise false */ -void +LIB61850_API void IedServerConfig_enableFileService(IedServerConfig self, bool enable); /** @@ -173,7 +173,7 @@ IedServerConfig_enableFileService(IedServerConfig self, bool enable); * * \return true if enabled, false otherwise */ -bool +LIB61850_API bool IedServerConfig_isFileServiceEnabled(IedServerConfig self); /** @@ -181,7 +181,7 @@ IedServerConfig_isFileServiceEnabled(IedServerConfig self); * * \param[in] enable set true to enable dynamic data set service, otherwise false */ -void +LIB61850_API void IedServerConfig_enableDynamicDataSetService(IedServerConfig self, bool enable); /** @@ -189,7 +189,7 @@ IedServerConfig_enableDynamicDataSetService(IedServerConfig self, bool enable); * * \return true if enabled, false otherwise */ -bool +LIB61850_API bool IedServerConfig_isDynamicDataSetServiceEnabled(IedServerConfig self); /** @@ -200,7 +200,7 @@ IedServerConfig_isDynamicDataSetServiceEnabled(IedServerConfig self); * * \param maxDataSets maximum number of allowed data sets. */ -void +LIB61850_API void IedServerConfig_setMaxAssociationSpecificDataSets(IedServerConfig self, int maxDataSets); /** @@ -208,7 +208,7 @@ IedServerConfig_setMaxAssociationSpecificDataSets(IedServerConfig self, int maxD * * \return maximum number of allowed data sets. */ -int +LIB61850_API int IedServerConfig_getMaxAssociationSpecificDataSets(IedServerConfig self); /** @@ -216,7 +216,7 @@ IedServerConfig_getMaxAssociationSpecificDataSets(IedServerConfig self); * * \param maxDataSets maximum number of allowed data sets. */ -void +LIB61850_API void IedServerConfig_setMaxDomainSpecificDataSets(IedServerConfig self, int maxDataSets); /** @@ -224,7 +224,7 @@ IedServerConfig_setMaxDomainSpecificDataSets(IedServerConfig self, int maxDataSe * * \return maximum number of allowed data sets. */ -int +LIB61850_API int IedServerConfig_getMaxDomainSpecificDataSets(IedServerConfig self); /** @@ -236,7 +236,7 @@ IedServerConfig_getMaxDomainSpecificDataSets(IedServerConfig self); * * \param maxDataSetEntries the maximum number of entries allowed in a data set */ -void +LIB61850_API void IedServerConfig_setMaxDataSetEntries(IedServerConfig self, int maxDataSetEntries); /** @@ -244,7 +244,7 @@ IedServerConfig_setMaxDataSetEntries(IedServerConfig self, int maxDataSetEntries * * \return the maximum number of entries allowed in a data sets */ -int +LIB61850_API int IedServerConfig_getMaxDatasSetEntries(IedServerConfig self); /** @@ -252,7 +252,7 @@ IedServerConfig_getMaxDatasSetEntries(IedServerConfig self); * * \param[in] enable set true to enable dynamic data set service, otherwise false */ -void +LIB61850_API void IedServerConfig_enableLogService(IedServerConfig self, bool enable); /** @@ -260,7 +260,7 @@ IedServerConfig_enableLogService(IedServerConfig self, bool enable); * * \return true if enabled, false otherwise */ -bool +LIB61850_API bool IedServerConfig_isLogServiceEnabled(IedServerConfig self); /** @@ -287,7 +287,7 @@ typedef struct sClientConnection* ClientConnection; * * \return the new IedServer instance */ -IedServer +LIB61850_API IedServer IedServer_create(IedModel* dataModel); /** @@ -298,7 +298,7 @@ IedServer_create(IedModel* dataModel); * * \return the new IedServer instance */ -IedServer +LIB61850_API IedServer IedServer_createWithTlsSupport(IedModel* dataModel, TLSConfiguration tlsConfiguration); /** @@ -308,7 +308,7 @@ IedServer_createWithTlsSupport(IedModel* dataModel, TLSConfiguration tlsConfigur * \param tlsConfiguration TLS configuration object, or NULL to not use TLS * \param serverConfiguration IED server configuration object for advanced server configuration */ -IedServer +LIB61850_API IedServer IedServer_createWithConfig(IedModel* dataModel, TLSConfiguration tlsConfiguration, IedServerConfig serverConfiguration); /** @@ -316,7 +316,7 @@ IedServer_createWithConfig(IedModel* dataModel, TLSConfiguration tlsConfiguratio * * \param self the instance of IedServer to operate on. */ -void +LIB61850_API void IedServer_destroy(IedServer self); /** @@ -325,7 +325,7 @@ IedServer_destroy(IedServer self); * \param self the IedServer instance * \param localIpAddress the local IP address as C string (an internal copy will be created) */ -void +LIB61850_API void IedServer_setLocalIpAddress(IedServer self, const char* localIpAddress); /** @@ -338,7 +338,7 @@ IedServer_setLocalIpAddress(IedServer self, const char* localIpAddress); * \param self the IedServer instance * \param basepath the new virtual filestore basepath */ -void +LIB61850_API void IedServer_setFilestoreBasepath(IedServer self, const char* basepath); /** @@ -347,7 +347,7 @@ IedServer_setFilestoreBasepath(IedServer self, const char* basepath); * \param self the instance of IedServer to operate on. * \param tcpPort the TCP port the server is listening (-1 for using the default MMS or secure MMS port) */ -void +LIB61850_API void IedServer_start(IedServer self, int tcpPort); /** @@ -355,7 +355,7 @@ IedServer_start(IedServer self, int tcpPort); * * \param self the instance of IedServer to operate on. */ -void +LIB61850_API void IedServer_stop(IedServer self); /** @@ -368,7 +368,7 @@ IedServer_stop(IedServer self); * \param self the instance of IedServer to operate on. * \param tcpPort the TCP port the server is listening (-1 for using the default MMS or secure MMS port) */ -void +LIB61850_API void IedServer_startThreadless(IedServer self, int tcpPort); /** @@ -384,7 +384,7 @@ IedServer_startThreadless(IedServer self, int tcpPort); * * \return 0 if no connection is ready; otherwise at least one connection is ready */ -int +LIB61850_API int IedServer_waitReady(IedServer self, unsigned int timeoutMs); /** @@ -396,7 +396,7 @@ IedServer_waitReady(IedServer self, unsigned int timeoutMs); * * \param self the instance of IedServer to operate on. */ -void +LIB61850_API void IedServer_processIncomingData(IedServer self); /** @@ -407,7 +407,7 @@ IedServer_processIncomingData(IedServer self); * * \param self the instance of IedServer to operate on. */ -void +LIB61850_API void IedServer_performPeriodicTasks(IedServer self); /** @@ -415,7 +415,7 @@ IedServer_performPeriodicTasks(IedServer self); * * \param self the instance of IedServer to operate on. */ -void +LIB61850_API void IedServer_stopThreadless(IedServer self); /** @@ -425,7 +425,7 @@ IedServer_stopThreadless(IedServer self); * * \return the IedModel* instance of the server */ -IedModel* +LIB61850_API IedModel* IedServer_getDataModel(IedServer self); /** @@ -435,7 +435,7 @@ IedServer_getDataModel(IedServer self); * * \return true if IedServer instance is listening for client connections */ -bool +LIB61850_API bool IedServer_isRunning(IedServer self); /** @@ -448,7 +448,7 @@ IedServer_isRunning(IedServer self); * * \return MmsServer instance that is used by the IedServer */ -MmsServer +LIB61850_API MmsServer IedServer_getMmsServer(IedServer self); /** @@ -461,7 +461,7 @@ IedServer_getMmsServer(IedServer self); * * \param self the instance of IedServer to operate on. */ -void +LIB61850_API void IedServer_enableGoosePublishing(IedServer self); /** @@ -472,7 +472,7 @@ IedServer_enableGoosePublishing(IedServer self); * * \param self the instance of IedServer to operate on. */ -void +LIB61850_API void IedServer_disableGoosePublishing(IedServer self); /** @@ -485,7 +485,7 @@ IedServer_disableGoosePublishing(IedServer self); * \param self the instance of IedServer to operate on. * \param interfaceId the ID of the ethernet interface to be used for GOOSE publishing */ -void +LIB61850_API void IedServer_setGooseInterfaceId(IedServer self, const char* interfaceId); /**@}*/ @@ -508,7 +508,7 @@ IedServer_setGooseInterfaceId(IedServer self, const char* interfaceId); * \param authenticator the user provided authenticator callback * \param authenticatorParameter user provided parameter that is passed to the authenticator */ -void +LIB61850_API void IedServer_setAuthenticator(IedServer self, AcseAuthenticator authenticator, void* authenticatorParameter); @@ -522,7 +522,7 @@ IedServer_setAuthenticator(IedServer self, AcseAuthenticator authenticator, void * \param self the ClientConnection instance * \return peer address as C string. */ -const char* +LIB61850_API const char* ClientConnection_getPeerAddress(ClientConnection self); /** @@ -535,7 +535,7 @@ ClientConnection_getPeerAddress(ClientConnection self); * * \return the security token or NULL */ -void* +LIB61850_API void* ClientConnection_getSecurityToken(ClientConnection self); /** @@ -556,7 +556,7 @@ typedef void (*IedConnectionIndicationHandler) (IedServer self, ClientConnection * \param handler the user provided callback function * \param parameter a user provided parameter that is passed to the callback function. */ -void +LIB61850_API void IedServer_setConnectionIndicationHandler(IedServer self, IedConnectionIndicationHandler handler, void* parameter); @@ -582,7 +582,7 @@ IedServer_setConnectionIndicationHandler(IedServer self, IedConnectionIndication * * \param self the instance of IedServer to operate on. */ -void +LIB61850_API void IedServer_lockDataModel(IedServer self); /** @@ -593,7 +593,7 @@ IedServer_lockDataModel(IedServer self); * * \param self the instance of IedServer to operate on. */ -void +LIB61850_API void IedServer_unlockDataModel(IedServer self); /** @@ -608,7 +608,7 @@ IedServer_unlockDataModel(IedServer self); * * \return MmsValue object of the MMS Named Variable or NULL if the value does not exist. */ -MmsValue* +LIB61850_API MmsValue* IedServer_getAttributeValue(IedServer self, DataAttribute* dataAttribute); /** @@ -622,7 +622,7 @@ IedServer_getAttributeValue(IedServer self, DataAttribute* dataAttribute); * * \return true or false */ -bool +LIB61850_API bool IedServer_getBooleanAttributeValue(IedServer self, const DataAttribute* dataAttribute); /** @@ -636,7 +636,7 @@ IedServer_getBooleanAttributeValue(IedServer self, const DataAttribute* dataAttr * * \return the value as 32 bit integer */ -int32_t +LIB61850_API int32_t IedServer_getInt32AttributeValue(IedServer self, const DataAttribute* dataAttribute); /** @@ -650,7 +650,7 @@ IedServer_getInt32AttributeValue(IedServer self, const DataAttribute* dataAttrib * * \return the value as 64 bit integer */ -int64_t +LIB61850_API int64_t IedServer_getInt64AttributeValue(IedServer self, const DataAttribute* dataAttribute); /** @@ -664,7 +664,7 @@ IedServer_getInt64AttributeValue(IedServer self, const DataAttribute* dataAttrib * * \return the value as 32 bit unsigned integer */ -uint32_t +LIB61850_API uint32_t IedServer_getUInt32AttributeValue(IedServer self, const DataAttribute* dataAttribute); /** @@ -678,7 +678,7 @@ IedServer_getUInt32AttributeValue(IedServer self, const DataAttribute* dataAttri * * \return the value as 32 bit float */ -float +LIB61850_API float IedServer_getFloatAttributeValue(IedServer self, const DataAttribute* dataAttribute); /** @@ -692,7 +692,7 @@ IedServer_getFloatAttributeValue(IedServer self, const DataAttribute* dataAttrib * * \return the value as 32 bit float */ -uint64_t +LIB61850_API uint64_t IedServer_getUTCTimeAttributeValue(IedServer self, const DataAttribute* dataAttribute); /** @@ -710,7 +710,7 @@ IedServer_getUTCTimeAttributeValue(IedServer self, const DataAttribute* dataAttr * * \return the value a 32 bit integer. */ -uint32_t +LIB61850_API uint32_t IedServer_getBitStringAttributeValue(IedServer self, const DataAttribute* dataAttribute); /** @@ -724,7 +724,7 @@ IedServer_getBitStringAttributeValue(IedServer self, const DataAttribute* dataAt * * \return the value as a C string (null terminated string) */ -const char* +LIB61850_API const char* IedServer_getStringAttributeValue(IedServer self, const DataAttribute* dataAttribute); @@ -743,7 +743,7 @@ IedServer_getStringAttributeValue(IedServer self, const DataAttribute* dataAttri * * \return MmsValue object cached by the server. */ -MmsValue* +LIB61850_API MmsValue* IedServer_getFunctionalConstrainedData(IedServer self, DataObject* dataObject, FunctionalConstraint fc); /** @@ -762,7 +762,7 @@ IedServer_getFunctionalConstrainedData(IedServer self, DataObject* dataObject, F * \param dataAttribute the data attribute handle * \param value MmsValue object used to update the value cached by the server. */ -void +LIB61850_API void IedServer_updateAttributeValue(IedServer self, DataAttribute* dataAttribute, MmsValue* value); /** @@ -777,7 +777,7 @@ IedServer_updateAttributeValue(IedServer self, DataAttribute* dataAttribute, Mms * \param dataAttribute the data attribute handle * \param value the new float value of the data attribute. */ -void +LIB61850_API void IedServer_updateFloatAttributeValue(IedServer self, DataAttribute* dataAttribute, float value); /** @@ -792,7 +792,7 @@ IedServer_updateFloatAttributeValue(IedServer self, DataAttribute* dataAttribute * \param dataAttribute the data attribute handle * \param value the new integer value of the data attribute. */ -void +LIB61850_API void IedServer_updateInt32AttributeValue(IedServer self, DataAttribute* dataAttribute, int32_t value); /** @@ -807,7 +807,7 @@ IedServer_updateInt32AttributeValue(IedServer self, DataAttribute* dataAttribute * \param dataAttribute the data attribute handle * \param value the new Dbpos value of the data attribute. */ -void +LIB61850_API void IedServer_udpateDbposValue(IedServer self, DataAttribute* dataAttribute, Dbpos value); /** @@ -822,7 +822,7 @@ IedServer_udpateDbposValue(IedServer self, DataAttribute* dataAttribute, Dbpos v * \param dataAttribute the data attribute handle * \param value the new 64 bit integer value of the data attribute. */ -void +LIB61850_API void IedServer_updateInt64AttributeValue(IedServer self, DataAttribute* dataAttribute, int64_t value); /** @@ -837,7 +837,7 @@ IedServer_updateInt64AttributeValue(IedServer self, DataAttribute* dataAttribute * \param dataAttribute the data attribute handle * \param value the new unsigned integer value of the data attribute. */ -void +LIB61850_API void IedServer_updateUnsignedAttributeValue(IedServer self, DataAttribute* dataAttribute, uint32_t value); /** @@ -852,7 +852,7 @@ IedServer_updateUnsignedAttributeValue(IedServer self, DataAttribute* dataAttrib * \param dataAttribute the data attribute handle * \param value the new bit string integer value of the data attribute. */ -void +LIB61850_API void IedServer_updateBitStringAttributeValue(IedServer self, DataAttribute* dataAttribute, uint32_t value); /** @@ -867,7 +867,7 @@ IedServer_updateBitStringAttributeValue(IedServer self, DataAttribute* dataAttri * \param dataAttribute the data attribute handle * \param value the new boolean value of the data attribute. */ -void +LIB61850_API void IedServer_updateBooleanAttributeValue(IedServer self, DataAttribute* dataAttribute, bool value); /** @@ -882,7 +882,7 @@ IedServer_updateBooleanAttributeValue(IedServer self, DataAttribute* dataAttribu * \param dataAttribute the data attribute handle * \param value the new visible string value of the data attribute. */ -void +LIB61850_API void IedServer_updateVisibleStringAttributeValue(IedServer self, DataAttribute* dataAttribute, char *value); /** @@ -897,7 +897,7 @@ IedServer_updateVisibleStringAttributeValue(IedServer self, DataAttribute* dataA * \param dataAttribute the data attribute handle * \param value the new UTC time value of the data attribute as a ms timestamp */ -void +LIB61850_API void IedServer_updateUTCTimeAttributeValue(IedServer self, DataAttribute* dataAttribute, uint64_t value); /** @@ -912,7 +912,7 @@ IedServer_updateUTCTimeAttributeValue(IedServer self, DataAttribute* dataAttribu * \param dataAttribute the data attribute handle * \param value the new UTC time value of the data attribute as a Timestamp */ -void +LIB61850_API void IedServer_updateTimestampAttributeValue(IedServer self, DataAttribute* dataAttribute, Timestamp* timestamp); /** @@ -929,13 +929,13 @@ IedServer_updateTimestampAttributeValue(IedServer self, DataAttribute* dataAttri * \param quality the new quality value * */ -void +LIB61850_API void IedServer_updateQuality(IedServer self, DataAttribute* dataAttribute, Quality quality); /**@}*/ -void +LIB61850_API void IedServer_setLogStorage(IedServer self, const char* logRef, LogStorage logStorage); /** @@ -954,7 +954,7 @@ IedServer_setLogStorage(IedServer self, const char* logRef, LogStorage logStorag * \param sgcb the handle of the setting group control block of the setting group * \param newActiveSg the number of the new active setting group */ -void +LIB61850_API void IedServer_changeActiveSettingGroup(IedServer self, SettingGroupControlBlock* sgcb, uint8_t newActiveSg); /** @@ -965,7 +965,7 @@ IedServer_changeActiveSettingGroup(IedServer self, SettingGroupControlBlock* sgc * * \return the number of the active setting group */ -uint8_t +LIB61850_API uint8_t IedServer_getActiveSettingGroup(IedServer self, SettingGroupControlBlock* sgcb); /** @@ -994,7 +994,7 @@ typedef bool (*ActiveSettingGroupChangedHandler) (void* parameter, SettingGroupC * \param handler the user provided callback handler. * \param parameter a user provided parameter that is passed to the control handler. */ -void +LIB61850_API void IedServer_setActiveSettingGroupChangedHandler(IedServer self, SettingGroupControlBlock* sgcb, ActiveSettingGroupChangedHandler handler, void* parameter); @@ -1026,7 +1026,7 @@ typedef bool (*EditSettingGroupChangedHandler) (void* parameter, SettingGroupCon * \param handler the user provided callback handler. * \param parameter a user provided parameter that is passed to the control handler. */ -void +LIB61850_API void IedServer_setEditSettingGroupChangedHandler(IedServer self, SettingGroupControlBlock* sgcb, EditSettingGroupChangedHandler handler, void* parameter); @@ -1050,7 +1050,7 @@ typedef void (*EditSettingGroupConfirmationHandler) (void* parameter, SettingGro * \param handler the user provided callback handler. * \param parameter a user provided parameter that is passed to the control handler. */ -void +LIB61850_API void IedServer_setEditSettingGroupConfirmationHandler(IedServer self, SettingGroupControlBlock* sgcb, EditSettingGroupConfirmationHandler handler, void* parameter); @@ -1157,7 +1157,7 @@ typedef ControlHandlerResult (*ControlHandler) (void* parameter, MmsValue* ctlVa * \param handler a callback function of type ControlHandler * \param parameter a user provided parameter that is passed to the control handler. */ -void +LIB61850_API void IedServer_setControlHandler(IedServer self, DataObject* node, ControlHandler handler, void* parameter); /** @@ -1174,7 +1174,7 @@ IedServer_setControlHandler(IedServer self, DataObject* node, ControlHandler han * \param parameter a user provided parameter that is passed to the control handler. * */ -void +LIB61850_API void IedServer_setPerformCheckHandler(IedServer self, DataObject* node, ControlPerformCheckHandler handler, void* parameter); /** @@ -1192,7 +1192,7 @@ IedServer_setPerformCheckHandler(IedServer self, DataObject* node, ControlPerfor * \param parameter a user provided parameter that is passed to the control handler. * */ -void +LIB61850_API void IedServer_setWaitForExecutionHandler(IedServer self, DataObject* node, ControlWaitForExecutionHandler handler, void* parameter); /**@}*/ @@ -1226,7 +1226,7 @@ typedef void (*SVCBEventHandler) (SVControlBlock* svcb, int event, void* paramet * \param handler the event handler to be used * \param parameter a user provided parameter that is passed to the handler. */ -void +LIB61850_API void IedServer_setSVCBHandler(IedServer self, SVControlBlock* svcb, SVCBEventHandler handler, void* parameter); /**@}*/ @@ -1277,7 +1277,7 @@ typedef MmsDataAccessError * the monitored data attribute. * \param parameter a user provided parameter that is passed to the WriteAccessHandler when called. */ -void +LIB61850_API void IedServer_handleWriteAccess(IedServer self, DataAttribute* dataAttribute, WriteAccessHandler handler, void* parameter); @@ -1294,7 +1294,7 @@ typedef enum { * \param policy the new policy to apply. * */ -void +LIB61850_API void IedServer_setWriteAccessPolicy(IedServer self, FunctionalConstraint fc, AccessPolicy policy); /** @@ -1325,7 +1325,7 @@ typedef MmsDataAccessError * \param handler the callback function that is invoked if a client tries to read a data object. * \param parameter a user provided parameter that is passed to the callback function. */ -void +LIB61850_API void IedServer_setReadAccessHandler(IedServer self, ReadAccessHandler handler, void* parameter); /**@}*/ diff --git a/src/iec61850/inc_private/control.h b/src/iec61850/inc_private/control.h index 844c74b6..879f945e 100644 --- a/src/iec61850/inc_private/control.h +++ b/src/iec61850/inc_private/control.h @@ -1,7 +1,7 @@ /* * control.h * - * Copyright 2013 Michael Zillgith + * Copyright 2013-2018 Michael Zillgith * * This file is part of libIEC61850. * @@ -103,49 +103,49 @@ struct sControlObject void* waitForExecutionHandlerParameter; }; -ControlObject* +LIB61850_INTERNAL ControlObject* ControlObject_create(IedServer iedServer, MmsDomain* domain, char* lnName, char* name, MmsVariableSpecification* operSpec); -void +LIB61850_INTERNAL void ControlObject_initialize(ControlObject* self); -void +LIB61850_INTERNAL void ControlObject_destroy(ControlObject* self); -void +LIB61850_INTERNAL void ControlObject_setMmsValue(ControlObject* self, MmsValue* value); -MmsValue* +LIB61850_INTERNAL MmsValue* ControlObject_getMmsValue(ControlObject* self); -void +LIB61850_INTERNAL void ControlObject_setTypeSpec(ControlObject* self, MmsVariableSpecification* typeSpec); -MmsVariableSpecification* +LIB61850_INTERNAL MmsVariableSpecification* ControlObject_getTypeSpec(ControlObject* self); -char* +LIB61850_INTERNAL char* ControlObject_getName(ControlObject* self); -char* +LIB61850_INTERNAL char* ControlObject_getLNName(ControlObject* self); -MmsDomain* +LIB61850_INTERNAL MmsDomain* ControlObject_getDomain(ControlObject* self); -bool +LIB61850_INTERNAL bool ControlObject_select(ControlObject* self, MmsServerConnection connection); -bool +LIB61850_INTERNAL bool ControlObject_unselect(ControlObject* self, MmsServerConnection connection); -void +LIB61850_INTERNAL void ControlObject_installListener(ControlObject* self, ControlHandler listener, void* parameter); -void +LIB61850_INTERNAL void ControlObject_installCheckHandler(ControlObject* self, ControlPerformCheckHandler handler, void* parameter); -void +LIB61850_INTERNAL void ControlObject_installWaitForExecutionHandler(ControlObject* self, ControlWaitForExecutionHandler handler, void* parameter); #endif /* CONTROL_H_ */ diff --git a/src/iec61850/inc_private/ied_connection_private.h b/src/iec61850/inc_private/ied_connection_private.h index decd3630..cb5cb385 100644 --- a/src/iec61850/inc_private/ied_connection_private.h +++ b/src/iec61850/inc_private/ied_connection_private.h @@ -1,7 +1,7 @@ /* * ied_connection_private.h * - * Copyright 2013 Michael Zillgith + * Copyright 2013-2018 Michael Zillgith * * This file is part of libIEC61850. * @@ -81,52 +81,52 @@ struct sClientReportControlBlock { MmsValue* owner; }; -IedClientError +LIB61850_INTERNAL IedClientError private_IedConnection_mapMmsErrorToIedError(MmsError mmsError); -bool +LIB61850_INTERNAL bool private_IedConnection_doesControlObjectMatch(const char* objRef, const char* cntrlObj); -void +LIB61850_INTERNAL void private_IedConnection_addControlClient(IedConnection self, ControlObjectClient control); -void +LIB61850_INTERNAL void private_IedConnection_removeControlClient(IedConnection self, ControlObjectClient control); -bool +LIB61850_INTERNAL bool private_ClientReportControlBlock_updateValues(ClientReportControlBlock self, MmsValue* values); -void +LIB61850_INTERNAL void private_IedConnection_handleReport(IedConnection self, MmsValue* value); -IedClientError +LIB61850_INTERNAL IedClientError iedConnection_mapMmsErrorToIedError(MmsError mmsError); -IedClientError +LIB61850_INTERNAL IedClientError iedConnection_mapDataAccessErrorToIedError(MmsDataAccessError mmsError); -ClientReport +LIB61850_INTERNAL ClientReport ClientReport_create(void); -void +LIB61850_INTERNAL void ClientReport_destroy(ClientReport self); -void +LIB61850_INTERNAL void private_ControlObjectClient_invokeCommandTerminationHandler(ControlObjectClient self); /* some declarations that are shared with server side ! */ -char* +LIB61850_INTERNAL char* MmsMapping_getMmsDomainFromObjectReference(const char* objectReference, char* buffer); -char* +LIB61850_INTERNAL char* MmsMapping_createMmsVariableNameFromObjectReference(const char* objectReference, FunctionalConstraint fc, char* buffer); -char* +LIB61850_INTERNAL char* MmsMapping_varAccessSpecToObjectReference(MmsVariableAccessSpecification* varAccessSpec); -MmsVariableAccessSpecification* +LIB61850_INTERNAL MmsVariableAccessSpecification* MmsMapping_ObjectReferenceToVariableAccessSpec(char* objectReference); #endif /* IED_CONNECTION_PRIVATE_H_ */ diff --git a/src/iec61850/inc_private/ied_server_private.h b/src/iec61850/inc_private/ied_server_private.h index 003c1613..b14dabec 100644 --- a/src/iec61850/inc_private/ied_server_private.h +++ b/src/iec61850/inc_private/ied_server_private.h @@ -61,31 +61,31 @@ struct sIedServer }; -ClientConnection +LIB61850_INTERNAL ClientConnection private_IedServer_getClientConnectionByHandle(IedServer self, void* serverConnectionHandle); -ClientConnection +LIB61850_INTERNAL ClientConnection private_ClientConnection_create(void* serverConnectionHandle); -void +LIB61850_INTERNAL void private_ClientConnection_destroy(ClientConnection self); -int +LIB61850_INTERNAL int private_ClientConnection_getTasksCount(ClientConnection self); -void +LIB61850_INTERNAL void private_ClientConnection_increaseTasksCount(ClientConnection self); -void +LIB61850_INTERNAL void private_ClientConnection_decreaseTasksCount(ClientConnection self); -void* +LIB61850_INTERNAL void* private_ClientConnection_getServerConnectionHandle(ClientConnection self); -void +LIB61850_INTERNAL void private_IedServer_addNewClientConnection(IedServer self, ClientConnection newClientConnection); -void +LIB61850_INTERNAL void private_IedServer_removeClientConnection(IedServer self, ClientConnection clientConnection); #endif /* IED_SERVER_PRIVATE_H_ */ diff --git a/src/iec61850/inc_private/logging.h b/src/iec61850/inc_private/logging.h index ea3793dd..f94d90df 100644 --- a/src/iec61850/inc_private/logging.h +++ b/src/iec61850/inc_private/logging.h @@ -73,50 +73,50 @@ typedef struct { } LogControl; -LogInstance* +LIB61850_INTERNAL LogInstance* LogInstance_create(LogicalNode* parentLN, const char* name); -void +LIB61850_INTERNAL void LogInstance_setLogStorage(LogInstance* self, LogStorage logStorage); -void +LIB61850_INTERNAL void LogInstance_logSingleData(LogInstance* self, const char* dataRef, MmsValue* value, uint8_t flag); -uint64_t +LIB61850_INTERNAL uint64_t LogInstance_logEntryStart(LogInstance* self); -void +LIB61850_INTERNAL void LogInstance_logEntryData(LogInstance* self, uint64_t entryID, const char* dataRef, MmsValue* value, uint8_t flag); -void +LIB61850_INTERNAL void LogInstance_logEntryFinished(LogInstance* self, uint64_t entryID); -void +LIB61850_INTERNAL void LogInstance_destroy(LogInstance* self); -LogControl* +LIB61850_INTERNAL LogControl* LogControl_create(LogicalNode* parentLN, MmsMapping* mmsMapping); -void +LIB61850_INTERNAL void LogControl_setLog(LogControl* self, LogInstance* logInstance); -void +LIB61850_INTERNAL void LogControl_destroy(LogControl* self); -void +LIB61850_INTERNAL void LogControl_setLogStorage(LogControl* self, LogStorage logStorage); -MmsVariableSpecification* +LIB61850_INTERNAL MmsVariableSpecification* Logging_createLCBs(MmsMapping* self, MmsDomain* domain, LogicalNode* logicalNode, int lcbCount); -void +LIB61850_INTERNAL void Logging_processIntegrityLogs(MmsMapping* self, uint64_t currentTimeInMs); -MmsValue* +LIB61850_INTERNAL MmsValue* LIBIEC61850_LOG_SVC_readAccessControlBlock(MmsMapping* self, MmsDomain* domain, char* variableIdOrig); -MmsDataAccessError +LIB61850_INTERNAL MmsDataAccessError LIBIEC61850_LOG_SVC_writeAccessLogControlBlock(MmsMapping* self, MmsDomain* domain, char* variableIdOrig, MmsValue* value, MmsServerConnection connection); diff --git a/src/iec61850/inc_private/mms_goose.h b/src/iec61850/inc_private/mms_goose.h index 76bd1a60..c26be24f 100644 --- a/src/iec61850/inc_private/mms_goose.h +++ b/src/iec61850/inc_private/mms_goose.h @@ -1,7 +1,7 @@ /* * mms_goose.h * - * Copyright 2013 Michael Zillgith + * Copyright 2013-2018 Michael Zillgith * * This file is part of libIEC61850. * @@ -26,49 +26,49 @@ typedef struct sMmsGooseControlBlock* MmsGooseControlBlock; -MmsGooseControlBlock +LIB61850_INTERNAL MmsGooseControlBlock MmsGooseControlBlock_create(void); -void +LIB61850_INTERNAL void MmsGooseControlBlock_destroy(MmsGooseControlBlock self); -MmsDomain* +LIB61850_INTERNAL MmsDomain* MmsGooseControlBlock_getDomain(MmsGooseControlBlock self); -char* +LIB61850_INTERNAL char* MmsGooseControlBlock_getLogicalNodeName(MmsGooseControlBlock self); -char* +LIB61850_INTERNAL char* MmsGooseControlBlock_getName(MmsGooseControlBlock self); -MmsValue* +LIB61850_INTERNAL MmsValue* MmsGooseControlBlock_getGCBValue(MmsGooseControlBlock self, char* elementName); -MmsValue* +LIB61850_INTERNAL MmsValue* MmsGooseControlBlock_getMmsValues(MmsGooseControlBlock self); -MmsVariableSpecification* +LIB61850_INTERNAL MmsVariableSpecification* MmsGooseControlBlock_getVariableSpecification(MmsGooseControlBlock self); -DataSet* +LIB61850_INTERNAL DataSet* MmsGooseControlBlock_getDataSet(MmsGooseControlBlock self); -bool +LIB61850_INTERNAL bool MmsGooseControlBlock_isEnabled(MmsGooseControlBlock self); -void +LIB61850_INTERNAL void MmsGooseControlBlock_checkAndPublish(MmsGooseControlBlock self, uint64_t currentTime); -void +LIB61850_INTERNAL void MmsGooseControlBlock_observedObjectChanged(MmsGooseControlBlock self); -void +LIB61850_INTERNAL void MmsGooseControlBlock_enable(MmsGooseControlBlock self); -void +LIB61850_INTERNAL void MmsGooseControlBlock_disable(MmsGooseControlBlock self); -MmsVariableSpecification* +LIB61850_INTERNAL MmsVariableSpecification* GOOSE_createGOOSEControlBlocks(MmsMapping* self, MmsDomain* domain, LogicalNode* logicalNode, int gseCount); diff --git a/src/iec61850/inc_private/mms_mapping.h b/src/iec61850/inc_private/mms_mapping.h index 56935060..92c676bc 100644 --- a/src/iec61850/inc_private/mms_mapping.h +++ b/src/iec61850/inc_private/mms_mapping.h @@ -43,122 +43,122 @@ typedef enum { typedef struct sMmsMapping MmsMapping; -MmsMapping* +LIB61850_INTERNAL MmsMapping* MmsMapping_create(IedModel* model, IedServer iedServer); -MmsDevice* +LIB61850_INTERNAL MmsDevice* MmsMapping_getMmsDeviceModel(MmsMapping* mapping); -void +LIB61850_INTERNAL void MmsMapping_initializeControlObjects(MmsMapping* self); -void +LIB61850_INTERNAL void MmsMapping_configureSettingGroups(MmsMapping* self); -void +LIB61850_INTERNAL void MmsMapping_checkForSettingGroupReservationTimeouts(MmsMapping* self, uint64_t currentTime); -void +LIB61850_INTERNAL void MmsMapping_setSgChangedHandler(MmsMapping* self, SettingGroupControlBlock* sgcb, ActiveSettingGroupChangedHandler handler, void* parameter); -void +LIB61850_INTERNAL void MmsMapping_setEditSgChangedHandler(MmsMapping* self, SettingGroupControlBlock* sgcb, EditSettingGroupChangedHandler handler, void* parameter); -void +LIB61850_INTERNAL void MmsMapping_setConfirmEditSgHandler(MmsMapping* self, SettingGroupControlBlock* sgcb, EditSettingGroupConfirmationHandler handler, void* parameter); -void +LIB61850_INTERNAL void MmsMapping_changeActiveSettingGroup(MmsMapping* self, SettingGroupControlBlock* sgcb, uint8_t newActiveSg); -void +LIB61850_INTERNAL void MmsMapping_setMmsServer(MmsMapping* self, MmsServer server); -void +LIB61850_INTERNAL void MmsMapping_installHandlers(MmsMapping* self); -void +LIB61850_INTERNAL void MmsMapping_destroy(MmsMapping* mapping); -void +LIB61850_INTERNAL void MmsMapping_startEventWorkerThread(MmsMapping* self); -void +LIB61850_INTERNAL void MmsMapping_stopEventWorkerThread(MmsMapping* self); -DataSet* +LIB61850_INTERNAL DataSet* MmsMapping_createDataSetByNamedVariableList(MmsMapping* self, MmsNamedVariableList variableList); -void +LIB61850_INTERNAL void MmsMapping_triggerReportObservers(MmsMapping* self, MmsValue* value, int flag); -void +LIB61850_INTERNAL void MmsMapping_triggerLogging(MmsMapping* self, MmsValue* value, LogInclusionFlag flag); -void +LIB61850_INTERNAL void MmsMapping_triggerGooseObservers(MmsMapping* self, MmsValue* value); -void +LIB61850_INTERNAL void MmsMapping_enableGoosePublishing(MmsMapping* self); -void +LIB61850_INTERNAL void MmsMapping_disableGoosePublishing(MmsMapping* self); -char* +LIB61850_INTERNAL char* MmsMapping_getMmsDomainFromObjectReference(const char* objectReference, char* buffer); -void +LIB61850_INTERNAL void MmsMapping_addControlObject(MmsMapping* self, ControlObject* controlObject); -char* +LIB61850_INTERNAL char* MmsMapping_createMmsVariableNameFromObjectReference(const char* objectReference, FunctionalConstraint fc, char* buffer); -char* +LIB61850_INTERNAL char* MmsMapping_getNextNameElement(char* name); -void /* Create PHYCOMADDR ACSI type instance */ +LIB61850_INTERNAL void /* Create PHYCOMADDR ACSI type instance */ MmsMapping_createPhyComAddrStructure(MmsVariableSpecification* namedVariable); -ControlObject* +LIB61850_INTERNAL ControlObject* MmsMapping_getControlObject(MmsMapping* self, MmsDomain* domain, char* lnName, char* coName); -MmsNamedVariableList +LIB61850_INTERNAL MmsNamedVariableList MmsMapping_getDomainSpecificVariableList(MmsMapping* self, const char* variableListReference); -DataSet* +LIB61850_INTERNAL DataSet* MmsMapping_getDomainSpecificDataSet(MmsMapping* self, const char* dataSetName); -void +LIB61850_INTERNAL void MmsMapping_freeDynamicallyCreatedDataSet(DataSet* dataSet); -MmsVariableAccessSpecification* +LIB61850_INTERNAL MmsVariableAccessSpecification* MmsMapping_ObjectReferenceToVariableAccessSpec(char* objectReference); -char* +LIB61850_INTERNAL char* MmsMapping_varAccessSpecToObjectReference(MmsVariableAccessSpecification* varAccessSpec); -void +LIB61850_INTERNAL void MmsMapping_setConnectionIndicationHandler(MmsMapping* self, IedConnectionIndicationHandler handler, void* parameter); -void +LIB61850_INTERNAL void MmsMapping_setLogStorage(MmsMapping* self, const char* logRef, LogStorage logStorage); -void +LIB61850_INTERNAL void MmsMapping_installWriteAccessHandler(MmsMapping* self, DataAttribute* dataAttribute, WriteAccessHandler handler, void* parameter); -void +LIB61850_INTERNAL void MmsMapping_installReadAccessHandler(MmsMapping* self, ReadAccessHandler handler, void* paramter); -MmsDataAccessError +LIB61850_INTERNAL MmsDataAccessError Control_writeAccessControlObject(MmsMapping* self, MmsDomain* domain, char* variableIdOrig, MmsValue* value, MmsServerConnection connection); -ControlObject* +LIB61850_INTERNAL ControlObject* Control_lookupControlObject(MmsMapping* self, MmsDomain* domain, char* lnName, char* objectName); -void +LIB61850_INTERNAL void Control_processControlActions(MmsMapping* self, uint64_t currentTimeInMs); #endif /* MMS_MAPPING_H_ */ diff --git a/src/iec61850/inc_private/mms_sv.h b/src/iec61850/inc_private/mms_sv.h index edb67d15..c150a641 100644 --- a/src/iec61850/inc_private/mms_sv.h +++ b/src/iec61850/inc_private/mms_sv.h @@ -27,24 +27,24 @@ typedef struct sMmsSampledValueControlBlock* MmsSampledValueControlBlock; -MmsSampledValueControlBlock +LIB61850_INTERNAL MmsSampledValueControlBlock MmsSampledValueControlBlock_create(void); -void +LIB61850_INTERNAL void MmsSampledValueControlBlock_destroy(MmsSampledValueControlBlock self); -MmsVariableSpecification* +LIB61850_INTERNAL MmsVariableSpecification* LIBIEC61850_SV_createSVControlBlocks(MmsMapping* self, MmsDomain* domain, LogicalNode* logicalNode, int svCount, bool unicast); -MmsValue* +LIB61850_INTERNAL MmsValue* LIBIEC61850_SV_readAccessSampledValueControlBlock(MmsMapping* self, MmsDomain* domain, char* variableIdOrig); -MmsDataAccessError +LIB61850_INTERNAL MmsDataAccessError LIBIEC61850_SV_writeAccessSVControlBlock(MmsMapping* self, MmsDomain* domain, char* variableIdOrig, MmsValue* value, MmsServerConnection connection); -void +LIB61850_INTERNAL void LIBIEC61850_SV_setSVCBHandler(MmsMapping* self, SVControlBlock* svcb, SVCBEventHandler handler, void* parameter); #endif /* LIBIEC61850_SRC_IEC61850_INC_PRIVATE_MMS_SV_H_ */ diff --git a/src/iec61850/inc_private/reporting.h b/src/iec61850/inc_private/reporting.h index 540078b1..125f6cde 100644 --- a/src/iec61850/inc_private/reporting.h +++ b/src/iec61850/inc_private/reporting.h @@ -98,42 +98,42 @@ typedef struct { IedServer server; } ReportControl; -ReportControl* +LIB61850_INTERNAL ReportControl* ReportControl_create(bool buffered, LogicalNode* parentLN, int reportBufferSize, IedServer server); -void +LIB61850_INTERNAL void ReportControl_destroy(ReportControl* self); -void +LIB61850_INTERNAL void ReportControl_valueUpdated(ReportControl* self, int dataSetEntryIndex, int flag, bool modelLocked); -MmsValue* +LIB61850_INTERNAL MmsValue* ReportControl_getRCBValue(ReportControl* rc, char* elementName); -MmsVariableSpecification* +LIB61850_INTERNAL MmsVariableSpecification* Reporting_createMmsBufferedRCBs(MmsMapping* self, MmsDomain* domain, LogicalNode* logicalNode, int reportsCount); -MmsVariableSpecification* +LIB61850_INTERNAL MmsVariableSpecification* Reporting_createMmsUnbufferedRCBs(MmsMapping* self, MmsDomain* domain, LogicalNode* logicalNode, int reportsCount); -MmsDataAccessError +LIB61850_INTERNAL MmsDataAccessError Reporting_RCBWriteAccessHandler(MmsMapping* self, ReportControl* rc, char* elementName, MmsValue* value, MmsServerConnection connection); -void +LIB61850_INTERNAL void Reporting_activateBufferedReports(MmsMapping* self); /* periodic check if reports have to be sent */ -void +LIB61850_INTERNAL void Reporting_processReportEvents(MmsMapping* self, uint64_t currentTimeInMs); /* check if report have to be sent after data model update */ -void +LIB61850_INTERNAL void Reporting_processReportEventsAfterUnlock(MmsMapping* self); -void +LIB61850_INTERNAL void Reporting_deactivateReportsForConnection(MmsMapping* self, MmsServerConnection connection); #endif /* REPORTING_H_ */ diff --git a/src/logging/logging_api.h b/src/logging/logging_api.h index 880b2983..a4493535 100644 --- a/src/logging/logging_api.h +++ b/src/logging/logging_api.h @@ -28,8 +28,7 @@ extern "C" { #endif -#include -#include +#include "libiec61850_common_api.h" /** \addtogroup server_api_group @@ -105,7 +104,7 @@ struct sLogStorage { * \param self the pointer of the LogStorage instance * \param maxEntries the maximum number of log entries */ -void +LIB61850_API void LogStorage_setMaxLogEntries(LogStorage self, int maxEntries); /** @@ -116,7 +115,7 @@ LogStorage_setMaxLogEntries(LogStorage self, int maxEntries); * * \return the entryID of the new entry */ -uint64_t +LIB61850_API uint64_t LogStorage_addEntry(LogStorage self, uint64_t timestamp); /** @@ -131,7 +130,7 @@ LogStorage_addEntry(LogStorage self, uint64_t timestamp); * * \return true if the entry data was successfully added, false otherwise */ -bool +LIB61850_API bool LogStorage_addEntryData(LogStorage self, uint64_t entryID, const char* dataRef, uint8_t* data, int dataSize, uint8_t reasonCode); /** @@ -146,7 +145,7 @@ LogStorage_addEntryData(LogStorage self, uint64_t entryID, const char* dataRef, * * \return true if the request has been successful, false otherwise */ -bool +LIB61850_API bool LogStorage_getEntries(LogStorage self, uint64_t startingTime, uint64_t endingTime, LogEntryCallback entryCallback, LogEntryDataCallback entryDataCallback, void* parameter); @@ -165,7 +164,7 @@ LogStorage_getEntries(LogStorage self, uint64_t startingTime, uint64_t endingTim * * \return true if the request has been successful, false otherwise */ -bool +LIB61850_API bool LogStorage_getEntriesAfter(LogStorage self, uint64_t startingTime, uint64_t entryID, LogEntryCallback entryCallback, LogEntryDataCallback entryDataCallback, void* parameter); @@ -181,7 +180,7 @@ LogStorage_getEntriesAfter(LogStorage self, uint64_t startingTime, uint64_t entr * \param oldEntryTime pointer to store the entry time of the oldest entry * */ -bool +LIB61850_API bool LogStorage_getOldestAndNewestEntries(LogStorage self, uint64_t* newEntry, uint64_t* newEntryTime, uint64_t* oldEntry, uint64_t* oldEntryTime); @@ -190,7 +189,7 @@ LogStorage_getOldestAndNewestEntries(LogStorage self, uint64_t* newEntry, uint64 * * \param self the pointer of the LogStorage instance */ -void +LIB61850_API void LogStorage_destroy(LogStorage self); /**@}*/ diff --git a/src/mms/inc/iso_connection_parameters.h b/src/mms/inc/iso_connection_parameters.h index 81d340b2..dcdbaaa9 100644 --- a/src/mms/inc/iso_connection_parameters.h +++ b/src/mms/inc/iso_connection_parameters.h @@ -78,16 +78,16 @@ struct sAcseAuthenticationParameter } value; }; -AcseAuthenticationParameter +LIB61850_API AcseAuthenticationParameter AcseAuthenticationParameter_create(void); -void +LIB61850_API void AcseAuthenticationParameter_destroy(AcseAuthenticationParameter self); -void +LIB61850_API void AcseAuthenticationParameter_setAuthMechanism(AcseAuthenticationParameter self, AcseAuthenticationMechanism mechanism); -void +LIB61850_API void AcseAuthenticationParameter_setPassword(AcseAuthenticationParameter self, char* password); @@ -156,7 +156,7 @@ typedef struct sIsoConnectionParameters* IsoConnectionParameters; * * \return new IsoConnectionParameters */ -IsoConnectionParameters +LIB61850_API IsoConnectionParameters IsoConnectionParameters_create(void); /** @@ -167,11 +167,11 @@ IsoConnectionParameters_create(void); * * \param self the IsoConnectionParameters instance */ -void +LIB61850_API void IsoConnectionParameters_destroy(IsoConnectionParameters self); -void +LIB61850_API void IsoConnectionParameters_setTlsConfiguration(IsoConnectionParameters self, TLSConfiguration tlsConfig); /** @@ -182,7 +182,7 @@ IsoConnectionParameters_setTlsConfiguration(IsoConnectionParameters self, TLSCon * \param self the IsoConnectionParameters instance * \param acseAuthParameter */ -void +LIB61850_API void IsoConnectionParameters_setAcseAuthenticationParameter(IsoConnectionParameters self, AcseAuthenticationParameter acseAuthParameter); @@ -196,7 +196,7 @@ IsoConnectionParameters_setAcseAuthenticationParameter(IsoConnectionParameters s * \param hostname the hostname of IP address if the server * \param tcpPort the TCP port number of the server */ -void +LIB61850_API void IsoConnectionParameters_setTcpParameters(IsoConnectionParameters self, const char* hostname, int tcpPort); /** @@ -211,7 +211,7 @@ IsoConnectionParameters_setTcpParameters(IsoConnectionParameters self, const cha * \param apTitle the AP-Title OID as string. * \param aeQualifier the AP-qualifier */ -void +LIB61850_API void IsoConnectionParameters_setRemoteApTitle(IsoConnectionParameters self, const char* apTitle, int aeQualifier); /** @@ -226,7 +226,7 @@ IsoConnectionParameters_setRemoteApTitle(IsoConnectionParameters self, const cha * \param sSelector the S-Selector (session layer address) * \param tSelector the T-Selector (ISO transport layer address) */ -void +LIB61850_API void IsoConnectionParameters_setRemoteAddresses(IsoConnectionParameters self, uint32_t pSelector, SSelector sSelector, TSelector tSelector); /** @@ -241,7 +241,7 @@ IsoConnectionParameters_setRemoteAddresses(IsoConnectionParameters self, uint32_ * \param apTitle the AP-Title OID as string. * \param aeQualifier the AP-qualifier */ -void +LIB61850_API void IsoConnectionParameters_setLocalApTitle(IsoConnectionParameters self, const char* apTitle, int aeQualifier); /** @@ -256,7 +256,7 @@ IsoConnectionParameters_setLocalApTitle(IsoConnectionParameters self, const char * \param sSelector the S-Selector (session layer address) * \param tSelector the T-Selector (ISO transport layer address) */ -void +LIB61850_API void IsoConnectionParameters_setLocalAddresses(IsoConnectionParameters self, uint32_t pSelector, SSelector sSelector, TSelector tSelector); /**@}*/ diff --git a/src/mms/inc/mms_client_connection.h b/src/mms/inc/mms_client_connection.h index 6a846c6c..dd1ee1ca 100644 --- a/src/mms/inc/mms_client_connection.h +++ b/src/mms/inc/mms_client_connection.h @@ -84,7 +84,7 @@ typedef struct sMmsConnection* MmsConnection; * * \return the newly created instance. */ -MmsConnection +LIB61850_API MmsConnection MmsConnection_create(void); /** @@ -94,7 +94,7 @@ MmsConnection_create(void); * * \return the newly created instance. */ -MmsConnection +LIB61850_API MmsConnection MmsConnection_createSecure(TLSConfiguration tlsConfig); /** @@ -108,7 +108,7 @@ MmsConnection_createSecure(TLSConfiguration tlsConfig); * * \return the newly created instance. */ -MmsConnection +LIB61850_API MmsConnection MmsConnection_createNonThreaded(TLSConfiguration tlsConfig); /** @@ -135,7 +135,7 @@ typedef void (*MmsRawMessageHandler) (void* parameter, uint8_t* message, int mes * \param handler the connection specific callback function * \param a user provided parameter passed to the callback function (use NULL if not required). */ -void +LIB61850_API void MmsConnection_setRawMessageHandler(MmsConnection self, MmsRawMessageHandler handler, void* parameter); /** @@ -148,7 +148,7 @@ MmsConnection_setRawMessageHandler(MmsConnection self, MmsRawMessageHandler hand * \param self the MmsServer instance * \param basepath the new virtual filestore basepath */ -void +LIB61850_API void MmsConnection_setFilestoreBasepath(MmsConnection self, const char* basepath); /** @@ -157,7 +157,7 @@ MmsConnection_setFilestoreBasepath(MmsConnection self, const char* basepath); * \param self MmsConnection instance to operate on * \param timeoutInMs request timeout in milliseconds */ -void +LIB61850_API void MmsConnection_setRequestTimeout(MmsConnection self, uint32_t timeoutInMs); /** @@ -166,7 +166,7 @@ MmsConnection_setRequestTimeout(MmsConnection self, uint32_t timeoutInMs); * \param self MmsConnection instance to operate on * \param timeoutInMs connect timeout in milliseconds */ -void +LIB61850_API void MmsConnection_setConnectTimeout(MmsConnection self, uint32_t timeoutInMs); /** @@ -180,7 +180,7 @@ MmsConnection_setConnectTimeout(MmsConnection self, uint32_t timeoutInMs); * \param parameter a user specified parameter that will be passed to the handler function on each * invocation. */ -void +LIB61850_API void MmsConnection_setInformationReportHandler(MmsConnection self, MmsInformationReportHandler handler, void* parameter); @@ -190,7 +190,7 @@ MmsConnection_setInformationReportHandler(MmsConnection self, MmsInformationRepo * \param self MmsConnection instance to operate on * \return params the to be used by this connection */ -IsoConnectionParameters +LIB61850_API IsoConnectionParameters MmsConnection_getIsoConnectionParameters(MmsConnection self); /** @@ -199,12 +199,12 @@ MmsConnection_getIsoConnectionParameters(MmsConnection self); * \param self MmsConnection instance to operate on * \return params the to be used by this connection */ -MmsConnectionParameters +LIB61850_API MmsConnectionParameters MmsConnection_getMmsConnectionParameters(MmsConnection self); typedef void (*MmsConnectionStateChangedHandler) (MmsConnection connection, void* parameter, MmsConnectionState newState); -void +LIB61850_API void MmsConnection_setConnectionStateChangedHandler(MmsConnection self, MmsConnectionStateChangedHandler handler, void* parameter); /** @@ -221,7 +221,7 @@ typedef void (*MmsConnectionLostHandler) (MmsConnection connection, void* parame * \param handler the user provided callback function * \param handlerParameter a parameter that will be passed to the callback function. Can be set to NULL if not required. */ -void +LIB61850_API void MmsConnection_setConnectionLostHandler(MmsConnection self, MmsConnectionLostHandler handler, void* handlerParameter); /** @@ -230,7 +230,7 @@ MmsConnection_setConnectionLostHandler(MmsConnection self, MmsConnectionLostHand * \param self MmsConnection instance to operate on * \param params the ISO client parameters to use */ -void +LIB61850_API void MmsConnection_setIsoConnectionParameters(MmsConnection self, IsoConnectionParameters* params); /** @@ -238,7 +238,7 @@ MmsConnection_setIsoConnectionParameters(MmsConnection self, IsoConnectionParame * * \param self MmsConnection instance to operate on */ -void +LIB61850_API void MmsConnection_destroy(MmsConnection self); /******************************************************************************* @@ -258,10 +258,10 @@ MmsConnection_destroy(MmsConnection self); * * \return true on success. false if the connection attempt failed. */ -bool +LIB61850_API bool MmsConnection_connect(MmsConnection self, MmsError* mmsError, const char* serverName, int serverPort); -void +LIB61850_API void MmsConnection_connectAsync(MmsConnection self, MmsError* mmsError, const char* serverName, int serverPort); @@ -275,7 +275,7 @@ MmsConnection_connectAsync(MmsConnection self, MmsError* mmsError, const char* s * \return true when connection is currently waiting and calling thread can be suspended, false means * connection is busy and the tick function should be called again as soon as possible. */ -bool +LIB61850_API bool MmsConnection_tick(MmsConnection self); /** @@ -286,7 +286,7 @@ MmsConnection_tick(MmsConnection self); * * \param self MmsConnection instance to operate on */ -void +LIB61850_API void MmsConnection_close(MmsConnection self); typedef void @@ -303,10 +303,10 @@ typedef void * \param self MmsConnection instance to operate on * \param mmsError user provided variable to store error code */ -void +LIB61850_API void MmsConnection_abort(MmsConnection self, MmsError* mmsError); -void +LIB61850_API void MmsConnection_abortAsync(MmsConnection self, MmsError* mmsError); /** @@ -320,10 +320,10 @@ MmsConnection_abortAsync(MmsConnection self, MmsError* mmsError); * \param self MmsConnection instance to operate on * \param mmsError user provided variable to store error code */ -void +LIB61850_API void MmsConnection_conclude(MmsConnection self, MmsError* mmsError); -void +LIB61850_API void MmsConnection_concludeAsync(MmsConnection self, MmsError* mmsError, MmsConnection_ConcludeAbortHandler handler, void* parameter); typedef void @@ -342,10 +342,10 @@ typedef void * * \return the of VMD specific variable names or NULL if the request failed. */ -LinkedList /* */ +LIB61850_API LinkedList /* */ MmsConnection_getVMDVariableNames(MmsConnection self, MmsError* mmsError); -uint32_t +LIB61850_API uint32_t MmsConnection_getVMDVariableNamesAsync(MmsConnection self, MmsError* mmsError, const char* continueAfter, MmsConnection_GetNameListHandler handler, void* parameter); @@ -360,10 +360,10 @@ MmsConnection_getVMDVariableNamesAsync(MmsConnection self, MmsError* mmsError, c * \return the list of domain names or NULL if the request failed. * */ -LinkedList /* */ +LIB61850_API LinkedList /* */ MmsConnection_getDomainNames(MmsConnection self, MmsError* mmsError); -uint32_t +LIB61850_API uint32_t MmsConnection_getDomainNamesAsync(MmsConnection self, MmsError* mmsError, const char* continueAfter, MmsConnection_GetNameListHandler handler, void* parameter); @@ -378,10 +378,10 @@ MmsConnection_getDomainNamesAsync(MmsConnection self, MmsError* mmsError, const * * \return the of domain specific variable names or NULL if the request failed. */ -LinkedList /* */ +LIB61850_API LinkedList /* */ MmsConnection_getDomainVariableNames(MmsConnection self, MmsError* mmsError, const char* domainId); -uint32_t +LIB61850_API uint32_t MmsConnection_getDomainVariableNamesAsync(MmsConnection self, MmsError* mmsError, const char* domainId, const char* continueAfter, MmsConnection_GetNameListHandler handler, void* parameter); @@ -396,10 +396,10 @@ MmsConnection_getDomainVariableNamesAsync(MmsConnection self, MmsError* mmsError * * \return the domain specific named variable list names or NULL if the request failed. */ -LinkedList /* */ +LIB61850_API LinkedList /* */ MmsConnection_getDomainVariableListNames(MmsConnection self, MmsError* mmsError, const char* domainId); -uint32_t +LIB61850_API uint32_t MmsConnection_getDomainVariableListNamesAsync(MmsConnection self, MmsError* mmsError, const char* domainId, const char* continueAfter, MmsConnection_GetNameListHandler handler, void* parameter); @@ -414,10 +414,10 @@ MmsConnection_getDomainVariableListNamesAsync(MmsConnection self, MmsError* mmsE * * \return the domain specific journal names or NULL if the request failed. */ -LinkedList /* */ +LIB61850_API LinkedList /* */ MmsConnection_getDomainJournals(MmsConnection self, MmsError* mmsError, const char* domainId); -uint32_t +LIB61850_API uint32_t MmsConnection_getDomainJournalsAsync(MmsConnection self, MmsError* mmsError, const char* domainId, const char* continueAfter, MmsConnection_GetNameListHandler handler, void* parameter); @@ -431,10 +431,10 @@ MmsConnection_getDomainJournalsAsync(MmsConnection self, MmsError* mmsError, con * * \return the association specific named variable list names or NULL if the request failed. */ -LinkedList /* */ +LIB61850_API LinkedList /* */ MmsConnection_getVariableListNamesAssociationSpecific(MmsConnection self, MmsError* mmsError); -uint32_t +LIB61850_API uint32_t MmsConnection_getVariableListNamesAssociationSpecificAsync(MmsConnection self, MmsError* mmsError, const char* continueAfter, MmsConnection_GetNameListHandler handler, void* parameter); @@ -451,7 +451,7 @@ MmsConnection_getVariableListNamesAssociationSpecificAsync(MmsConnection self, M * either be a simple value or a complex value or array. It is also possible that the return value is NULL * even if mmsError = MMS_ERROR_NON. This is the case when the servers returns an empty result list. */ -MmsValue* +LIB61850_API MmsValue* MmsConnection_readVariable(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId); @@ -468,7 +468,7 @@ typedef void * * \return invoke ID of the request when the request was sent successfully */ -uint32_t +LIB61850_API uint32_t MmsConnection_readVariableAsync(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId, MmsConnection_ReadVariableHandler handler, void* parameter); @@ -486,7 +486,7 @@ MmsConnection_readVariableAsync(MmsConnection self, MmsError* mmsError, const ch * a simple or complex type if numberOfElements is 0, or an array containing the selected * array elements of numberOfElements > 0. */ -MmsValue* +LIB61850_API MmsValue* MmsConnection_readArrayElements(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId, uint32_t startIndex, uint32_t numberOfElements); @@ -505,7 +505,7 @@ MmsConnection_readArrayElements(MmsConnection self, MmsError* mmsError, const ch * * \return invoke ID of the request when the request was sent successfully */ -uint32_t +LIB61850_API uint32_t MmsConnection_readArrayElementsAsync(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId, uint32_t startIndex, uint32_t numberOfElements, MmsConnection_ReadVariableHandler handler, void* parameter); @@ -523,11 +523,11 @@ MmsConnection_readArrayElementsAsync(MmsConnection self, MmsError* mmsError, con * * \return Returns a MmsValue object or NULL if the request failed. */ -MmsValue* +LIB61850_API MmsValue* MmsConnection_readSingleArrayElementWithComponent(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId, uint32_t index, const char* componentId); -uint32_t +LIB61850_API uint32_t MmsConnection_readSingleArrayElementWithComponentAsync(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId, uint32_t index, const char* componentId, @@ -545,11 +545,11 @@ MmsConnection_readSingleArrayElementWithComponentAsync(MmsConnection self, MmsEr * is of type MMS_ARRAY and contains the variable values of simple or complex type * in the order as they appeared in the item ID list. */ -MmsValue* +LIB61850_API MmsValue* MmsConnection_readMultipleVariables(MmsConnection self, MmsError* mmsError, const char* domainId, LinkedList /**/ items); -uint32_t +LIB61850_API uint32_t MmsConnection_readMultipleVariablesAsync(MmsConnection self, MmsError* mmsError, const char* domainId, LinkedList /**/items, MmsConnection_ReadVariableHandler handler, void* parameter); @@ -567,14 +567,14 @@ MmsConnection_readMultipleVariablesAsync(MmsConnection self, MmsError* mmsError, * * \return when successful, the data access error value returned by the server */ -MmsDataAccessError +LIB61850_API MmsDataAccessError MmsConnection_writeVariable(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId, MmsValue* value); typedef void (*MmsConnection_WriteVariableHandler) (int invokeId, void* parameter, MmsError mmsError, MmsDataAccessError accessError); -uint32_t +LIB61850_API uint32_t MmsConnection_writeVariableAsync(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId, MmsValue* value, MmsConnection_WriteVariableHandler handler, void* parameter); @@ -593,12 +593,12 @@ MmsConnection_writeVariableAsync(MmsConnection self, MmsError* mmsError, * * \return when successful, the data access error value returned by the server */ -MmsDataAccessError +LIB61850_API MmsDataAccessError MmsConnection_writeSingleArrayElementWithComponent(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId, uint32_t arrayIndex, const char* componentId, MmsValue* value); -uint32_t +LIB61850_API uint32_t MmsConnection_writeSingleArrayElementWithComponentAsync(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId, uint32_t arrayIndex, const char* componentId, MmsValue* value, @@ -622,12 +622,12 @@ MmsConnection_writeSingleArrayElementWithComponentAsync(MmsConnection self, MmsE * * \return when successful, the data access error value returned by the server */ -MmsDataAccessError +LIB61850_API MmsDataAccessError MmsConnection_writeArrayElements(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId, int index, int numberOfElements, MmsValue* value); -uint32_t +LIB61850_API uint32_t MmsConnection_writeArrayElementsAsync(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId, int index, int numberOfElements, MmsValue* value, @@ -655,12 +655,12 @@ typedef void * \param[out] the MmsValue objects of type MMS_DATA_ACCESS_ERROR representing the write success of a single variable * write. */ -void +LIB61850_API void MmsConnection_writeMultipleVariables(MmsConnection self, MmsError* mmsError, const char* domainId, LinkedList /**/ items, LinkedList /* */ values, LinkedList* /* */ accessResults); -uint32_t +LIB61850_API uint32_t MmsConnection_writeMultipleVariablesAsync(MmsConnection self, MmsError* mmsError, const char* domainId, LinkedList /**/ items, LinkedList /* */ values, MmsConnection_WriteMultipleVariablesHandler handler, void* parameter); @@ -681,13 +681,13 @@ MmsConnection_writeMultipleVariablesAsync(MmsConnection self, MmsError* mmsError * \param[out] the MmsValue objects of type MMS_DATA_ACCESS_ERROR representing the write success of a single variable * write. */ -void +LIB61850_API void MmsConnection_writeNamedVariableList(MmsConnection self, MmsError* mmsError, bool isAssociationSpecific, const char* domainId, const char* itemId, LinkedList /* */values, LinkedList* /* */accessResults); -uint32_t +LIB61850_API uint32_t MmsConnection_writeNamedVariableListAsync(MmsConnection self, MmsError* mmsError, bool isAssociationSpecific, const char* domainId, const char* itemId, LinkedList /* */values, MmsConnection_WriteMultipleVariablesHandler handler, void* parameter); @@ -702,7 +702,7 @@ MmsConnection_writeNamedVariableListAsync(MmsConnection self, MmsError* mmsError * * \return Returns a MmsTypeSpecification object or NULL if the request failed. */ -MmsVariableSpecification* +LIB61850_API MmsVariableSpecification* MmsConnection_getVariableAccessAttributes(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId); @@ -710,7 +710,7 @@ typedef void (*MmsConnection_GetVariableAccessAttributesHandler) (int invokeId, void* parameter, MmsError mmsError, MmsVariableSpecification* spec); -uint32_t +LIB61850_API uint32_t MmsConnection_getVariableAccessAttributesAsync(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId, MmsConnection_GetVariableAccessAttributesHandler, void* parameter); @@ -731,11 +731,11 @@ MmsConnection_getVariableAccessAttributesAsync(MmsConnection self, MmsError* mms * is of type MMS_ARRAY and contains the variable values of simple or complex type * in the order as they appeared in named variable list definition. */ -MmsValue* +LIB61850_API MmsValue* MmsConnection_readNamedVariableListValues(MmsConnection self, MmsError* mmsError, const char* domainId, const char* listName, bool specWithResult); -uint32_t +LIB61850_API uint32_t MmsConnection_readNamedVariableListValuesAsync(MmsConnection self, MmsError* mmsError, const char* domainId, const char* listName, bool specWithResult, MmsConnection_ReadVariableHandler handler, void* parameter); @@ -753,11 +753,11 @@ MmsConnection_readNamedVariableListValuesAsync(MmsConnection self, MmsError* mms * is of type MMS_ARRAY and contains the variable values of simple or complex type * in the order as they appeared in named variable list definition. */ -MmsValue* +LIB61850_API MmsValue* MmsConnection_readNamedVariableListValuesAssociationSpecific(MmsConnection self, MmsError* mmsError, const char* listName, bool specWithResult); -uint32_t +LIB61850_API uint32_t MmsConnection_readNamedVariableListValuesAssociationSpecificAsync(MmsConnection self, MmsError* mmsError, const char* listName, bool specWithResult, MmsConnection_ReadVariableHandler handler, void* parameter); @@ -775,11 +775,11 @@ MmsConnection_readNamedVariableListValuesAssociationSpecificAsync(MmsConnection * \param variableSpecs a list of variable specifications for the new variable list. The list * elements have to be of type MmsVariableAccessSpecification*. */ -void +LIB61850_API void MmsConnection_defineNamedVariableList(MmsConnection self, MmsError* mmsError, const char* domainId, const char* listName, LinkedList variableSpecs); -uint32_t +LIB61850_API uint32_t MmsConnection_defineNamedVariableListAsync(MmsConnection self, MmsError* mmsError, const char* domainId, const char* listName, LinkedList variableSpecs, MmsConnection_GenericServiceHandler handler, void* parameter); @@ -795,11 +795,11 @@ MmsConnection_defineNamedVariableListAsync(MmsConnection self, MmsError* mmsErro * \param variableSpecs list of variable specifications for the new variable list.The list * elements have to be of type MmsVariableAccessSpecification*. */ -void +LIB61850_API void MmsConnection_defineNamedVariableListAssociationSpecific(MmsConnection self, MmsError* mmsError, const char* listName, LinkedList variableSpecs); -uint32_t +LIB61850_API uint32_t MmsConnection_defineNamedVariableListAssociationSpecificAsync(MmsConnection self, MmsError* mmsError, const char* listName, LinkedList variableSpecs, MmsConnection_GenericServiceHandler handler, void* parameter); @@ -819,7 +819,7 @@ MmsConnection_defineNamedVariableListAssociationSpecificAsync(MmsConnection self * * \return List of names of the variable list entries or NULL if the request failed */ -LinkedList /* */ +LIB61850_API LinkedList /* */ MmsConnection_readNamedVariableListDirectory(MmsConnection self, MmsError* mmsError, const char* domainId, const char* listName, bool* deletable); @@ -828,7 +828,7 @@ typedef void (*MmsConnection_ReadNVLDirectoryHandler) (int invokeId, void* parameter, MmsError mmsError, LinkedList /* */ specs, bool deletable); -uint32_t +LIB61850_API uint32_t MmsConnection_readNamedVariableListDirectoryAsync(MmsConnection self, MmsError* mmsError, const char* domainId, const char* listName, MmsConnection_ReadNVLDirectoryHandler handler, void* parameter); @@ -843,11 +843,11 @@ MmsConnection_readNamedVariableListDirectoryAsync(MmsConnection self, MmsError* * * \return List of names of the variable list entries or NULL if the request failed */ -LinkedList /* */ +LIB61850_API LinkedList /* */ MmsConnection_readNamedVariableListDirectoryAssociationSpecific(MmsConnection self, MmsError* mmsError, const char* listName, bool* deletable); -uint32_t +LIB61850_API uint32_t MmsConnection_readNamedVariableListDirectoryAssociationSpecificAsync(MmsConnection self, MmsError* mmsError, const char* listName, MmsConnection_ReadNVLDirectoryHandler handler, void* parameter); @@ -865,11 +865,11 @@ MmsConnection_readNamedVariableListDirectoryAssociationSpecificAsync(MmsConnecti * * \return true if named variable list has been deleted, false otherwise */ -bool +LIB61850_API bool MmsConnection_deleteNamedVariableList(MmsConnection self, MmsError* mmsError, const char* domainId, const char* listName); -uint32_t +LIB61850_API uint32_t MmsConnection_deleteNamedVariableListAsync(MmsConnection self, MmsError* mmsError, const char* domainId, const char* listName, MmsConnection_GenericServiceHandler handler, void* parameter); @@ -882,12 +882,12 @@ MmsConnection_deleteNamedVariableListAsync(MmsConnection self, MmsError* mmsErro * * \return true if named variable list has been deleted, false otherwise */ -bool +LIB61850_API bool MmsConnection_deleteAssociationSpecificNamedVariableList(MmsConnection self, MmsError* mmsError, const char* listName); -uint32_t +LIB61850_API uint32_t MmsConnection_deleteAssociationSpecificNamedVariableListAsync(MmsConnection self, MmsError* mmsError, const char* listName, MmsConnection_GenericServiceHandler handler, void* parameter); @@ -902,7 +902,7 @@ MmsConnection_deleteAssociationSpecificNamedVariableListAsync(MmsConnection self * * \return reference to the new MmsVariableSpecfication object */ -MmsVariableAccessSpecification* +LIB61850_API MmsVariableAccessSpecification* MmsVariableAccessSpecification_create(char* domainId, char* itemId); /** @@ -921,7 +921,7 @@ MmsVariableAccessSpecification_create(char* domainId, char* itemId); * * \return reference to the new MmsVariableSpecfication object */ -MmsVariableAccessSpecification* +LIB61850_API MmsVariableAccessSpecification* MmsVariableAccessSpecification_createAlternateAccess(char* domainId, char* itemId, int32_t index, char* componentName); @@ -930,7 +930,7 @@ MmsVariableAccessSpecification_createAlternateAccess(char* domainId, char* itemI * * \param self the instance to delete */ -void +LIB61850_API void MmsVariableAccessSpecification_destroy(MmsVariableAccessSpecification* self); /** @@ -942,10 +942,10 @@ MmsVariableAccessSpecification_destroy(MmsVariableAccessSpecification* self); * \param self MmsConnection instance to operate on * \param localDetail the maximum size of the MMS PDU that will be accepted. */ -void +LIB61850_API void MmsConnection_setLocalDetail(MmsConnection self, int32_t localDetail); -int32_t +LIB61850_API int32_t MmsConnection_getLocalDetail(MmsConnection self); /** @@ -957,18 +957,18 @@ MmsConnection_getLocalDetail(MmsConnection self); * \param self MmsConnection instance to operate on * \param mmsError user provided variable to store error code */ -MmsServerIdentity* +LIB61850_API MmsServerIdentity* MmsConnection_identify(MmsConnection self, MmsError* mmsError); typedef void (*MmsConnection_IdentifyHandler) (int invokeId, void* parameter, MmsError mmsError, char* vendorName, char* modelName, char* revision); -uint32_t +LIB61850_API uint32_t MmsConnection_identifyAsync(MmsConnection self, MmsError* mmsError, MmsConnection_IdentifyHandler handler, void* parameter); -void +LIB61850_API void MmsServerIdentity_destroy(MmsServerIdentity* self); /** @@ -983,14 +983,14 @@ MmsServerIdentity_destroy(MmsServerIdentity* self); * \param[out] vmdPhysicalStatus user provided variable to store the physical state of the VMD * \param[in] extendedDerivation instructs the server to invoke self-diagnosis routines to determine server status */ -void +LIB61850_API void MmsConnection_getServerStatus(MmsConnection self, MmsError* mmsError, int* vmdLogicalStatus, int* vmdPhysicalStatus, bool extendedDerivation); typedef void (*MmsConnection_GetServerStatusHandler) (int invokeId, void* parameter, MmsError mmsError, int vmdLogicalStatus, int vmdPhysicalStatus); -uint32_t +LIB61850_API uint32_t MmsConnection_getServerStatusAsync(MmsConnection self, MmsError* mmsError, bool extendedDerivation, MmsConnection_GetServerStatusHandler handler, void* parameter); @@ -1028,14 +1028,14 @@ typedef void * * \return the FRSM ID (file read state machine) handle of the opened file */ -int32_t +LIB61850_API int32_t MmsConnection_fileOpen(MmsConnection self, MmsError* mmsError, const char* filename, uint32_t initialPosition, uint32_t* fileSize, uint64_t* lastModified); typedef void (*MmsConnection_FileOpenHandler) (int invokeId, void* parameter, MmsError mmsError, int32_t frsmId, uint32_t fileSize, uint64_t lastModified); -uint32_t +LIB61850_API uint32_t MmsConnection_fileOpenAsync(MmsConnection self, MmsError* mmsError, const char* filename, uint32_t initialPosition, MmsConnection_FileOpenHandler handler, void* parameter); @@ -1051,10 +1051,10 @@ MmsConnection_fileOpenAsync(MmsConnection self, MmsError* mmsError, const char* * * \return true if more data follows, false if last data has been received. */ -bool +LIB61850_API bool MmsConnection_fileRead(MmsConnection self, MmsError* mmsError, int32_t frsmId, MmsFileReadHandler handler, void* handlerParameter); -uint32_t +LIB61850_API uint32_t MmsConnection_fileReadAsync(MmsConnection self, MmsError* mmsError, int32_t frsmId, MmsConnection_FileReadHandler handler, void* parameter); /** @@ -1064,10 +1064,10 @@ MmsConnection_fileReadAsync(MmsConnection self, MmsError* mmsError, int32_t frsm * \param mmsError user provided variable to store error code * \param frsmId id of the file to close */ -void +LIB61850_API void MmsConnection_fileClose(MmsConnection self, MmsError* mmsError, int32_t frsmId); -uint32_t +LIB61850_API uint32_t MmsConnection_fileCloseAsync(MmsConnection self, MmsError* mmsError, uint32_t frsmId, MmsConnection_GenericServiceHandler handler, void* parameter); /** @@ -1077,10 +1077,10 @@ MmsConnection_fileCloseAsync(MmsConnection self, MmsError* mmsError, uint32_t fr * \param mmsError user provided variable to store error code * \param fileName name of the file to delete */ -void +LIB61850_API void MmsConnection_fileDelete(MmsConnection self, MmsError* mmsError, const char* fileName); -uint32_t +LIB61850_API uint32_t MmsConnection_fileDeleteAsync(MmsConnection self, MmsError* mmsError, const char* fileName, MmsConnection_GenericServiceHandler handler, void* parameter); @@ -1092,10 +1092,10 @@ MmsConnection_fileDeleteAsync(MmsConnection self, MmsError* mmsError, const char * \param currentFileName name of the file to rename * \param newFileName new name of the file */ -void +LIB61850_API void MmsConnection_fileRename(MmsConnection self, MmsError* mmsError, const char* currentFileName, const char* newFileName); -uint32_t +LIB61850_API uint32_t MmsConnection_fileRenameAsync(MmsConnection self, MmsError* mmsError, const char* currentFileName, const char* newFileName, MmsConnection_GenericServiceHandler handler, void* parameter); @@ -1107,10 +1107,10 @@ MmsConnection_fileRenameAsync(MmsConnection self, MmsError* mmsError, const char * \param sourceFile the name of the source file (client side name) * \param destinationFile the name of the destination file (server side name) */ -void +LIB61850_API void MmsConnection_obtainFile(MmsConnection self, MmsError* mmsError, const char* sourceFile, const char* destinationFile); -uint32_t +LIB61850_API uint32_t MmsConnection_obtainFileAsync(MmsConnection self, MmsError* mmsError, const char* sourceFile, const char* destinationFile, MmsConnection_GenericServiceHandler handler, void* parameter); @@ -1130,11 +1130,11 @@ MmsConnection_obtainFileAsync(MmsConnection self, MmsError* mmsError, const char * * \return (more follows) true if more data is available */ -bool +LIB61850_API bool MmsConnection_getFileDirectory(MmsConnection self, MmsError* mmsError, const char* fileSpecification, const char* continueAfter, MmsFileDirectoryHandler handler, void* handlerParameter); -uint32_t +LIB61850_API uint32_t MmsConnection_getFileDirectoryAsync(MmsConnection self, MmsError* mmsError, const char* fileSpecification, const char* continueAfter, MmsConnection_FileDirectoryHandler handler, void* parameter); @@ -1166,41 +1166,41 @@ struct sMmsJournalVariable { * * \param self the MmsJournalEntry instance to destroy */ -void +LIB61850_API void MmsJournalEntry_destroy(MmsJournalEntry self); -const MmsValue* +LIB61850_API const MmsValue* MmsJournalEntry_getEntryID(MmsJournalEntry self); -const MmsValue* +LIB61850_API const MmsValue* MmsJournalEntry_getOccurenceTime(MmsJournalEntry self); -const LinkedList /* */ +LIB61850_API const LinkedList /* */ MmsJournalEntry_getJournalVariables(MmsJournalEntry self); -const char* +LIB61850_API const char* MmsJournalVariable_getTag(MmsJournalVariable self); -const MmsValue* +LIB61850_API const MmsValue* MmsJournalVariable_getValue(MmsJournalVariable self); typedef void (*MmsConnection_ReadJournalHandler) (int invokeId, void* parameter, MmsError mmsError, LinkedList /* */ journalEntries, bool moreFollows); -LinkedList /* */ +LIB61850_API LinkedList /* */ MmsConnection_readJournalTimeRange(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId, MmsValue* startTime, MmsValue* endTime, bool* moreFollows); -uint32_t +LIB61850_API uint32_t MmsConnection_readJournalTimeRangeAsync(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId, MmsValue* startTime, MmsValue* endTime, MmsConnection_ReadJournalHandler handler, void* parameter); -LinkedList /* */ +LIB61850_API LinkedList /* */ MmsConnection_readJournalStartAfter(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId, MmsValue* timeSpecification, MmsValue* entrySpecification, bool* moreFollows); -uint32_t +LIB61850_API uint32_t MmsConnection_readJournalStartAfterAsync(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId, MmsValue* timeSpecification, MmsValue* entrySpecification, MmsConnection_ReadJournalHandler handler, void* parameter); @@ -1209,7 +1209,7 @@ MmsConnection_readJournalStartAfterAsync(MmsConnection self, MmsError* mmsError, * * \param self the object to destroy */ -void +LIB61850_API void MmsServerIdentity_destroy(MmsServerIdentity* self); /**@}*/ diff --git a/src/mms/inc/mms_common.h b/src/mms/inc/mms_common.h index ed5a8836..a60d8f6c 100644 --- a/src/mms/inc/mms_common.h +++ b/src/mms/inc/mms_common.h @@ -1,7 +1,7 @@ /* * mms_common.h * - * Copyright 2013, 2014 Michael Zillgith + * Copyright 2013-2018 Michael Zillgith * * This file is part of libIEC61850. * diff --git a/src/mms/inc/mms_value.h b/src/mms/inc/mms_value.h index 71082009..66f12917 100644 --- a/src/mms/inc/mms_value.h +++ b/src/mms/inc/mms_value.h @@ -1,7 +1,7 @@ /* * mms_value.h * - * Copyright 2013 Michael Zillgith + * Copyright 2013-2018 Michael Zillgith * * This file is part of libIEC61850. * @@ -31,7 +31,6 @@ extern "C" { #include "libiec61850_common_api.h" #include "mms_common.h" #include "mms_types.h" -#include "ber_integer.h" /** * \defgroup common_api_group libIEC61850 API common parts @@ -79,7 +78,7 @@ typedef struct sMmsValue MmsValue; * * \return a newly created array instance */ -MmsValue* +LIB61850_API MmsValue* MmsValue_createArray(MmsVariableSpecification* elementType, int size); /** @@ -89,7 +88,7 @@ MmsValue_createArray(MmsVariableSpecification* elementType, int size); * * \return the size of the array */ -uint32_t +LIB61850_API uint32_t MmsValue_getArraySize(const MmsValue* self); /** @@ -100,7 +99,7 @@ MmsValue_getArraySize(const MmsValue* self); * * \return the element object */ -MmsValue* +LIB61850_API MmsValue* MmsValue_getElement(const MmsValue* array, int index); /** @@ -110,7 +109,7 @@ MmsValue_getElement(const MmsValue* array, int index); * * \return a newly created empty array instance */ -MmsValue* +LIB61850_API MmsValue* MmsValue_createEmptyArray(int size); /** @@ -123,7 +122,7 @@ MmsValue_createEmptyArray(int size); * \param the index of the element to set/replace * \param elementValue the (new) value of the element */ -void +LIB61850_API void MmsValue_setElement(MmsValue* complexValue, int index, MmsValue* elementValue); @@ -131,7 +130,7 @@ MmsValue_setElement(MmsValue* complexValue, int index, MmsValue* elementValue); * Basic type functions *************************************************************************************/ -MmsDataAccessError +LIB61850_API MmsDataAccessError MmsValue_getDataAccessError(const MmsValue* self); /** @@ -141,7 +140,7 @@ MmsValue_getDataAccessError(const MmsValue* self); * * \return signed 64 bit integer */ -int64_t +LIB61850_API int64_t MmsValue_toInt64(const MmsValue* self); /** @@ -151,7 +150,7 @@ MmsValue_toInt64(const MmsValue* self); * * \return signed 32 bit integer */ -int32_t +LIB61850_API int32_t MmsValue_toInt32(const MmsValue* value); /** @@ -161,7 +160,7 @@ MmsValue_toInt32(const MmsValue* value); * * \return unsigned 32 bit integer */ -uint32_t +LIB61850_API uint32_t MmsValue_toUint32(const MmsValue* value); /** @@ -171,7 +170,7 @@ MmsValue_toUint32(const MmsValue* value); * * \return 64 bit floating point value */ -double +LIB61850_API double MmsValue_toDouble(const MmsValue* self); /** @@ -181,7 +180,7 @@ MmsValue_toDouble(const MmsValue* self); * * \return 32 bit floating point value */ -float +LIB61850_API float MmsValue_toFloat(const MmsValue* self); /** @@ -191,7 +190,7 @@ MmsValue_toFloat(const MmsValue* self); * * \return unix timestamp of the MMS_UTCTIME variable. */ -uint32_t +LIB61850_API uint32_t MmsValue_toUnixTimestamp(const MmsValue* self); /** @@ -199,7 +198,7 @@ MmsValue_toUnixTimestamp(const MmsValue* self); * * \param self MmsValue instance to operate on. Has to be of a type MMS_FLOAT. */ -void +LIB61850_API void MmsValue_setFloat(MmsValue* self, float newFloatValue); /** @@ -207,7 +206,7 @@ MmsValue_setFloat(MmsValue* self, float newFloatValue); * * \param self MmsValue instance to operate on. Has to be of a type MMS_FLOAT. */ -void +LIB61850_API void MmsValue_setDouble(MmsValue* self, double newFloatValue); /** @@ -216,7 +215,7 @@ MmsValue_setDouble(MmsValue* self, double newFloatValue); * \param self MmsValue instance to operate on. Has to be of a type MMS_INTEGER. * \param integer the new value to set */ -void +LIB61850_API void MmsValue_setInt8(MmsValue* value, int8_t integer); /** @@ -225,7 +224,7 @@ MmsValue_setInt8(MmsValue* value, int8_t integer); * \param self MmsValue instance to operate on. Has to be of a type MMS_INTEGER. * \param integer the new value to set */ -void +LIB61850_API void MmsValue_setInt16(MmsValue* value, int16_t integer); /** @@ -234,7 +233,7 @@ MmsValue_setInt16(MmsValue* value, int16_t integer); * \param self MmsValue instance to operate on. Has to be of a type MMS_INTEGER. * \param integer the new value to set */ -void +LIB61850_API void MmsValue_setInt32(MmsValue* self, int32_t integer); /** @@ -243,7 +242,7 @@ MmsValue_setInt32(MmsValue* self, int32_t integer); * \param self MmsValue instance to operate on. Has to be of a type MMS_INTEGER. * \param integer the new value to set */ -void +LIB61850_API void MmsValue_setInt64(MmsValue* value, int64_t integer); /** @@ -252,7 +251,7 @@ MmsValue_setInt64(MmsValue* value, int64_t integer); * \param self MmsValue instance to operate on. Has to be of a type MMS_UNSIGNED. * \param integer the new value to set */ -void +LIB61850_API void MmsValue_setUint8(MmsValue* value, uint8_t integer); /** @@ -261,7 +260,7 @@ MmsValue_setUint8(MmsValue* value, uint8_t integer); * \param self MmsValue instance to operate on. Has to be of a type MMS_UNSIGNED. * \param integer the new value to set */ -void +LIB61850_API void MmsValue_setUint16(MmsValue* value, uint16_t integer); /** @@ -270,7 +269,7 @@ MmsValue_setUint16(MmsValue* value, uint16_t integer); * \param self MmsValue instance to operate on. Has to be of a type MMS_UNSIGNED. * \param integer the new value to set */ -void +LIB61850_API void MmsValue_setUint32(MmsValue* value, uint32_t integer); @@ -280,7 +279,7 @@ MmsValue_setUint32(MmsValue* value, uint32_t integer); * \param self MmsValue instance to operate on. Has to be of a type MMS_BOOLEAN. * \param boolValue a bool value */ -void +LIB61850_API void MmsValue_setBoolean(MmsValue* value, bool boolValue); /** @@ -289,7 +288,7 @@ MmsValue_setBoolean(MmsValue* value, bool boolValue); * \param self MmsValue instance to operate on. Has to be of a type MMS_BOOLEAN. * \return the MmsValue value as bool value */ -bool +LIB61850_API bool MmsValue_getBoolean(const MmsValue* value); /** @@ -299,7 +298,7 @@ MmsValue_getBoolean(const MmsValue* value); * * \returns the string value as 0 terminated C string */ -const char* +LIB61850_API const char* MmsValue_toString(MmsValue* self); /** @@ -309,10 +308,10 @@ MmsValue_toString(MmsValue* self); * * \param self MmsValue instance to operate on. Has to be of a type MMS_VISIBLE_STRING or MMS_STRING. */ -int +LIB61850_API int MmsValue_getStringSize(MmsValue* self); -void +LIB61850_API void MmsValue_setVisibleString(MmsValue* self, const char* string); @@ -324,7 +323,7 @@ MmsValue_setVisibleString(MmsValue* self, const char* string); * with position 0 is the first bit if the MmsValue instance is serialized. * \param value the new value of the bit (true = 1 / false = 0) */ -void +LIB61850_API void MmsValue_setBitStringBit(MmsValue* self, int bitPos, bool value); /** @@ -335,7 +334,7 @@ MmsValue_setBitStringBit(MmsValue* self, int bitPos, bool value); * with position 0 is the first bit if the MmsValue instance is serialized. * \return the value of the bit (true = 1 / false = 0) */ -bool +LIB61850_API bool MmsValue_getBitStringBit(const MmsValue* self, int bitPos); /** @@ -343,7 +342,7 @@ MmsValue_getBitStringBit(const MmsValue* self, int bitPos); * * \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING. */ -void +LIB61850_API void MmsValue_deleteAllBitStringBits(MmsValue* self); @@ -352,7 +351,7 @@ MmsValue_deleteAllBitStringBits(MmsValue* self); * * \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING. */ -int +LIB61850_API int MmsValue_getBitStringSize(const MmsValue* self); /** @@ -360,7 +359,7 @@ MmsValue_getBitStringSize(const MmsValue* self); * * \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING. */ -int +LIB61850_API int MmsValue_getBitStringByteSize(const MmsValue* self); /** @@ -368,7 +367,7 @@ MmsValue_getBitStringByteSize(const MmsValue* self); * * \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING. */ -int +LIB61850_API int MmsValue_getNumberOfSetBits(const MmsValue* self); /** @@ -376,7 +375,7 @@ MmsValue_getNumberOfSetBits(const MmsValue* self); * * \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING. */ -void +LIB61850_API void MmsValue_setAllBitStringBits(MmsValue* self); /** @@ -387,7 +386,7 @@ MmsValue_setAllBitStringBits(MmsValue* self); * * \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING. */ -uint32_t +LIB61850_API uint32_t MmsValue_getBitStringAsInteger(const MmsValue* self); /** @@ -399,7 +398,7 @@ MmsValue_getBitStringAsInteger(const MmsValue* self); * \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING. * \param intValue the integer value that is used to set the bit string */ -void +LIB61850_API void MmsValue_setBitStringFromInteger(MmsValue* self, uint32_t intValue); /** @@ -410,7 +409,7 @@ MmsValue_setBitStringFromInteger(MmsValue* self, uint32_t intValue); * * \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING. */ -uint32_t +LIB61850_API uint32_t MmsValue_getBitStringAsIntegerBigEndian(const MmsValue* self); /** @@ -422,7 +421,7 @@ MmsValue_getBitStringAsIntegerBigEndian(const MmsValue* self); * \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING. * \param intValue the integer value that is used to set the bit string */ -void +LIB61850_API void MmsValue_setBitStringFromIntegerBigEndian(MmsValue* self, uint32_t intValue); /** @@ -431,7 +430,7 @@ MmsValue_setBitStringFromIntegerBigEndian(MmsValue* self, uint32_t intValue); * \param self MmsValue instance to operate on. Has to be of a type MMS_BOOLEAN. * \param timeval the new value in seconds since epoch (1970/01/01 00:00 UTC) */ -MmsValue* +LIB61850_API MmsValue* MmsValue_setUtcTime(MmsValue* self, uint32_t timeval); /** @@ -440,7 +439,7 @@ MmsValue_setUtcTime(MmsValue* self, uint32_t timeval); * \param self MmsValue instance to operate on. Has to be of a type MMS_UTCTIME. * \param timeval the new value in milliseconds since epoch (1970/01/01 00:00 UTC) */ -MmsValue* +LIB61850_API MmsValue* MmsValue_setUtcTimeMs(MmsValue* self, uint64_t timeval); /** @@ -451,7 +450,7 @@ MmsValue_setUtcTimeMs(MmsValue* self, uint64_t timeval); * \param self MmsValue instance to operate on. Has to be of a type MMS_UTCTIME. * \param buffer buffer containing the encoded UTCTime. */ -void +LIB61850_API void MmsValue_setUtcTimeByBuffer(MmsValue* self, const uint8_t* buffer); /** @@ -463,7 +462,7 @@ MmsValue_setUtcTimeByBuffer(MmsValue* self, const uint8_t* buffer); * * \return the buffer containing the raw data */ -uint8_t* +LIB61850_API uint8_t* MmsValue_getUtcTimeBuffer(MmsValue* self); /** @@ -473,7 +472,7 @@ MmsValue_getUtcTimeBuffer(MmsValue* self); * * \return the value in milliseconds since epoch (1970/01/01 00:00 UTC) */ -uint64_t +LIB61850_API uint64_t MmsValue_getUtcTimeInMs(const MmsValue* value); /** @@ -484,7 +483,7 @@ MmsValue_getUtcTimeInMs(const MmsValue* value); * * \return the value in milliseconds since epoch (1970/01/01 00:00 UTC) */ -uint64_t +LIB61850_API uint64_t MmsValue_getUtcTimeInMsWithUs(const MmsValue* self, uint32_t* usec); /** @@ -501,7 +500,7 @@ MmsValue_getUtcTimeInMsWithUs(const MmsValue* self, uint32_t* usec); * * \param timeQuality the byte representing the time quality */ -void +LIB61850_API void MmsValue_setUtcTimeQuality(MmsValue* self, uint8_t timeQuality); /** @@ -518,7 +517,7 @@ MmsValue_setUtcTimeQuality(MmsValue* self, uint8_t timeQuality); * * \return the byte representing the time quality */ -uint8_t +LIB61850_API uint8_t MmsValue_getUtcTimeQuality(const MmsValue* self); /** @@ -527,7 +526,7 @@ MmsValue_getUtcTimeQuality(const MmsValue* self); * \param self MmsValue instance to operate on. Has to be of a type MMS_UTCTIME. * \param timeval the new value in milliseconds since epoch (1970/01/01 00:00 UTC) */ -void +LIB61850_API void MmsValue_setBinaryTime(MmsValue* self, uint64_t timestamp); /** @@ -537,7 +536,7 @@ MmsValue_setBinaryTime(MmsValue* self, uint64_t timestamp); * * \return the value in milliseconds since epoch (1970/01/01 00:00 UTC) */ -uint64_t +LIB61850_API uint64_t MmsValue_getBinaryTimeAsUtcMs(const MmsValue* self); /** @@ -551,7 +550,7 @@ MmsValue_getBinaryTimeAsUtcMs(const MmsValue* self); * \param buf the buffer that contains the new value * \param size the size of the buffer that contains the new value */ -void +LIB61850_API void MmsValue_setOctetString(MmsValue* self, uint8_t* buf, int size); /** @@ -561,7 +560,7 @@ MmsValue_setOctetString(MmsValue* self, uint8_t* buf, int size); * * \return size in bytes */ -uint16_t +LIB61850_API uint16_t MmsValue_getOctetStringSize(const MmsValue* self); /** @@ -574,7 +573,7 @@ MmsValue_getOctetStringSize(const MmsValue* self); * * \return maximum size in bytes */ -uint16_t +LIB61850_API uint16_t MmsValue_getOctetStringMaxSize(MmsValue* self); /** @@ -584,7 +583,7 @@ MmsValue_getOctetStringMaxSize(MmsValue* self); * * \return reference to the buffer */ -uint8_t* +LIB61850_API uint8_t* MmsValue_getOctetStringBuffer(MmsValue* self); /** @@ -598,7 +597,7 @@ MmsValue_getOctetStringBuffer(MmsValue* self); * * \return indicates if the update has been successful (false if not) */ -bool +LIB61850_API bool MmsValue_update(MmsValue* self, const MmsValue* source); /** @@ -612,7 +611,7 @@ MmsValue_update(MmsValue* self, const MmsValue* source); * * \return true if both instances are of the same type and have the same value */ -bool +LIB61850_API bool MmsValue_equals(const MmsValue* self, const MmsValue* otherValue); /** @@ -627,7 +626,7 @@ MmsValue_equals(const MmsValue* self, const MmsValue* otherValue); * * \return true if both instances and all their children are of the same type. */ -bool +LIB61850_API bool MmsValue_equalTypes(const MmsValue* self, const MmsValue* otherValue); /************************************************************************************* @@ -635,22 +634,16 @@ MmsValue_equalTypes(const MmsValue* self, const MmsValue* otherValue); *************************************************************************************/ -MmsValue* +LIB61850_API MmsValue* MmsValue_newDataAccessError(MmsDataAccessError accessError); -MmsValue* -MmsValue_newIntegerFromBerInteger(Asn1PrimitiveValue* berInteger); - -MmsValue* -MmsValue_newUnsignedFromBerInteger(Asn1PrimitiveValue* berInteger); - -MmsValue* +LIB61850_API MmsValue* MmsValue_newInteger(int size); -MmsValue* +LIB61850_API MmsValue* MmsValue_newUnsigned(int size); -MmsValue* +LIB61850_API MmsValue* MmsValue_newBoolean(bool boolean); /** @@ -660,40 +653,40 @@ MmsValue_newBoolean(bool boolean); * * \return new MmsValue instance of type MMS_BITSTRING */ -MmsValue* +LIB61850_API MmsValue* MmsValue_newBitString(int bitSize); -MmsValue* +LIB61850_API MmsValue* MmsValue_newOctetString(int size, int maxSize); -MmsValue* +LIB61850_API MmsValue* MmsValue_newStructure(const MmsVariableSpecification* typeSpec); -MmsValue* +LIB61850_API MmsValue* MmsValue_createEmptyStructure(int size); -MmsValue* +LIB61850_API MmsValue* MmsValue_newDefaultValue(const MmsVariableSpecification* typeSpec); -MmsValue* +LIB61850_API MmsValue* MmsValue_newIntegerFromInt8(int8_t integer); -MmsValue* +LIB61850_API MmsValue* MmsValue_newIntegerFromInt16(int16_t integer); -MmsValue* +LIB61850_API MmsValue* MmsValue_newIntegerFromInt32(int32_t integer); -MmsValue* +LIB61850_API MmsValue* MmsValue_newIntegerFromInt64(int64_t integer); -MmsValue* +LIB61850_API MmsValue* MmsValue_newUnsignedFromUint32(uint32_t integer); -MmsValue* +LIB61850_API MmsValue* MmsValue_newFloat(float variable); -MmsValue* +LIB61850_API MmsValue* MmsValue_newDouble(double variable); /** @@ -706,7 +699,7 @@ MmsValue_newDouble(double variable); * * \return an MmsValue instance that is an exact copy of the given instance. */ -MmsValue* +LIB61850_API MmsValue* MmsValue_clone(const MmsValue* self); /** @@ -719,7 +712,7 @@ MmsValue_clone(const MmsValue* self); * * \return a pointer to the position in the buffer just after the last byte written. */ -uint8_t* +LIB61850_API uint8_t* MmsValue_cloneToBuffer(const MmsValue* self, uint8_t* destinationAddress); /** @@ -732,7 +725,7 @@ MmsValue_cloneToBuffer(const MmsValue* self, uint8_t* destinationAddress); * * \return the number of bytes required by a clone */ -int +LIB61850_API int MmsValue_getSizeInMemory(const MmsValue* self); /** @@ -744,7 +737,7 @@ MmsValue_getSizeInMemory(const MmsValue* self); * * \param self the MmsValue instance to be deleted. */ -void +LIB61850_API void MmsValue_delete(MmsValue* self); /** @@ -759,7 +752,7 @@ MmsValue_delete(MmsValue* self); * * \param self the MmsValue instance to be deleted. */ -void +LIB61850_API void MmsValue_deleteConditional(MmsValue* value); /** @@ -771,7 +764,7 @@ MmsValue_deleteConditional(MmsValue* value); * * \param self the MmsValue instance to be deleted. */ -void +LIB61850_API void MmsValue_deleteIfNotNull(MmsValue* value); /** @@ -784,7 +777,7 @@ MmsValue_deleteIfNotNull(MmsValue* value); * * \return new MmsValue instance of type MMS_VISIBLE_STRING */ -MmsValue* +LIB61850_API MmsValue* MmsValue_newVisibleString(const char* string); /** @@ -798,7 +791,7 @@ MmsValue_newVisibleString(const char* string); * * \return new MmsValue instance of type MMS_VISIBLE_STRING */ -MmsValue* +LIB61850_API MmsValue* MmsValue_newVisibleStringWithSize(int size); /** @@ -812,7 +805,7 @@ MmsValue_newVisibleStringWithSize(int size); * * \return new MmsValue instance of type MMS_STRING */ -MmsValue* +LIB61850_API MmsValue* MmsValue_newMmsStringWithSize(int size); /** @@ -826,7 +819,7 @@ MmsValue_newMmsStringWithSize(int size); * * \return new MmsValue instance of type MMS_BINARYTIME */ -MmsValue* +LIB61850_API MmsValue* MmsValue_newBinaryTime(bool timeOfDay); /** @@ -837,7 +830,7 @@ MmsValue_newBinaryTime(bool timeOfDay); * * \return new MmsValue instance of type MMS_VISIBLE_STRING */ -MmsValue* +LIB61850_API MmsValue* MmsValue_newVisibleStringFromByteArray(uint8_t* byteArray, int size); /** @@ -848,7 +841,7 @@ MmsValue_newVisibleStringFromByteArray(uint8_t* byteArray, int size); * * \return new MmsValue instance of type MMS_STRING */ -MmsValue* +LIB61850_API MmsValue* MmsValue_newMmsStringFromByteArray(uint8_t* byteArray, int size); /** @@ -858,10 +851,15 @@ MmsValue_newMmsStringFromByteArray(uint8_t* byteArray, int size); * * \return new MmsValue instance of type MMS_STRING */ -MmsValue* +LIB61850_API MmsValue* MmsValue_newMmsString(char* string); -void +/** + * \brief Set the value of MmsValue instance of type MMS_STRING + * + * \param string a text string that will be the new value of the instance + */ +LIB61850_API void MmsValue_setMmsString(MmsValue* value, const char* string); /** @@ -871,7 +869,7 @@ MmsValue_setMmsString(MmsValue* value, const char* string); * * \return new MmsValue instance of type MMS_UTCTIME */ -MmsValue* +LIB61850_API MmsValue* MmsValue_newUtcTime(uint32_t timeval); /** @@ -881,14 +879,14 @@ MmsValue_newUtcTime(uint32_t timeval); * * \return new MmsValue instance of type MMS_UTCTIME */ -MmsValue* +LIB61850_API MmsValue* MmsValue_newUtcTimeByMsTime(uint64_t timeval); -void +LIB61850_API void MmsValue_setDeletable(MmsValue* self); -void +LIB61850_API void MmsValue_setDeletableRecursive(MmsValue* value); /** @@ -902,7 +900,7 @@ MmsValue_setDeletableRecursive(MmsValue* value); * * \return 1 if deletable flag is set, otherwise 0 */ -int +LIB61850_API int MmsValue_isDeletable(MmsValue* self); /** @@ -910,7 +908,7 @@ MmsValue_isDeletable(MmsValue* self); * * \param self the MmsValue instance */ -MmsType +LIB61850_API MmsType MmsValue_getType(const MmsValue* self); /** @@ -922,7 +920,7 @@ MmsValue_getType(const MmsValue* self); * * \return the sub elements MmsValue instance or NULL if the element does not exist */ -MmsValue* +LIB61850_API MmsValue* MmsValue_getSubElement(MmsValue* self, MmsVariableSpecification* varSpec, char* mmsPath); /** @@ -932,7 +930,7 @@ MmsValue_getSubElement(MmsValue* self, MmsVariableSpecification* varSpec, char* * * \return the value type as a human readable string */ -char* +LIB61850_API char* MmsValue_getTypeString(MmsValue* self); /** @@ -947,7 +945,7 @@ MmsValue_getTypeString(MmsValue* self); * * \return a pointer to the start of the buffer */ -const char* +LIB61850_API const char* MmsValue_printToBuffer(const MmsValue* self, char* buffer, int bufferSize); /** @@ -962,7 +960,7 @@ MmsValue_printToBuffer(const MmsValue* self, char* buffer, int bufferSize); * * \return the MmsValue instance created from the buffer */ -MmsValue* +LIB61850_API MmsValue* MmsValue_decodeMmsData(uint8_t* buffer, int bufPos, int bufferLength, int* endBufPos); /** @@ -976,7 +974,7 @@ MmsValue_decodeMmsData(uint8_t* buffer, int bufPos, int bufferLength, int* endBu * * \return the encoded length of the corresponding MMS data element */ -int +LIB61850_API int MmsValue_encodeMmsData(MmsValue* self, uint8_t* buffer, int bufPos, bool encode); /**@}*/ diff --git a/src/mms/inc_private/acse.h b/src/mms/inc_private/acse.h index 6ad56342..82ee151e 100644 --- a/src/mms/inc_private/acse.h +++ b/src/mms/inc_private/acse.h @@ -68,19 +68,19 @@ typedef struct sAcseConnection #define ACSE_RESULT_REJECT_PERMANENT 1 #define ACSE_RESULT_REJECT_TRANSIENT 2 -void +LIB61850_INTERNAL void AcseConnection_init(AcseConnection* self, AcseAuthenticator authenticator, void* parameter, TLSSocket tlsSocket); -void +LIB61850_INTERNAL void AcseConnection_destroy(AcseConnection* self); -AcseIndication +LIB61850_INTERNAL AcseIndication AcseConnection_parseMessage(AcseConnection* self, ByteBuffer* message); -void +LIB61850_INTERNAL void AcseConnection_createAssociateFailedMessage(AcseConnection* connection, BufferChain writeBuffer); -void +LIB61850_INTERNAL void AcseConnection_createAssociateResponseMessage( AcseConnection* self, uint8_t resultCode, @@ -88,20 +88,20 @@ AcseConnection_createAssociateResponseMessage( BufferChain payloadBuffer ); -void +LIB61850_INTERNAL void AcseConnection_createAssociateRequestMessage(AcseConnection* self, IsoConnectionParameters isoParameters, BufferChain writeBuffer, BufferChain payload, AcseAuthenticationParameter authParameter); -void +LIB61850_INTERNAL void AcseConnection_createAbortMessage(AcseConnection* self, BufferChain writeBuffer, bool isProvider); -void +LIB61850_INTERNAL void AcseConnection_createReleaseRequestMessage(AcseConnection* self, BufferChain writeBuffer); -void +LIB61850_INTERNAL void AcseConnection_createReleaseResponseMessage(AcseConnection* self, BufferChain writeBuffer); #endif /* ACSE_H_ */ diff --git a/src/mms/inc/asn1_ber_primitive_value.h b/src/mms/inc_private/asn1_ber_primitive_value.h similarity index 87% rename from src/mms/inc/asn1_ber_primitive_value.h rename to src/mms/inc_private/asn1_ber_primitive_value.h index 5821b605..c4456cf0 100644 --- a/src/mms/inc/asn1_ber_primitive_value.h +++ b/src/mms/inc_private/asn1_ber_primitive_value.h @@ -1,7 +1,7 @@ /* * asn1_ber_primitive_value.h * - * Copyright 2013 Michael Zillgith + * Copyright 2013-2018 Michael Zillgith * * This file is part of libIEC61850. * @@ -37,22 +37,22 @@ typedef struct ATTRIBUTE_PACKED { uint8_t* octets; } Asn1PrimitiveValue; -Asn1PrimitiveValue* +LIB61850_INTERNAL Asn1PrimitiveValue* Asn1PrimitiveValue_create(int size); -int +LIB61850_INTERNAL int Asn1PrimitiveValue_getSize(Asn1PrimitiveValue* self); -int +LIB61850_INTERNAL int Asn1PrimitiveValue_getMaxSize(Asn1PrimitiveValue* self); -Asn1PrimitiveValue* +LIB61850_INTERNAL Asn1PrimitiveValue* Asn1PrimitiveValue_clone(Asn1PrimitiveValue* self); -bool +LIB61850_INTERNAL bool Asn1PrimitivaValue_compare(Asn1PrimitiveValue* self, Asn1PrimitiveValue* otherValue); -void +LIB61850_INTERNAL void Asn1PrimitiveValue_destroy(Asn1PrimitiveValue* self); #ifdef __cplusplus diff --git a/src/mms/inc_private/ber_decode.h b/src/mms/inc_private/ber_decode.h index 56f3ed28..a3083816 100644 --- a/src/mms/inc_private/ber_decode.h +++ b/src/mms/inc_private/ber_decode.h @@ -1,7 +1,7 @@ /* * ber_decode.h * - * Copyright 2013 Michael Zillgith + * Copyright 2013-2018 Michael Zillgith * * This file is part of libIEC61850. * @@ -26,27 +26,28 @@ #include "libiec61850_platform_includes.h" -int +LIB61850_INTERNAL int BerDecoder_decodeLength(uint8_t* buffer, int* length, int bufPos, int maxBufPos); -char* + +LIB61850_INTERNAL char* BerDecoder_decodeString(uint8_t* buffer, int strlen, int bufPos, int maxBufPos); -uint32_t +LIB61850_INTERNAL uint32_t BerDecoder_decodeUint32(uint8_t* buffer, int intlen, int bufPos); -int32_t +LIB61850_INTERNAL int32_t BerDecoder_decodeInt32(uint8_t* buffer, int intlen, int bufPos); -float +LIB61850_INTERNAL float BerDecoder_decodeFloat(uint8_t* buffer, int bufPos); -double +LIB61850_INTERNAL double BerDecoder_decodeDouble(uint8_t* buffer, int bufPos); -bool +LIB61850_INTERNAL bool BerDecoder_decodeBoolean(uint8_t* buffer, int bufPos); -void +LIB61850_INTERNAL void BerDecoder_decodeOID(uint8_t* buffer, int bufPos, int length, ItuObjectIdentifier* oid); #endif /* BER_DECODER_H_ */ diff --git a/src/mms/inc_private/ber_encoder.h b/src/mms/inc_private/ber_encoder.h index ff4b26d6..9f88b168 100644 --- a/src/mms/inc_private/ber_encoder.h +++ b/src/mms/inc_private/ber_encoder.h @@ -1,7 +1,7 @@ /* * ber_encoder.h * - * Copyright 2013 Michael Zillgith + * Copyright 2013-2018 Michael Zillgith * * This file is part of libIEC61850. * @@ -34,40 +34,40 @@ * of the next entity to encode. */ -int +LIB61850_INTERNAL int BerEncoder_encodeLength(uint32_t length, uint8_t* buffer, int bufPos); -int +LIB61850_INTERNAL int BerEncoder_encodeTL(uint8_t tag, uint32_t length, uint8_t* buffer, int bufPos); -int +LIB61850_INTERNAL int BerEncoder_encodeBoolean(uint8_t tag, bool value, uint8_t* buffer, int bufPos); -int +LIB61850_INTERNAL int BerEncoder_encodeStringWithTag(uint8_t tag, const char* string, uint8_t* buffer, int bufPos); -int +LIB61850_INTERNAL int BerEncoder_encodeOctetString(uint8_t tag, uint8_t* octetString, uint32_t octetStringSize, uint8_t* buffer, int bufPos); -int +LIB61850_INTERNAL int BerEncoder_encodeAsn1PrimitiveValue(uint8_t tag, Asn1PrimitiveValue* value, uint8_t* buffer, int bufPos); -int +LIB61850_INTERNAL int BerEncoder_encodeUInt32(uint32_t value, uint8_t* buffer, int bufPos); -int +LIB61850_INTERNAL int BerEncoder_encodeInt32(int32_t value, uint8_t* buffer, int bufPos); -int +LIB61850_INTERNAL int BerEncoder_encodeUInt32WithTL(uint8_t tag, uint32_t value, uint8_t* buffer, int bufPos); -int +LIB61850_INTERNAL int BerEncoder_encodeBitString(uint8_t tag, int bitStringSize, uint8_t* bitString, uint8_t* buffer, int bufPos); -int +LIB61850_INTERNAL int BerEncoder_determineEncodedBitStringSize(int bitStringSize); -int +LIB61850_INTERNAL int BerEncoder_encodeFloat(uint8_t* floatValue, uint8_t formatWidth, uint8_t exponentWidth, uint8_t* buffer, int bufPos); @@ -75,29 +75,29 @@ BerEncoder_encodeFloat(uint8_t* floatValue, uint8_t formatWidth, uint8_t exponen * functions to determine size of encoded entities. */ -int +LIB61850_INTERNAL int BerEncoder_UInt32determineEncodedSize(uint32_t value); -int +LIB61850_INTERNAL int BerEncoder_determineLengthSize(uint32_t length); -int +LIB61850_INTERNAL int BerEncoder_determineEncodedStringSize(const char* string); -int +LIB61850_INTERNAL int BerEncoder_determineEncodedBitStringSize(int bitStringSize); /* * helper functions */ -int +LIB61850_INTERNAL int BerEncoder_encodeOIDToBuffer(const char* oidString, uint8_t* buffer, int maxBufLen); -void +LIB61850_INTERNAL void BerEncoder_revertByteOrder(uint8_t* octets, const int size); -int +LIB61850_INTERNAL int BerEncoder_compressInteger(uint8_t* integer, int originalSize); #endif /* BER_ENCODER_H_ */ diff --git a/src/mms/inc/ber_integer.h b/src/mms/inc_private/ber_integer.h similarity index 74% rename from src/mms/inc/ber_integer.h rename to src/mms/inc_private/ber_integer.h index 32e32ca7..0e751bb5 100644 --- a/src/mms/inc/ber_integer.h +++ b/src/mms/inc_private/ber_integer.h @@ -1,7 +1,7 @@ /* * ber_integer.h * - * Copyright 2013 Michael Zillgith + * Copyright 2013-2018 Michael Zillgith * * This file is part of libIEC61850. * @@ -30,49 +30,49 @@ extern "C" { #endif -Asn1PrimitiveValue* +LIB61850_INTERNAL Asn1PrimitiveValue* BerInteger_createFromBuffer(uint8_t* buf, int size); -Asn1PrimitiveValue* +LIB61850_INTERNAL Asn1PrimitiveValue* BerInteger_createInt32(void); -int +LIB61850_INTERNAL int BerInteger_setFromBerInteger(Asn1PrimitiveValue* self, Asn1PrimitiveValue* value); -int +LIB61850_INTERNAL int BerInteger_setInt32(Asn1PrimitiveValue* self, int32_t value); -Asn1PrimitiveValue* +LIB61850_INTERNAL Asn1PrimitiveValue* BerInteger_createFromInt32(int32_t value); -int +LIB61850_INTERNAL int BerInteger_setUint8(Asn1PrimitiveValue* self, uint8_t value); -int +LIB61850_INTERNAL int BerInteger_setUint16(Asn1PrimitiveValue* self, uint16_t value); -int +LIB61850_INTERNAL int BerInteger_setUint32(Asn1PrimitiveValue* self, uint32_t value); -Asn1PrimitiveValue* +LIB61850_INTERNAL Asn1PrimitiveValue* BerInteger_createFromUint32(uint32_t value); -Asn1PrimitiveValue* +LIB61850_INTERNAL Asn1PrimitiveValue* BerInteger_createFromInt64(int64_t value); -Asn1PrimitiveValue* +LIB61850_INTERNAL Asn1PrimitiveValue* BerInteger_createInt64(void); -int +LIB61850_INTERNAL int BerInteger_setInt64(Asn1PrimitiveValue* self, int64_t value); -int /* 1 - if conversion is possible, 0 - out of range */ +LIB61850_INTERNAL int /* 1 - if conversion is possible, 0 - out of range */ BerInteger_toInt32(Asn1PrimitiveValue* self, int32_t* nativeValue); -int /* 1 - if conversion is possible, 0 - out of range */ +LIB61850_INTERNAL int /* 1 - if conversion is possible, 0 - out of range */ BerInteger_toUint32(Asn1PrimitiveValue* self, uint32_t* nativeValue); -int /* 1 - if conversion is possible, 0 - out of range */ +LIB61850_INTERNAL int /* 1 - if conversion is possible, 0 - out of range */ BerInteger_toInt64(Asn1PrimitiveValue* self, int64_t* nativeValue); #ifdef __cplusplus diff --git a/src/mms/inc_private/cotp.h b/src/mms/inc_private/cotp.h index 188d5282..f15e2e45 100644 --- a/src/mms/inc_private/cotp.h +++ b/src/mms/inc_private/cotp.h @@ -71,41 +71,41 @@ typedef enum { TPKT_ERROR = 2 } TpktState; -int /* in byte */ +LIB61850_INTERNAL int /* in byte */ CotpConnection_getTpduSize(CotpConnection* self); -void +LIB61850_INTERNAL void CotpConnection_setTpduSize(CotpConnection* self, int tpduSize /* in byte */); -void +LIB61850_INTERNAL void CotpConnection_init(CotpConnection* self, Socket socket, ByteBuffer* payloadBuffer, ByteBuffer* readBuffer, ByteBuffer* writeBuffer); -CotpIndication +LIB61850_INTERNAL CotpIndication CotpConnection_parseIncomingMessage(CotpConnection* self); -void +LIB61850_INTERNAL void CotpConnection_resetPayload(CotpConnection* self); -TpktState +LIB61850_INTERNAL TpktState CotpConnection_readToTpktBuffer(CotpConnection* self); -CotpIndication +LIB61850_INTERNAL CotpIndication CotpConnection_sendConnectionRequestMessage(CotpConnection* self, IsoConnectionParameters isoParameters); -CotpIndication +LIB61850_INTERNAL CotpIndication CotpConnection_sendConnectionResponseMessage(CotpConnection* self); -CotpIndication +LIB61850_INTERNAL CotpIndication CotpConnection_sendDataMessage(CotpConnection* self, BufferChain payload); -ByteBuffer* +LIB61850_INTERNAL ByteBuffer* CotpConnection_getPayload(CotpConnection* self); -int +LIB61850_INTERNAL int CotpConnection_getRemoteRef(CotpConnection* self); -int +LIB61850_INTERNAL int CotpConnection_getLocalRef(CotpConnection* self); #endif /* COTP_H_ */ diff --git a/src/mms/inc_private/iso_client_connection.h b/src/mms/inc_private/iso_client_connection.h index dfaa26ce..022ac6a9 100644 --- a/src/mms/inc_private/iso_client_connection.h +++ b/src/mms/inc_private/iso_client_connection.h @@ -52,13 +52,13 @@ typedef void* */ typedef struct sIsoClientConnection* IsoClientConnection; -IsoClientConnection +LIB61850_INTERNAL IsoClientConnection IsoClientConnection_create(IsoConnectionParameters parameters, IsoIndicationCallback callback, void* callbackParameter); -void +LIB61850_INTERNAL void IsoClientConnection_destroy(IsoClientConnection self); -bool +LIB61850_INTERNAL bool IsoClientConnection_associateAsync(IsoClientConnection self, uint32_t connectTimeoutInMs); /** @@ -66,10 +66,10 @@ IsoClientConnection_associateAsync(IsoClientConnection self, uint32_t connectTim * * \return value indicates that connection is currently waiting and calling thread can be suspended */ -bool +LIB61850_INTERNAL bool IsoClientConnection_handleConnection(IsoClientConnection self); -void +LIB61850_INTERNAL void IsoClientConnection_associate(IsoClientConnection self, uint32_t connectTimeoutInMs); /** @@ -77,37 +77,35 @@ IsoClientConnection_associate(IsoClientConnection self, uint32_t connectTimeoutI * * \param payload message to send */ -void +LIB61850_INTERNAL void IsoClientConnection_sendMessage(IsoClientConnection self, ByteBuffer* payload); -void +LIB61850_INTERNAL void IsoClientConnection_release(IsoClientConnection self); /** * \brief Send ACSE abort message and wait until connection is closed by server or timeout occurred */ -void +LIB61850_INTERNAL void IsoClientConnection_abortAsync(IsoClientConnection self); -void +LIB61850_INTERNAL void IsoClientConnection_close(IsoClientConnection self); /** * This function should be called by the API client (usually the MmsConnection) to reserve(allocate) * the payload buffer. This is used to prevent concurrent access to the send buffer of the IsoClientConnection */ -ByteBuffer* +LIB61850_INTERNAL ByteBuffer* IsoClientConnection_allocateTransmitBuffer(IsoClientConnection self); /** * This function is used to release the transmit buffer in case a formerly allocated transmit buffer cannot * be sent. */ -void +LIB61850_INTERNAL void IsoClientConnection_releaseTransmitBuffer(IsoClientConnection self); -void* -IsoClientConnection_getSecurityToken(IsoClientConnection self); #ifdef __cplusplus } diff --git a/src/mms/inc_private/iso_presentation.h b/src/mms/inc_private/iso_presentation.h index ea3d153b..8f46f5b8 100644 --- a/src/mms/inc_private/iso_presentation.h +++ b/src/mms/inc_private/iso_presentation.h @@ -37,32 +37,32 @@ typedef struct { ByteBuffer nextPayload; } IsoPresentation; -void +LIB61850_INTERNAL void IsoPresentation_init(IsoPresentation* session); -int +LIB61850_INTERNAL int IsoPresentation_parseUserData(IsoPresentation* session, ByteBuffer* message); -int +LIB61850_INTERNAL int IsoPresentation_parseConnect(IsoPresentation* session, ByteBuffer* message); -void +LIB61850_INTERNAL void IsoPresentation_createConnectPdu(IsoPresentation* self, IsoConnectionParameters parameters, BufferChain buffer, BufferChain payload); -void +LIB61850_INTERNAL void IsoPresentation_createCpaMessage(IsoPresentation* self, BufferChain writeBuffer, BufferChain payload); -void +LIB61850_INTERNAL void IsoPresentation_createUserData(IsoPresentation* self, BufferChain writeBuffer, BufferChain payload); -void +LIB61850_INTERNAL void IsoPresentation_createUserDataACSE(IsoPresentation* self, BufferChain writeBuffer, BufferChain payload); -int +LIB61850_INTERNAL int IsoPresentation_parseAcceptMessage(IsoPresentation* self, ByteBuffer* byteBuffer); -void +LIB61850_INTERNAL void IsoPresentation_createAbortUserMessage(IsoPresentation* self, BufferChain writeBuffer, BufferChain payload); #endif /* ISO_PRESENTATION_H_ */ diff --git a/src/mms/inc/iso_server.h b/src/mms/inc_private/iso_server.h similarity index 85% rename from src/mms/inc/iso_server.h rename to src/mms/inc_private/iso_server.h index 849df2cf..b6707a58 100644 --- a/src/mms/inc/iso_server.h +++ b/src/mms/inc_private/iso_server.h @@ -66,17 +66,17 @@ typedef void typedef void (*MessageReceivedHandler)(void* parameter, ByteBuffer* message, ByteBuffer* response); -char* +LIB61850_INTERNAL char* IsoConnection_getPeerAddress(IsoConnection self); -void +LIB61850_INTERNAL void IsoConnection_close(IsoConnection self); -void +LIB61850_INTERNAL void IsoConnection_installListener(IsoConnection self, MessageReceivedHandler handler, void* parameter); -void* +LIB61850_INTERNAL void* IsoConnection_getSecurityToken(IsoConnection self); /** @@ -85,66 +85,65 @@ IsoConnection_getSecurityToken(IsoConnection self); * \param handlerMode specifies if this function is used in the context of the connection handling thread * (handlerMode) */ -void +LIB61850_INTERNAL void IsoConnection_sendMessage(IsoConnection self, ByteBuffer* message, bool handlerMode); -IsoServer +LIB61850_INTERNAL IsoServer IsoServer_create(TLSConfiguration tlsConfiguration); -void +LIB61850_INTERNAL void IsoServer_setTcpPort(IsoServer self, int port); -void +LIB61850_INTERNAL void IsoServer_setMaxConnections(IsoServer self, int maxConnections); -void +LIB61850_INTERNAL void IsoServer_setLocalIpAddress(IsoServer self, const char* ipAddress); -IsoServerState +LIB61850_INTERNAL IsoServerState IsoServer_getState(IsoServer self); -void +LIB61850_INTERNAL void IsoServer_setConnectionHandler(IsoServer self, ConnectionIndicationHandler handler, void* parameter); -void +LIB61850_INTERNAL void IsoServer_setAuthenticator(IsoServer self, AcseAuthenticator authenticator, void* authenticatorParameter); -AcseAuthenticator +LIB61850_INTERNAL AcseAuthenticator IsoServer_getAuthenticator(IsoServer self); -void* +LIB61850_INTERNAL void* IsoServer_getAuthenticatorParameter(IsoServer self); -TLSConfiguration +LIB61850_INTERNAL TLSConfiguration IsoServer_getTLSConfiguration(IsoServer self); -void +LIB61850_INTERNAL void IsoServer_startListening(IsoServer self); -void +LIB61850_INTERNAL void IsoServer_stopListening(IsoServer self); - -void +LIB61850_INTERNAL void IsoServer_startListeningThreadless(IsoServer self); /** * for non-threaded operation */ -void +LIB61850_INTERNAL void IsoServer_processIncomingMessages(IsoServer self); -int +LIB61850_INTERNAL int IsoServer_waitReady(IsoServer self, unsigned int timeoutMs); -void +LIB61850_INTERNAL void IsoServer_stopListeningThreadless(IsoServer self); -void +LIB61850_INTERNAL void IsoServer_closeConnection(IsoServer self, IsoConnection isoConnection); -void +LIB61850_INTERNAL void IsoServer_destroy(IsoServer self); #ifdef __cplusplus diff --git a/src/mms/inc_private/iso_server_private.h b/src/mms/inc_private/iso_server_private.h index e700c9ec..dfe0d17a 100644 --- a/src/mms/inc_private/iso_server_private.h +++ b/src/mms/inc_private/iso_server_private.h @@ -1,7 +1,7 @@ /* * iso_server_private.h * - * Copyright 2013 Michael Zillgith + * Copyright 2013-2018 Michael Zillgith * * This file is part of libIEC61850. * @@ -27,40 +27,40 @@ #include "tls_config.h" #include "hal_socket.h" -IsoConnection +LIB61850_INTERNAL IsoConnection IsoConnection_create(Socket socket, IsoServer isoServer); -void +LIB61850_INTERNAL void IsoConnection_destroy(IsoConnection self); -void +LIB61850_INTERNAL void IsoConnection_handleTcpConnection(IsoConnection self); -void +LIB61850_INTERNAL void IsoConnection_addHandleSet(const IsoConnection self, HandleSet handles); -void +LIB61850_INTERNAL void private_IsoServer_increaseConnectionCounter(IsoServer self); -void +LIB61850_INTERNAL void private_IsoServer_decreaseConnectionCounter(IsoServer self); -int +LIB61850_INTERNAL int private_IsoServer_getConnectionCounter(IsoServer self); /** * \brief User provided lock that will be called when higher layer (MMS) is called */ -void +LIB61850_INTERNAL void IsoServer_setUserLock(IsoServer self, Semaphore userLock); -void +LIB61850_INTERNAL void IsoServer_userLock(IsoServer self); -void +LIB61850_INTERNAL void IsoServer_userUnlock(IsoServer self); -bool +LIB61850_INTERNAL bool IsoConnection_isRunning(IsoConnection self); #endif /* ISO_SERVER_PRIVATE_H_ */ diff --git a/src/mms/inc_private/iso_session.h b/src/mms/inc_private/iso_session.h index f041cf79..93a0e01c 100644 --- a/src/mms/inc_private/iso_session.h +++ b/src/mms/inc_private/iso_session.h @@ -48,31 +48,31 @@ typedef enum { SESSION_NOT_FINISHED } IsoSessionIndication; -void +LIB61850_INTERNAL void IsoSession_init(IsoSession* session); -ByteBuffer* +LIB61850_INTERNAL ByteBuffer* IsoSession_getUserData(IsoSession* session); -void +LIB61850_INTERNAL void IsoSession_createConnectSpdu(IsoSession* self, IsoConnectionParameters isoParameters, BufferChain buffer, BufferChain payload); -IsoSessionIndication +LIB61850_INTERNAL IsoSessionIndication IsoSession_parseMessage(IsoSession* session, ByteBuffer* message); -void +LIB61850_INTERNAL void IsoSession_createDataSpdu(IsoSession* session, BufferChain buffer, BufferChain payload); -void +LIB61850_INTERNAL void IsoSession_createAcceptSpdu(IsoSession* self, BufferChain buffer, BufferChain payload); -void +LIB61850_INTERNAL void IsoSession_createAbortSpdu(IsoSession* self, BufferChain buffer, BufferChain payload); -void +LIB61850_INTERNAL void IsoSession_createFinishSpdu(IsoSession* self, BufferChain buffer, BufferChain payload); -void +LIB61850_INTERNAL void IsoSession_createDisconnectSpdu(IsoSession* self, BufferChain buffer, BufferChain payload); #endif /* ISE_SESSION_H_ */ diff --git a/src/mms/inc_private/mms_client_internal.h b/src/mms/inc_private/mms_client_internal.h index 00e5978d..008ed5d0 100644 --- a/src/mms/inc_private/mms_client_internal.h +++ b/src/mms/inc_private/mms_client_internal.h @@ -158,218 +158,217 @@ typedef enum { MMS_OBJECT_CLASS_DOMAIN = 9 } MmsObjectClass; -char* +LIB61850_INTERNAL char* MmsConnection_getFilestoreBasepath(MmsConnection self); -MmsValue* +LIB61850_INTERNAL MmsValue* mmsClient_parseListOfAccessResults(AccessResult_t** accessResultList, int listSize, bool createArray); -uint32_t +LIB61850_INTERNAL uint32_t mmsClient_getInvokeId(ConfirmedResponsePdu_t* confirmedResponse); -int +LIB61850_INTERNAL int mmsClient_write_out(void *buffer, size_t size, void *app_key); -void +LIB61850_INTERNAL void mmsClient_createInitiateRequest(MmsConnection self, ByteBuffer* writeBuffer); -MmsPdu_t* +LIB61850_INTERNAL MmsPdu_t* mmsClient_createConfirmedRequestPdu(uint32_t invokeId); -AlternateAccess_t* +LIB61850_INTERNAL AlternateAccess_t* mmsClient_createAlternateAccess(uint32_t index, uint32_t elementCount); -void +LIB61850_INTERNAL void mmsClient_deleteAlternateAccess(AlternateAccess_t* alternateAccess); -void +LIB61850_INTERNAL void mmsClient_deleteAlternateAccessIndexComponent(AlternateAccess_t* alternateAccess); -AlternateAccess_t* +LIB61850_INTERNAL AlternateAccess_t* mmsClient_createAlternateAccessIndexComponent(uint32_t index, const char* componentName); -int +LIB61850_INTERNAL int mmsClient_createMmsGetNameListRequestVMDspecific(long invokeId, ByteBuffer* writeBuffer, const char* continueAfter); -bool +LIB61850_INTERNAL bool mmsClient_parseGetNameListResponse(LinkedList* nameList, ByteBuffer* message); -int +LIB61850_INTERNAL int mmsClient_createGetNameListRequestDomainOrVMDSpecific(long invokeId, const char* domainName, ByteBuffer* writeBuffer, MmsObjectClass objectClass, const char* continueAfter); -MmsValue* +LIB61850_INTERNAL MmsValue* mmsClient_parseReadResponse(ByteBuffer* message, uint32_t* invokeId, bool createArray); -int +LIB61850_INTERNAL int mmsClient_createReadRequest(uint32_t invokeId, const char* domainId, const char* itemId, ByteBuffer* writeBuffer); -int +LIB61850_INTERNAL int mmsClient_createReadRequestAlternateAccessIndex(uint32_t invokeId, const char* domainId, const char* itemId, uint32_t index, uint32_t elementCount, ByteBuffer* writeBuffer); -int +LIB61850_INTERNAL int mmsClient_createReadRequestAlternateAccessSingleIndexComponent(uint32_t invokeId, const char* domainId, const char* itemId, uint32_t index, const char* component, ByteBuffer* writeBuffer); -int +LIB61850_INTERNAL int mmsClient_createReadRequestMultipleValues(uint32_t invokeId, const char* domainId, LinkedList /**/ items, ByteBuffer* writeBuffer); -int +LIB61850_INTERNAL int mmsClient_createReadNamedVariableListRequest(uint32_t invokeId, const char* domainId, const char* itemId, ByteBuffer* writeBuffer, bool specWithResult); -int +LIB61850_INTERNAL int mmsClient_createReadAssociationSpecificNamedVariableListRequest( uint32_t invokeId, const char* itemId, ByteBuffer* writeBuffer, bool specWithResult); -void +LIB61850_INTERNAL void mmsClient_createGetNamedVariableListAttributesRequest(uint32_t invokeId, ByteBuffer* writeBuffer, const char* domainId, const char* listNameId); -void +LIB61850_INTERNAL void mmsClient_createGetNamedVariableListAttributesRequestAssociationSpecific(uint32_t invokeId, ByteBuffer* writeBuffer, const char* listNameId); -LinkedList +LIB61850_INTERNAL LinkedList mmsClient_parseGetNamedVariableListAttributesResponse(ByteBuffer* message, uint32_t* invokeId, bool* /*OUT*/ deletable); -int +LIB61850_INTERNAL int mmsClient_createGetVariableAccessAttributesRequest( uint32_t invokeId, const char* domainId, const char* itemId, ByteBuffer* writeBuffer); -MmsVariableSpecification* +LIB61850_INTERNAL MmsVariableSpecification* mmsClient_parseGetVariableAccessAttributesResponse(ByteBuffer* message, uint32_t* invokeId); -MmsDataAccessError +LIB61850_INTERNAL MmsDataAccessError mmsClient_parseWriteResponse(ByteBuffer* message, int32_t bufPos, MmsError* mmsError); -void +LIB61850_INTERNAL void mmsClient_parseWriteMultipleItemsResponse(ByteBuffer* message, int32_t bufPos, MmsError* mmsError, int itemCount, LinkedList* accessResults); -int +LIB61850_INTERNAL int mmsClient_createWriteRequest(uint32_t invokeId, const char* domainId, const char* itemId, MmsValue* value, ByteBuffer* writeBuffer); -int +LIB61850_INTERNAL int mmsClient_createWriteMultipleItemsRequest(uint32_t invokeId, const char* domainId, LinkedList itemIds, LinkedList values, ByteBuffer* writeBuffer); -int +LIB61850_INTERNAL int mmsClient_createWriteRequestNamedVariableList(uint32_t invokeId, bool isAssociationSpecific, const char* domainId, const char* itemId, LinkedList values, ByteBuffer* writeBuffer); -int +LIB61850_INTERNAL int mmsClient_createWriteRequestArray(uint32_t invokeId, const char* domainId, const char* itemId, int startIndex, int elementCount, MmsValue* value, ByteBuffer* writeBuffer); -int +LIB61850_INTERNAL int mmsClient_createWriteRequestAlternateAccessSingleIndexComponent(uint32_t invokeId, const char* domainId, const char* itemId, uint32_t arrayIndex, const char* component, MmsValue* value, ByteBuffer* writeBuffer); -void +LIB61850_INTERNAL void mmsClient_createDefineNamedVariableListRequest(uint32_t invokeId, ByteBuffer* writeBuffer, const char* domainId, const char* listNameId, LinkedList /**/ listOfVariables, bool associationSpecific); -bool +LIB61850_INTERNAL bool mmsClient_parseDefineNamedVariableResponse(ByteBuffer* message, uint32_t* invokeId); -void +LIB61850_INTERNAL void mmsClient_createDeleteNamedVariableListRequest(long invokeId, ByteBuffer* writeBuffer, const char* domainId, const char* listNameId); -bool +LIB61850_INTERNAL bool mmsClient_parseDeleteNamedVariableListResponse(ByteBuffer* message, uint32_t* invokeId); -void +LIB61850_INTERNAL void mmsClient_createDeleteAssociationSpecificNamedVariableListRequest( long invokeId, ByteBuffer* writeBuffer, const char* listNameId); -void +LIB61850_INTERNAL void mmsClient_createIdentifyRequest(uint32_t invokeId, ByteBuffer* request); -bool +LIB61850_INTERNAL bool mmsClient_parseIdentifyResponse(MmsConnection self, ByteBuffer* response, uint32_t bufPos, uint32_t invokeId, MmsConnection_IdentifyHandler handler, void* parameter); -void +LIB61850_INTERNAL void mmsClient_createStatusRequest(uint32_t invokeId, ByteBuffer* request, bool extendedDerivation); -bool +LIB61850_INTERNAL bool mmsClient_parseStatusResponse(MmsConnection self, ByteBuffer* response, int bufPos, int* vmdLogicalStatus, int* vmdPhysicalStatus); -void +LIB61850_INTERNAL void mmsClient_createFileOpenRequest(uint32_t invokeId, ByteBuffer* request, const char* fileName, uint32_t initialPosition); -void +LIB61850_INTERNAL void mmsClient_createFileReadRequest(uint32_t invokeId, ByteBuffer* request, int32_t frsmId); -void +LIB61850_INTERNAL void mmsClient_createFileCloseRequest(uint32_t invokeId, ByteBuffer* request, int32_t frsmId); -void +LIB61850_INTERNAL void mmsClient_createFileRenameRequest(uint32_t invokeId, ByteBuffer* request, const char* currentFileName, const char* newFileName); -void +LIB61850_INTERNAL void mmsClient_createObtainFileRequest(uint32_t invokeId, ByteBuffer* request, const char* sourceFile, const char* destinationFile); -void +LIB61850_INTERNAL void mmsClient_createFileDeleteRequest(uint32_t invokeId, ByteBuffer* request, const char* fileName); -void +LIB61850_INTERNAL void mmsClient_createFileDirectoryRequest(uint32_t invokeId, ByteBuffer* request, const char* fileSpecification, const char* continueAfter); -bool +LIB61850_INTERNAL bool mmsClient_parseFileDirectoryResponse(ByteBuffer* response, int bufPos, uint32_t invokeId, MmsConnection_FileDirectoryHandler handler, void* parameter); -bool +LIB61850_INTERNAL bool mmsClient_parseInitiateResponse(MmsConnection self, ByteBuffer* response); -int +LIB61850_INTERNAL int mmsClient_createConcludeRequest(MmsConnection self, ByteBuffer* message); -int +LIB61850_INTERNAL int mmsClient_createMmsGetNameListRequestAssociationSpecific(long invokeId, ByteBuffer* writeBuffer, const char* continueAfter); -void +LIB61850_INTERNAL void mmsClient_createReadJournalRequestWithTimeRange(uint32_t invokeId, ByteBuffer* request, const char* domainId, const char* itemId, MmsValue* startingTime, MmsValue* endingTime); -void +LIB61850_INTERNAL void mmsClient_createReadJournalRequestStartAfter(uint32_t invokeId, ByteBuffer* request, const char* domainId, const char* itemId, MmsValue* timeSpecification, MmsValue* entrySpecification); -bool +LIB61850_INTERNAL bool mmsClient_parseReadJournalResponse(MmsConnection self, ByteBuffer* response, int respBufPos, bool* moreFollows, LinkedList* result); - -void +LIB61850_INTERNAL void mmsClient_handleFileOpenRequest(MmsConnection connection, uint8_t* buffer, int bufPos, int maxBufPos, uint32_t invokeId, ByteBuffer* response); -void +LIB61850_INTERNAL void mmsClient_handleFileReadRequest( MmsConnection connection, uint8_t* buffer, int bufPos, int maxBufPos, uint32_t invokeId, ByteBuffer* response); -void +LIB61850_INTERNAL void mmsClient_handleFileCloseRequest( MmsConnection connection, uint8_t* buffer, int bufPos, int maxBufPos, diff --git a/src/mms/inc_private/mms_common_internal.h b/src/mms/inc_private/mms_common_internal.h index 6abbbc13..a9dfcc2e 100644 --- a/src/mms/inc_private/mms_common_internal.h +++ b/src/mms/inc_private/mms_common_internal.h @@ -52,28 +52,28 @@ typedef struct { /* include for MmsFileReadHandler definition */ #include "mms_client_connection.h" -bool +LIB61850_INTERNAL bool mmsMsg_parseFileOpenResponse(uint8_t* buffer, int bufPos, int maxBufPos, int32_t* frsmId, uint32_t* fileSize, uint64_t* lastModified); -bool +LIB61850_INTERNAL bool mmsMsg_parseFileReadResponse(uint8_t* buffer, int bufPos, int maxBufPos, bool* moreFollows, uint8_t** dataBuffer, int* dataLength); -void +LIB61850_INTERNAL void mmsMsg_createFileReadResponse(int maxPduSize, uint32_t invokeId, ByteBuffer* response, MmsFileReadStateMachine* frsm); -void +LIB61850_INTERNAL void mmsMsg_createFileCloseResponse(uint32_t invokeId, ByteBuffer* response); -void +LIB61850_INTERNAL void mmsMsg_createFileOpenResponse(const char* basepath, uint32_t invokeId, ByteBuffer* response, char* fullPath, MmsFileReadStateMachine* frsm); -bool +LIB61850_INTERNAL bool mmsMsg_parseFileName(char* filename, uint8_t* buffer, int* bufPos, int maxBufPos , uint32_t invokeId, ByteBuffer* response); -void +LIB61850_INTERNAL void mmsMsg_createExtendedFilename(const char* basepath, char* extendedFileName, char* fileName); -FileHandle +LIB61850_INTERNAL FileHandle mmsMsg_openFile(const char* basepath, char* fileName, bool readWrite); #endif /* (MMS_FILE_SERVICE == 1) */ @@ -84,34 +84,34 @@ typedef struct sMmsServiceError } MmsServiceError; -void /* Confirmed service error (ServiceError) */ +LIB61850_INTERNAL void /* Confirmed service error (ServiceError) */ mmsMsg_createServiceErrorPdu(uint32_t invokeId, ByteBuffer* response, MmsError errorType); -void +LIB61850_INTERNAL void mmsMsg_createMmsRejectPdu(uint32_t* invokeId, int reason, ByteBuffer* response); -int +LIB61850_INTERNAL int mmsMsg_parseConfirmedErrorPDU(uint8_t* buffer, int bufPos, int maxBufPos, uint32_t* invokeId, MmsServiceError* serviceError); -int +LIB61850_INTERNAL int mmsMsg_parseRejectPDU(uint8_t* buffer, int bufPos, int maxBufPos, uint32_t* invokeId, int* rejectType, int* rejectReason); -MmsValue* +LIB61850_INTERNAL MmsValue* mmsMsg_parseDataElement(Data_t* dataElement); -Data_t* +LIB61850_INTERNAL Data_t* mmsMsg_createBasicDataElement(MmsValue* value); -AccessResult_t** +LIB61850_INTERNAL AccessResult_t** mmsMsg_createAccessResultsList(MmsPdu_t* mmsPdu, int resultsCount); -char* +LIB61850_INTERNAL char* mmsMsg_createStringFromAsnIdentifier(Identifier_t identifier); -void +LIB61850_INTERNAL void mmsMsg_copyAsn1IdentifierToStringBuffer(Identifier_t identifier, char* buffer, int bufSize); -void +LIB61850_INTERNAL void mmsMsg_deleteAccessResultList(AccessResult_t** accessResult, int variableCount); #endif /* MMS_COMMON_INTERNAL */ diff --git a/src/mms/inc/mms_device_model.h b/src/mms/inc_private/mms_device_model.h similarity index 89% rename from src/mms/inc/mms_device_model.h rename to src/mms/inc_private/mms_device_model.h index 9c697e75..617013cd 100644 --- a/src/mms/inc/mms_device_model.h +++ b/src/mms/inc_private/mms_device_model.h @@ -1,7 +1,7 @@ /* * mms_model.h * - * Copyright 2013 Michael Zillgith + * Copyright 2013-2018 Michael Zillgith * * This file is part of libIEC61850. * @@ -84,16 +84,16 @@ struct sMmsDomain { * * \return the new MmsDomain instance */ -MmsDomain* +LIB61850_INTERNAL MmsDomain* MmsDomain_create(char* domainName); -char* +LIB61850_INTERNAL char* MmsDomain_getName(MmsDomain* self); -void +LIB61850_INTERNAL void MmsDomain_addJournal(MmsDomain* self, const char* name); -MmsJournal +LIB61850_INTERNAL MmsJournal MmsDomain_getJournal(MmsDomain* self, const char* name); /** @@ -101,7 +101,7 @@ MmsDomain_getJournal(MmsDomain* self, const char* name); * * This method should not be invoked by client code! */ -void +LIB61850_INTERNAL void MmsDomain_destroy(MmsDomain* self); /** @@ -116,7 +116,7 @@ MmsDomain_destroy(MmsDomain* self); * * \return true if operation was successful. */ -bool +LIB61850_INTERNAL bool MmsDomain_addNamedVariableList(MmsDomain* self, MmsNamedVariableList variableList); /** @@ -128,19 +128,19 @@ MmsDomain_addNamedVariableList(MmsDomain* self, MmsNamedVariableList variableLis * \param variableListName the name of the variable list to delete. * */ -void +LIB61850_INTERNAL void MmsDomain_deleteNamedVariableList(MmsDomain* self, char* variableListName); -MmsNamedVariableList +LIB61850_INTERNAL MmsNamedVariableList MmsDomain_getNamedVariableList(MmsDomain* self, const char* variableListName); -LinkedList +LIB61850_INTERNAL LinkedList MmsDomain_getNamedVariableLists(MmsDomain* self); -LinkedList +LIB61850_INTERNAL LinkedList MmsDomain_getNamedVariableListValues(MmsDomain* self, char* variableListName); -LinkedList +LIB61850_INTERNAL LinkedList MmsDomain_createNamedVariableListValues(MmsDomain* self, char* variableListName); /** @@ -151,7 +151,7 @@ MmsDomain_createNamedVariableListValues(MmsDomain* self, char* variableListName) * * \return MmsTypeSpecification instance of the named variable */ -MmsVariableSpecification* +LIB61850_INTERNAL MmsVariableSpecification* MmsDomain_getNamedVariable(MmsDomain* self, char* nameId); /** @@ -165,13 +165,13 @@ MmsDomain_getNamedVariable(MmsDomain* self, char* nameId); * * \return the new MmsDevice instance */ -MmsDevice* +LIB61850_INTERNAL MmsDevice* MmsDevice_create(char* deviceName); /** * \brief Delete the MmsDevice instance */ -void +LIB61850_INTERNAL void MmsDevice_destroy(MmsDevice* self); /** @@ -181,7 +181,7 @@ MmsDevice_destroy(MmsDevice* self); * * \return the new MmsDevice instance */ -MmsDomain* +LIB61850_INTERNAL MmsDomain* MmsDevice_getDomain(MmsDevice* self, const char* domainId); /** @@ -192,19 +192,19 @@ MmsDevice_getDomain(MmsDevice* self, const char* domainId); * * \return MmsTypeSpecification instance of the named variable */ -MmsVariableSpecification* +LIB61850_INTERNAL MmsVariableSpecification* MmsDevice_getNamedVariable(MmsDevice* self, char* variableName); -LinkedList +LIB61850_INTERNAL LinkedList MmsDevice_getNamedVariableLists(MmsDevice* self); -MmsNamedVariableList +LIB61850_INTERNAL MmsNamedVariableList MmsDevice_getNamedVariableListWithName(MmsDevice* self, const char* variableListName); -MmsJournal +LIB61850_INTERNAL MmsJournal MmsJournal_create(const char* name); -void +LIB61850_INTERNAL void MmsJournal_destroy(MmsJournal self); /**@}*/ diff --git a/src/mms/inc/mms_named_variable_list.h b/src/mms/inc_private/mms_named_variable_list.h similarity index 84% rename from src/mms/inc/mms_named_variable_list.h rename to src/mms/inc_private/mms_named_variable_list.h index 15e7d16a..f1409d95 100644 --- a/src/mms/inc/mms_named_variable_list.h +++ b/src/mms/inc_private/mms_named_variable_list.h @@ -1,7 +1,7 @@ /* * mms_named_variable_list.h * - * Copyright 2013 Michael Zillgith + * Copyright 2013-2018 Michael Zillgith * * This file is part of libIEC61850. * @@ -43,37 +43,37 @@ struct sMmsNamedVariableList { LinkedList listOfVariables; }; -MmsNamedVariableListEntry +LIB61850_INTERNAL MmsNamedVariableListEntry MmsNamedVariableListEntry_create(MmsAccessSpecifier accessSpecifier); -void +LIB61850_INTERNAL void MmsNamedVariableListEntry_destroy(MmsNamedVariableListEntry self); -MmsDomain* +LIB61850_INTERNAL MmsDomain* MmsNamedVariableListEntry_getDomain(MmsNamedVariableListEntry self); -char* +LIB61850_INTERNAL char* MmsNamedVariableListEntry_getVariableName(MmsNamedVariableListEntry self); -MmsNamedVariableList +LIB61850_INTERNAL MmsNamedVariableList MmsNamedVariableList_create(MmsDomain* domain, char* name, bool deletable); -char* +LIB61850_INTERNAL char* MmsNamedVariableList_getName(MmsNamedVariableList self); -MmsDomain* +LIB61850_INTERNAL MmsDomain* MmsNamedVariableList_getDomain(MmsNamedVariableList self); -bool +LIB61850_INTERNAL bool MmsNamedVariableList_isDeletable(MmsNamedVariableList self); -void +LIB61850_INTERNAL void MmsNamedVariableList_addVariable(MmsNamedVariableList self, MmsNamedVariableListEntry variable); -LinkedList +LIB61850_INTERNAL LinkedList MmsNamedVariableList_getVariableList(MmsNamedVariableList self); -void +LIB61850_INTERNAL void MmsNamedVariableList_destroy(MmsNamedVariableList self); /**@}*/ diff --git a/src/mms/inc/mms_server.h b/src/mms/inc_private/mms_server.h similarity index 94% rename from src/mms/inc/mms_server.h rename to src/mms/inc_private/mms_server.h index bf06de20..18462503 100644 --- a/src/mms/inc/mms_server.h +++ b/src/mms/inc_private/mms_server.h @@ -1,7 +1,7 @@ /* * mms_server.h * - * Copyright 2013, 2014 Michael Zillgith + * Copyright 2013-2018 Michael Zillgith * * This file is part of libIEC61850. * @@ -63,46 +63,46 @@ typedef MmsDataAccessError (*MmsWriteVariableHandler)(void* parameter, typedef void (*MmsConnectionHandler)(void* parameter, MmsServerConnection connection, MmsServerEvent event); -MmsServer +LIB61850_INTERNAL MmsServer MmsServer_create(MmsDevice* device, TLSConfiguration tlsConfiguration); -void +LIB61850_INTERNAL void MmsServer_destroy(MmsServer self); -void +LIB61850_INTERNAL void MmsServer_installReadHandler(MmsServer self, MmsReadVariableHandler, void* parameter); -void +LIB61850_INTERNAL void MmsServer_installReadAccessHandler(MmsServer self, MmsReadAccessHandler, void* parameter); -void +LIB61850_INTERNAL void MmsServer_installWriteHandler(MmsServer self, MmsWriteVariableHandler, void* parameter); -void +LIB61850_INTERNAL void MmsServer_setLocalIpAddress(MmsServer self, const char* localIpAddress); -bool +LIB61850_INTERNAL bool MmsServer_isRunning(MmsServer self); /** * A connection handler will be invoked whenever a new client connection is opened or closed */ -void +LIB61850_INTERNAL void MmsServer_installConnectionHandler(MmsServer self, MmsConnectionHandler, void* parameter); -void +LIB61850_INTERNAL void MmsServer_setClientAuthenticator(MmsServer self, AcseAuthenticator authenticator, void* authenticatorParameter); -MmsDevice* +LIB61850_INTERNAL MmsDevice* MmsServer_getDevice(MmsServer self); -MmsValue* +LIB61850_INTERNAL MmsValue* MmsServer_getValueFromCache(MmsServer self, MmsDomain* domain, const char* itemId); -bool +LIB61850_INTERNAL bool MmsServer_isLocked(MmsServer self); /** @@ -127,7 +127,7 @@ typedef MmsError (*MmsNamedVariableListChangedHandler)(void* parameter, bool cre * \param handler the callback handler function * \param parameter user provided parameter that is passed to the callback handler */ -void +LIB61850_INTERNAL void MmsServer_installVariableListChangedHandler(MmsServer self, MmsNamedVariableListChangedHandler handler, void* parameter); /** @@ -152,7 +152,7 @@ typedef bool (*MmsObtainFileHandler)(void* parameter, MmsServerConnection connec * \param handler the callback handler function * \param parameter user provided parameter that is passed to the callback handler */ -void +LIB61850_INTERNAL void MmsServer_installObtainFileHandler(MmsServer self, MmsObtainFileHandler handler, void* parameter); /** @@ -174,7 +174,7 @@ typedef void (*MmsGetFileCompleteHandler)(void* parameter, MmsServerConnection c * \param handler the callback handler function * \param parameter user provided parameter that is passed to the callback handler */ -void +LIB61850_INTERNAL void MmsServer_installGetFileCompleteHandler(MmsServer self, MmsGetFileCompleteHandler handler, void* parameter); @@ -209,7 +209,7 @@ typedef MmsError (*MmsFileAccessHandler) (void* parameter, MmsServerConnection c * \param handler the callback handler function * \param parameter user provided parameter that is passed to the callback handler */ -void +LIB61850_INTERNAL void MmsServer_installFileAccessHandler(MmsServer self, MmsFileAccessHandler handler, void* parameter); /** @@ -222,7 +222,7 @@ MmsServer_installFileAccessHandler(MmsServer self, MmsFileAccessHandler handler, * \param self the MmsServer instance * \param basepath the new virtual filestore basepath */ -void +LIB61850_INTERNAL void MmsServer_setFilestoreBasepath(MmsServer self, const char* basepath); /** @@ -230,7 +230,7 @@ MmsServer_setFilestoreBasepath(MmsServer self, const char* basepath); * * \param[in] maxConnections the maximum number of TCP client connections to accept */ -void +LIB61850_INTERNAL void MmsServer_setMaxConnections(MmsServer self, int maxConnections); /** @@ -241,7 +241,7 @@ MmsServer_setMaxConnections(MmsServer self, int maxConnections); * \param[in] self the MmsServer instance * \param[in] enable true to enable file services, false to disable */ -void +LIB61850_INTERNAL void MmsServer_enableFileService(MmsServer self, bool enable); /** @@ -252,7 +252,7 @@ MmsServer_enableFileService(MmsServer self, bool enable); * \param[in] self the MmsServer instance * \param[in] enable true to enable named variable list services, false to disable */ -void +LIB61850_INTERNAL void MmsServer_enableDynamicNamedVariableListService(MmsServer self, bool enable); /** @@ -261,7 +261,7 @@ MmsServer_enableDynamicNamedVariableListService(MmsServer self, bool enable); * \param[in] self the MmsServer instance * \param[in] maxDataSets maximum number association specific data sets */ -void +LIB61850_INTERNAL void MmsServer_setMaxAssociationSpecificDataSets(MmsServer self, int maxDataSets); /** @@ -270,7 +270,7 @@ MmsServer_setMaxAssociationSpecificDataSets(MmsServer self, int maxDataSets); * \param[in] self the MmsServer instance * \param[in] maxDataSets maximum number domain specific data sets */ -void +LIB61850_INTERNAL void MmsServer_setMaxDomainSpecificDataSets(MmsServer self, int maxDataSets); /** @@ -279,7 +279,7 @@ MmsServer_setMaxDomainSpecificDataSets(MmsServer self, int maxDataSets); * \param[in] self the MmsServer instance * \param[in] maxDataSetEntries maximum number of dynamic data set entries */ -void +LIB61850_INTERNAL void MmsServer_setMaxDataSetEntries(MmsServer self, int maxDataSetEntries); /** @@ -290,7 +290,7 @@ MmsServer_setMaxDataSetEntries(MmsServer self, int maxDataSetEntries); * \param[in] self the MmsServer instance * \param[in] enable true to enable journal service, false to disable */ -void +LIB61850_INTERNAL void MmsServer_enableJournalService(MmsServer self, bool enable); /** @@ -302,7 +302,7 @@ MmsServer_enableJournalService(MmsServer self, bool enable); * * \param self the MmsServer instance to operate on */ -void +LIB61850_INTERNAL void MmsServer_lockModel(MmsServer self); /** @@ -313,10 +313,10 @@ MmsServer_lockModel(MmsServer self); * * \param self the MmsServer instance to operate on */ -void +LIB61850_INTERNAL void MmsServer_unlockModel(MmsServer self); -void +LIB61850_INTERNAL void MmsServer_insertIntoCache(MmsServer self, MmsDomain* domain, char* itemId, MmsValue* value); @@ -330,7 +330,7 @@ MmsServer_insertIntoCache(MmsServer self, MmsDomain* domain, char* itemId, * \param self the MmsServer instance to operate on * \param tcpPort the TCP port the server is listening on. */ -void +LIB61850_INTERNAL void MmsServer_startListening(MmsServer self, int tcpPort); /** @@ -338,7 +338,7 @@ MmsServer_startListening(MmsServer self, int tcpPort); * * \param self the MmsServer instance to operate on */ -void +LIB61850_INTERNAL void MmsServer_stopListening(MmsServer self); /*************************************************** @@ -351,7 +351,7 @@ MmsServer_stopListening(MmsServer self); * \param self the MmsServer instance to operate on * \param tcpPort the TCP port the server is listening on. */ -void +LIB61850_INTERNAL void MmsServer_startListeningThreadless(MmsServer self, int tcpPort); /** @@ -361,7 +361,7 @@ MmsServer_startListeningThreadless(MmsServer self, int tcpPort); * \param timeoutMs maximum number of milliseconds to wait * \return 1 if the server is ready, 0 if not or -1 on error */ -int +LIB61850_INTERNAL int MmsServer_waitReady(MmsServer self, unsigned int timeoutMs); /** @@ -372,7 +372,7 @@ MmsServer_waitReady(MmsServer self, unsigned int timeoutMs); * * \param self the MmsServer instance to operate on */ -void +LIB61850_INTERNAL void MmsServer_handleIncomingMessages(MmsServer self); /** @@ -380,7 +380,7 @@ MmsServer_handleIncomingMessages(MmsServer self); * * \param self the MmsServer instance to operate on */ -void +LIB61850_INTERNAL void MmsServer_handleBackgroundTasks(MmsServer self); /** @@ -388,7 +388,7 @@ MmsServer_handleBackgroundTasks(MmsServer self); * * \param self the MmsServer instance to operate on */ -void +LIB61850_INTERNAL void MmsServer_stopListeningThreadless(MmsServer self); @@ -407,7 +407,7 @@ MmsServer_stopListeningThreadless(MmsServer self); * \param modelName the model name attribute of the VMD * \param revision the revision attribute of the VMD */ -void +LIB61850_INTERNAL void MmsServer_setServerIdentity(MmsServer self, char* vendorName, char* modelName, char* revision); /** @@ -416,7 +416,7 @@ MmsServer_setServerIdentity(MmsServer self, char* vendorName, char* modelName, c * \param self the MmsServer instance to operate on * \return the vendor name attribute of the VMD as C string */ -char* +LIB61850_INTERNAL char* MmsServer_getVendorName(MmsServer self); /** @@ -425,7 +425,7 @@ MmsServer_getVendorName(MmsServer self); * \param self the MmsServer instance to operate on * \return the model name attribute of the VMD as C string */ -char* +LIB61850_INTERNAL char* MmsServer_getModelName(MmsServer self); /** @@ -434,7 +434,7 @@ MmsServer_getModelName(MmsServer self); * \param self the MmsServer instance to operate on * \return the revision attribute of the VMD as C string */ -char* +LIB61850_INTERNAL char* MmsServer_getRevision(MmsServer self); /*************************************************** @@ -471,7 +471,7 @@ typedef void (*MmsStatusRequestListener)(void* parameter, MmsServer mmsServer, M * \param vmdLogicalStatus the logical status attribute of the VMD * \param vmdPhysicalStatus the physical status attribute of the VMD */ -void +LIB61850_INTERNAL void MmsServer_setVMDStatus(MmsServer self, int vmdLogicalStatus, int vmdPhysicalStatus); /** @@ -479,7 +479,7 @@ MmsServer_setVMDStatus(MmsServer self, int vmdLogicalStatus, int vmdPhysicalStat * * \param self the MmsServer instance to operate on */ -int +LIB61850_INTERNAL int MmsServer_getVMDLogicalStatus(MmsServer self); /** @@ -487,7 +487,7 @@ MmsServer_getVMDLogicalStatus(MmsServer self); * * \param self the MmsServer instance to operate on */ -int +LIB61850_INTERNAL int MmsServer_getVMDPhysicalStatus(MmsServer self); /** @@ -501,13 +501,13 @@ MmsServer_getVMDPhysicalStatus(MmsServer self); * \param listener the listener that is called when a MMS status request is received * \param parameter a user provided parameter that is handed over to the listener */ -void +LIB61850_INTERNAL void MmsServer_setStatusRequestListener(MmsServer self, MmsStatusRequestListener listener, void* parameter); -char* +LIB61850_INTERNAL char* MmsServerConnection_getClientAddress(MmsServerConnection self); -IsoConnection +LIB61850_INTERNAL IsoConnection MmsServerConnection_getIsoConnection(MmsServerConnection self); diff --git a/src/mms/inc_private/mms_server_connection.h b/src/mms/inc_private/mms_server_connection.h index b39028da..02564e95 100644 --- a/src/mms/inc_private/mms_server_connection.h +++ b/src/mms/inc_private/mms_server_connection.h @@ -1,7 +1,7 @@ /* * mms_server_connection.h * - * Copyright 2013 Michael Zillgith + * Copyright 2013-2018 Michael Zillgith * * This file is part of libIEC61850. * @@ -42,29 +42,29 @@ extern "C" { #endif -MmsServerConnection +LIB61850_INTERNAL MmsServerConnection MmsServerConnection_init(MmsServerConnection connection, MmsServer server, IsoConnection isoCon); -void +LIB61850_INTERNAL void MmsServerConnection_destroy(MmsServerConnection connection); -bool +LIB61850_INTERNAL bool MmsServerConnection_addNamedVariableList(MmsServerConnection self, MmsNamedVariableList variableList); -MmsNamedVariableList +LIB61850_INTERNAL MmsNamedVariableList MmsServerConnection_getNamedVariableList(MmsServerConnection self, const char* variableListName); -LinkedList +LIB61850_INTERNAL LinkedList MmsServerConnection_getNamedVariableLists(MmsServerConnection self); -void +LIB61850_INTERNAL void MmsServerConnection_deleteNamedVariableList(MmsServerConnection self, char* listName); /** \brief send information report for a single VMD specific variable * * \param handlerMode send this message in the context of a stack callback handler */ -void +LIB61850_INTERNAL void MmsServerConnection_sendInformationReportSingleVariableVMDSpecific(MmsServerConnection self, char* itemId, MmsValue* value, bool handlerMode); @@ -73,7 +73,7 @@ MmsServerConnection_sendInformationReportSingleVariableVMDSpecific(MmsServerConn * * \param handlerMode send this message in the context of a stack callback handler */ -void /* send information report for a VMD specific named variable list */ +LIB61850_INTERNAL void /* send information report for a VMD specific named variable list */ MmsServerConnection_sendInformationReportVMDSpecific(MmsServerConnection self, char* itemId, LinkedList values , bool handlerMode); @@ -81,7 +81,7 @@ MmsServerConnection_sendInformationReportVMDSpecific(MmsServerConnection self, c * * \param handlerMode send this message in the context of a stack callback handler */ -void +LIB61850_INTERNAL void MmsServerConnection_sendInformationReportListOfVariables( MmsServerConnection self, LinkedList /* MmsVariableAccessSpecification */ variableAccessDeclarations, @@ -89,18 +89,18 @@ MmsServerConnection_sendInformationReportListOfVariables( bool handlerMode ); -void +LIB61850_INTERNAL void MmsServerConnection_sendWriteResponse(MmsServerConnection self, uint32_t invokeId, MmsDataAccessError indication, bool handlerMode); -uint32_t +LIB61850_INTERNAL uint32_t MmsServerConnection_getLastInvokeId(MmsServerConnection self); -uint32_t +LIB61850_INTERNAL uint32_t MmsServerConnection_getNextRequestInvokeId(MmsServerConnection self); -const char* +LIB61850_INTERNAL const char* MmsServerConnection_getFilesystemBasepath(MmsServerConnection self); #ifdef __cplusplus diff --git a/src/mms/inc_private/mms_server_internal.h b/src/mms/inc_private/mms_server_internal.h index 7a9155f4..9ee08749 100644 --- a/src/mms/inc_private/mms_server_internal.h +++ b/src/mms/inc_private/mms_server_internal.h @@ -200,99 +200,99 @@ struct sMmsServerConnection { }; #if (MMS_OBTAIN_FILE_SERVICE == 1) -MmsObtainFileTask +LIB61850_INTERNAL MmsObtainFileTask MmsServer_getObtainFileTask(MmsServer self); -void +LIB61850_INTERNAL void mmsServer_fileUploadTask(MmsServer self, MmsObtainFileTask task); #endif -ByteBuffer* +LIB61850_INTERNAL ByteBuffer* MmsServer_reserveTransmitBuffer(MmsServer self); -void +LIB61850_INTERNAL void MmsServer_releaseTransmitBuffer(MmsServer self); /* write_out function required for ASN.1 encoding */ -int +LIB61850_INTERNAL int mmsServer_write_out(const void *buffer, size_t size, void *app_key); -void +LIB61850_INTERNAL void mmsServer_handleDeleteNamedVariableListRequest(MmsServerConnection connection, uint8_t* buffer, int bufPos, int maxBufPos, uint32_t invokeId, ByteBuffer* response); -void +LIB61850_INTERNAL void mmsServer_handleGetNamedVariableListAttributesRequest( MmsServerConnection connection, uint8_t* buffer, int bufPos, int maxBufPos, uint32_t invokeId, ByteBuffer* response); -void +LIB61850_INTERNAL void mmsServer_handleReadRequest( MmsServerConnection connection, uint8_t* buffer, int bufPos, int maxBufPos, uint32_t invokeId, ByteBuffer* response); -MmsPdu_t* +LIB61850_INTERNAL MmsPdu_t* mmsServer_createConfirmedResponse(uint32_t invokeId); -void +LIB61850_INTERNAL void mmsMsg_createServiceErrorPdu(uint32_t invokeId, ByteBuffer* response, MmsError errorType); -void +LIB61850_INTERNAL void mmsServer_createServiceErrorPduWithServiceSpecificInfo(uint32_t invokeId, ByteBuffer* response, MmsError errorType, uint8_t* serviceSpecificInfo, int serviceSpecficInfoLength); -void +LIB61850_INTERNAL void mmsServer_writeConcludeResponsePdu(ByteBuffer* response); -void +LIB61850_INTERNAL void mmsServer_handleInitiateRequest ( MmsServerConnection self, uint8_t* buffer, int bufPos, int maxBufPos, ByteBuffer* response); -int +LIB61850_INTERNAL int mmsServer_handleGetVariableAccessAttributesRequest( MmsServerConnection connection, uint8_t* buffer, int bufPos, int maxBufPos, uint32_t invokeId, ByteBuffer* response); -void +LIB61850_INTERNAL void mmsServer_handleDefineNamedVariableListRequest( MmsServerConnection connection, uint8_t* buffer, int bufPos, int maxBufPos, uint32_t invokeId, ByteBuffer* response); -void +LIB61850_INTERNAL void mmsServer_handleGetNameListRequest( MmsServerConnection connection, uint8_t* buffer, int bufPos, int maxBufPos, uint32_t invokeId, ByteBuffer* response); -void +LIB61850_INTERNAL void mmsServer_handleWriteRequest( MmsServerConnection connection, uint8_t* buffer, int bufPos, int maxBufPos, uint32_t invokeId, ByteBuffer* response); -void +LIB61850_INTERNAL void mmsServer_handleIdentifyRequest( MmsServerConnection connection, uint32_t invokeId, ByteBuffer* response); -void +LIB61850_INTERNAL void mmsServer_handleStatusRequest( MmsServerConnection connection, uint8_t* requestBuffer, @@ -300,7 +300,7 @@ mmsServer_handleStatusRequest( uint32_t invokeId, ByteBuffer* response); -void +LIB61850_INTERNAL void mmsServer_handleReadJournalRequest( MmsServerConnection connection, uint8_t* requestBuffer, @@ -308,85 +308,85 @@ mmsServer_handleReadJournalRequest( uint32_t invokeId, ByteBuffer* response); -void +LIB61850_INTERNAL void mmsServer_handleFileDirectoryRequest( MmsServerConnection connection, uint8_t* buffer, int bufPos, int maxBufPos, uint32_t invokeId, ByteBuffer* response); -void +LIB61850_INTERNAL void mmsServer_handleFileOpenRequest( MmsServerConnection connection, uint8_t* buffer, int bufPos, int maxBufPos, uint32_t invokeId, ByteBuffer* response); -void +LIB61850_INTERNAL void mmsServer_handleFileDeleteRequest( MmsServerConnection connection, uint8_t* buffer, int bufPos, int maxBufPos, uint32_t invokeId, ByteBuffer* response); -void +LIB61850_INTERNAL void mmsServer_handleFileRenameRequest( MmsServerConnection connection, uint8_t* buffer, int bufPos, int maxBufPos, uint32_t invokeId, ByteBuffer* response); -void +LIB61850_INTERNAL void mmsServer_handleFileReadRequest( MmsServerConnection connection, uint8_t* buffer, int bufPos, int maxBufPos, uint32_t invokeId, ByteBuffer* response); -void +LIB61850_INTERNAL void mmsServer_handleFileCloseRequest( MmsServerConnection connection, uint8_t* buffer, int bufPos, int maxBufPos, uint32_t invokeId, ByteBuffer* response); -void +LIB61850_INTERNAL void mmsServer_handleObtainFileRequest( MmsServerConnection connection, uint8_t* buffer, int bufPos, int maxBufPos, uint32_t invokeId, ByteBuffer* response); -int +LIB61850_INTERNAL int mmsServer_isIndexAccess(AlternateAccess_t* alternateAccess); -int +LIB61850_INTERNAL int mmsServer_getLowIndex(AlternateAccess_t* alternateAccess); -int +LIB61850_INTERNAL int mmsServer_getNumberOfElements(AlternateAccess_t* alternateAccess); -MmsNamedVariableList +LIB61850_INTERNAL MmsNamedVariableList mmsServer_getNamedVariableListWithName(LinkedList namedVariableLists, const char* variableListName); -void +LIB61850_INTERNAL void mmsServer_deleteVariableList(LinkedList namedVariableLists, char* variableListName); -MmsDataAccessError +LIB61850_INTERNAL MmsDataAccessError mmsServer_setValue(MmsServer self, MmsDomain* domain, char* itemId, MmsValue* value, MmsServerConnection connection); -MmsValue* +LIB61850_INTERNAL MmsValue* mmsServer_getValue(MmsServer self, MmsDomain* domain, char* itemId, MmsServerConnection connection); -void +LIB61850_INTERNAL void mmsServer_createMmsWriteResponse(MmsServerConnection connection, uint32_t invokeId, ByteBuffer* response, int numberOfItems, MmsDataAccessError* accessResults); -void +LIB61850_INTERNAL void mmsMsg_createMmsRejectPdu(uint32_t* invokeId, int reason, ByteBuffer* response); -MmsError +LIB61850_INTERNAL MmsError mmsServer_callVariableListChangedHandler(bool create, MmsVariableListType listType, MmsDomain* domain, char* listName, MmsServerConnection connection); diff --git a/src/mms/inc_private/mms_value_cache.h b/src/mms/inc_private/mms_value_cache.h index bca5185d..a309606c 100644 --- a/src/mms/inc_private/mms_value_cache.h +++ b/src/mms/inc_private/mms_value_cache.h @@ -29,16 +29,16 @@ typedef struct sMmsValueCache* MmsValueCache; -MmsValueCache +LIB61850_INTERNAL MmsValueCache MmsValueCache_create(MmsDomain* domain); -void +LIB61850_INTERNAL void MmsValueCache_insertValue(MmsValueCache self, char* itemId, MmsValue* value); -MmsValue* +LIB61850_INTERNAL MmsValue* MmsValueCache_lookupValue(MmsValueCache self, const char* itemId); -void +LIB61850_INTERNAL void MmsValueCache_destroy(MmsValueCache self); #endif /* MMS_VARIABLE_CACHE_H_ */ diff --git a/src/mms/inc_private/mms_value_internal.h b/src/mms/inc_private/mms_value_internal.h index ef789a5f..20b89209 100644 --- a/src/mms/inc_private/mms_value_internal.h +++ b/src/mms/inc_private/mms_value_internal.h @@ -25,6 +25,7 @@ #define MMS_VALUE_INTERNAL_H_ #include "mms_value.h" +#include "ber_integer.h" struct ATTRIBUTE_PACKED sMmsValue { MmsType type; @@ -64,4 +65,10 @@ struct ATTRIBUTE_PACKED sMmsValue { }; +LIB61850_INTERNAL MmsValue* +MmsValue_newIntegerFromBerInteger(Asn1PrimitiveValue* berInteger); + +LIB61850_INTERNAL MmsValue* +MmsValue_newUnsignedFromBerInteger(Asn1PrimitiveValue* berInteger); + #endif /* MMS_VALUE_INTERNAL_H_ */ diff --git a/src/mms/iso_mms/asn1c/AccessResult.h b/src/mms/iso_mms/asn1c/AccessResult.h index edaac446..043b65a5 100644 --- a/src/mms/iso_mms/asn1c/AccessResult.h +++ b/src/mms/iso_mms/asn1c/AccessResult.h @@ -78,7 +78,7 @@ typedef struct AccessResult { } AccessResult_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_AccessResult; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_AccessResult; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/Address.h b/src/mms/iso_mms/asn1c/Address.h index 4cd51d3b..91afdaea 100644 --- a/src/mms/iso_mms/asn1c/Address.h +++ b/src/mms/iso_mms/asn1c/Address.h @@ -43,7 +43,7 @@ typedef struct Address { } Address_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Address; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_Address; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/AlternateAccess.h b/src/mms/iso_mms/asn1c/AlternateAccess.h index 4ac9d09e..7f4931c3 100644 --- a/src/mms/iso_mms/asn1c/AlternateAccess.h +++ b/src/mms/iso_mms/asn1c/AlternateAccess.h @@ -58,7 +58,7 @@ typedef struct AlternateAccess { } AlternateAccess_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_AlternateAccess; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_AlternateAccess; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/AlternateAccessSelection.h b/src/mms/iso_mms/asn1c/AlternateAccessSelection.h index a2bca8c4..e5e43620 100644 --- a/src/mms/iso_mms/asn1c/AlternateAccessSelection.h +++ b/src/mms/iso_mms/asn1c/AlternateAccessSelection.h @@ -99,7 +99,7 @@ typedef struct AlternateAccessSelection { } AlternateAccessSelection_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_AlternateAccessSelection; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_AlternateAccessSelection; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/BIT_STRING.h b/src/mms/iso_mms/asn1c/BIT_STRING.h index 732e878b..3d6f32b1 100644 --- a/src/mms/iso_mms/asn1c/BIT_STRING.h +++ b/src/mms/iso_mms/asn1c/BIT_STRING.h @@ -20,11 +20,11 @@ typedef struct BIT_STRING_s { asn_struct_ctx_t _asn_ctx; /* Parsing across buffer boundaries */ } BIT_STRING_t; -extern asn_TYPE_descriptor_t asn_DEF_BIT_STRING; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_BIT_STRING; -asn_struct_print_f BIT_STRING_print; /* Human-readable output */ -asn_constr_check_f BIT_STRING_constraint; -xer_type_encoder_f BIT_STRING_encode_xer; +LIB61850_INTERNAL asn_struct_print_f BIT_STRING_print; /* Human-readable output */ +LIB61850_INTERNAL asn_constr_check_f BIT_STRING_constraint; +LIB61850_INTERNAL xer_type_encoder_f BIT_STRING_encode_xer; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/BOOLEAN.h b/src/mms/iso_mms/asn1c/BOOLEAN.h index 217d0f16..ea43c14b 100644 --- a/src/mms/iso_mms/asn1c/BOOLEAN.h +++ b/src/mms/iso_mms/asn1c/BOOLEAN.h @@ -20,14 +20,14 @@ typedef int BOOLEAN_t; extern asn_TYPE_descriptor_t asn_DEF_BOOLEAN; -asn_struct_free_f BOOLEAN_free; -asn_struct_print_f BOOLEAN_print; -ber_type_decoder_f BOOLEAN_decode_ber; -der_type_encoder_f BOOLEAN_encode_der; -xer_type_decoder_f BOOLEAN_decode_xer; -xer_type_encoder_f BOOLEAN_encode_xer; -per_type_decoder_f BOOLEAN_decode_uper; -per_type_encoder_f BOOLEAN_encode_uper; +LIB61850_INTERNAL asn_struct_free_f BOOLEAN_free; +LIB61850_INTERNAL asn_struct_print_f BOOLEAN_print; +LIB61850_INTERNAL ber_type_decoder_f BOOLEAN_decode_ber; +LIB61850_INTERNAL der_type_encoder_f BOOLEAN_encode_der; +LIB61850_INTERNAL xer_type_decoder_f BOOLEAN_decode_xer; +LIB61850_INTERNAL xer_type_encoder_f BOOLEAN_encode_xer; +LIB61850_INTERNAL per_type_decoder_f BOOLEAN_decode_uper; +LIB61850_INTERNAL per_type_encoder_f BOOLEAN_encode_uper; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/ConcludeRequestPDU.h b/src/mms/iso_mms/asn1c/ConcludeRequestPDU.h index 719c5be5..bc47225d 100644 --- a/src/mms/iso_mms/asn1c/ConcludeRequestPDU.h +++ b/src/mms/iso_mms/asn1c/ConcludeRequestPDU.h @@ -22,14 +22,14 @@ extern "C" { typedef NULL_t ConcludeRequestPDU_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ConcludeRequestPDU; -asn_struct_free_f ConcludeRequestPDU_free; -asn_struct_print_f ConcludeRequestPDU_print; -asn_constr_check_f ConcludeRequestPDU_constraint; -ber_type_decoder_f ConcludeRequestPDU_decode_ber; -der_type_encoder_f ConcludeRequestPDU_encode_der; -xer_type_decoder_f ConcludeRequestPDU_decode_xer; -xer_type_encoder_f ConcludeRequestPDU_encode_xer; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ConcludeRequestPDU; +LIB61850_INTERNAL asn_struct_free_f ConcludeRequestPDU_free; +LIB61850_INTERNAL asn_struct_print_f ConcludeRequestPDU_print; +LIB61850_INTERNAL asn_constr_check_f ConcludeRequestPDU_constraint; +LIB61850_INTERNAL ber_type_decoder_f ConcludeRequestPDU_decode_ber; +LIB61850_INTERNAL der_type_encoder_f ConcludeRequestPDU_encode_der; +LIB61850_INTERNAL xer_type_decoder_f ConcludeRequestPDU_decode_xer; +LIB61850_INTERNAL xer_type_encoder_f ConcludeRequestPDU_encode_xer; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/ConcludeResponsePDU.h b/src/mms/iso_mms/asn1c/ConcludeResponsePDU.h index b33f27a3..e02f0756 100644 --- a/src/mms/iso_mms/asn1c/ConcludeResponsePDU.h +++ b/src/mms/iso_mms/asn1c/ConcludeResponsePDU.h @@ -22,14 +22,14 @@ extern "C" { typedef NULL_t ConcludeResponsePDU_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ConcludeResponsePDU; -asn_struct_free_f ConcludeResponsePDU_free; -asn_struct_print_f ConcludeResponsePDU_print; -asn_constr_check_f ConcludeResponsePDU_constraint; -ber_type_decoder_f ConcludeResponsePDU_decode_ber; -der_type_encoder_f ConcludeResponsePDU_encode_der; -xer_type_decoder_f ConcludeResponsePDU_decode_xer; -xer_type_encoder_f ConcludeResponsePDU_encode_xer; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ConcludeResponsePDU; +LIB61850_INTERNAL asn_struct_free_f ConcludeResponsePDU_free; +LIB61850_INTERNAL asn_struct_print_f ConcludeResponsePDU_print; +LIB61850_INTERNAL asn_constr_check_f ConcludeResponsePDU_constraint; +LIB61850_INTERNAL ber_type_decoder_f ConcludeResponsePDU_decode_ber; +LIB61850_INTERNAL der_type_encoder_f ConcludeResponsePDU_encode_der; +LIB61850_INTERNAL xer_type_decoder_f ConcludeResponsePDU_decode_xer; +LIB61850_INTERNAL xer_type_encoder_f ConcludeResponsePDU_encode_xer; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/ConfirmedErrorPDU.h b/src/mms/iso_mms/asn1c/ConfirmedErrorPDU.h index 914f503b..7a70e234 100644 --- a/src/mms/iso_mms/asn1c/ConfirmedErrorPDU.h +++ b/src/mms/iso_mms/asn1c/ConfirmedErrorPDU.h @@ -30,7 +30,7 @@ typedef struct ConfirmedErrorPDU { } ConfirmedErrorPDU_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ConfirmedErrorPDU; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ConfirmedErrorPDU; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/ConfirmedRequestPdu.h b/src/mms/iso_mms/asn1c/ConfirmedRequestPdu.h index b37b981f..fcf8d14c 100644 --- a/src/mms/iso_mms/asn1c/ConfirmedRequestPdu.h +++ b/src/mms/iso_mms/asn1c/ConfirmedRequestPdu.h @@ -30,7 +30,7 @@ typedef struct ConfirmedRequestPdu { } ConfirmedRequestPdu_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ConfirmedRequestPdu; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ConfirmedRequestPdu; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/ConfirmedResponsePdu.h b/src/mms/iso_mms/asn1c/ConfirmedResponsePdu.h index 9b62d002..334bdea8 100644 --- a/src/mms/iso_mms/asn1c/ConfirmedResponsePdu.h +++ b/src/mms/iso_mms/asn1c/ConfirmedResponsePdu.h @@ -30,7 +30,7 @@ typedef struct ConfirmedResponsePdu { } ConfirmedResponsePdu_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ConfirmedResponsePdu; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ConfirmedResponsePdu; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/ConfirmedServiceRequest.h b/src/mms/iso_mms/asn1c/ConfirmedServiceRequest.h index 9efee04b..da04b3d8 100644 --- a/src/mms/iso_mms/asn1c/ConfirmedServiceRequest.h +++ b/src/mms/iso_mms/asn1c/ConfirmedServiceRequest.h @@ -55,7 +55,7 @@ typedef struct ConfirmedServiceRequest { } ConfirmedServiceRequest_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ConfirmedServiceRequest; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ConfirmedServiceRequest; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/ConfirmedServiceResponse.h b/src/mms/iso_mms/asn1c/ConfirmedServiceResponse.h index e4458e07..3e7ad4d3 100644 --- a/src/mms/iso_mms/asn1c/ConfirmedServiceResponse.h +++ b/src/mms/iso_mms/asn1c/ConfirmedServiceResponse.h @@ -55,7 +55,7 @@ typedef struct ConfirmedServiceResponse { } ConfirmedServiceResponse_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ConfirmedServiceResponse; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ConfirmedServiceResponse; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/Data.h b/src/mms/iso_mms/asn1c/Data.h index e8d039c1..7f829bbb 100644 --- a/src/mms/iso_mms/asn1c/Data.h +++ b/src/mms/iso_mms/asn1c/Data.h @@ -77,7 +77,7 @@ typedef struct Data { } Data_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Data; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_Data; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/DataAccessError.h b/src/mms/iso_mms/asn1c/DataAccessError.h index 7bb2a0ad..9fa0f73f 100644 --- a/src/mms/iso_mms/asn1c/DataAccessError.h +++ b/src/mms/iso_mms/asn1c/DataAccessError.h @@ -38,14 +38,14 @@ typedef enum DataAccessError { typedef INTEGER_t DataAccessError_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_DataAccessError; -asn_struct_free_f DataAccessError_free; -asn_struct_print_f DataAccessError_print; -asn_constr_check_f DataAccessError_constraint; -ber_type_decoder_f DataAccessError_decode_ber; -der_type_encoder_f DataAccessError_encode_der; -xer_type_decoder_f DataAccessError_decode_xer; -xer_type_encoder_f DataAccessError_encode_xer; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_DataAccessError; +LIB61850_INTERNAL asn_struct_free_f DataAccessError_free; +LIB61850_INTERNAL asn_struct_print_f DataAccessError_print; +LIB61850_INTERNAL asn_constr_check_f DataAccessError_constraint; +LIB61850_INTERNAL ber_type_decoder_f DataAccessError_decode_ber; +LIB61850_INTERNAL der_type_encoder_f DataAccessError_encode_der; +LIB61850_INTERNAL xer_type_decoder_f DataAccessError_decode_xer; +LIB61850_INTERNAL xer_type_encoder_f DataAccessError_encode_xer; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/DataSequence.h b/src/mms/iso_mms/asn1c/DataSequence.h index a7a58fad..a645c40b 100644 --- a/src/mms/iso_mms/asn1c/DataSequence.h +++ b/src/mms/iso_mms/asn1c/DataSequence.h @@ -31,7 +31,7 @@ typedef struct DataSequence { } DataSequence_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_DataSequence; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_DataSequence; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/DefineNamedVariableListRequest.h b/src/mms/iso_mms/asn1c/DefineNamedVariableListRequest.h index 93c40760..2a7dd0d2 100644 --- a/src/mms/iso_mms/asn1c/DefineNamedVariableListRequest.h +++ b/src/mms/iso_mms/asn1c/DefineNamedVariableListRequest.h @@ -48,7 +48,7 @@ typedef struct DefineNamedVariableListRequest { } DefineNamedVariableListRequest_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_DefineNamedVariableListRequest; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_DefineNamedVariableListRequest; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/DefineNamedVariableListResponse.h b/src/mms/iso_mms/asn1c/DefineNamedVariableListResponse.h index 201655ef..7d9d301f 100644 --- a/src/mms/iso_mms/asn1c/DefineNamedVariableListResponse.h +++ b/src/mms/iso_mms/asn1c/DefineNamedVariableListResponse.h @@ -22,14 +22,14 @@ extern "C" { typedef NULL_t DefineNamedVariableListResponse_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_DefineNamedVariableListResponse; -asn_struct_free_f DefineNamedVariableListResponse_free; -asn_struct_print_f DefineNamedVariableListResponse_print; -asn_constr_check_f DefineNamedVariableListResponse_constraint; -ber_type_decoder_f DefineNamedVariableListResponse_decode_ber; -der_type_encoder_f DefineNamedVariableListResponse_encode_der; -xer_type_decoder_f DefineNamedVariableListResponse_decode_xer; -xer_type_encoder_f DefineNamedVariableListResponse_encode_xer; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_DefineNamedVariableListResponse; +LIB61850_INTERNAL asn_struct_free_f DefineNamedVariableListResponse_free; +LIB61850_INTERNAL asn_struct_print_f DefineNamedVariableListResponse_print; +LIB61850_INTERNAL asn_constr_check_f DefineNamedVariableListResponse_constraint; +LIB61850_INTERNAL ber_type_decoder_f DefineNamedVariableListResponse_decode_ber; +LIB61850_INTERNAL der_type_encoder_f DefineNamedVariableListResponse_encode_der; +LIB61850_INTERNAL xer_type_decoder_f DefineNamedVariableListResponse_decode_xer; +LIB61850_INTERNAL xer_type_encoder_f DefineNamedVariableListResponse_encode_xer; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/DeleteNamedVariableListRequest.h b/src/mms/iso_mms/asn1c/DeleteNamedVariableListRequest.h index ac81dd86..49b52491 100644 --- a/src/mms/iso_mms/asn1c/DeleteNamedVariableListRequest.h +++ b/src/mms/iso_mms/asn1c/DeleteNamedVariableListRequest.h @@ -51,7 +51,7 @@ typedef struct DeleteNamedVariableListRequest { } DeleteNamedVariableListRequest_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_DeleteNamedVariableListRequest; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_DeleteNamedVariableListRequest; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/DeleteNamedVariableListResponse.h b/src/mms/iso_mms/asn1c/DeleteNamedVariableListResponse.h index 3e117ff6..66dbd0b8 100644 --- a/src/mms/iso_mms/asn1c/DeleteNamedVariableListResponse.h +++ b/src/mms/iso_mms/asn1c/DeleteNamedVariableListResponse.h @@ -29,7 +29,7 @@ typedef struct DeleteNamedVariableListResponse { } DeleteNamedVariableListResponse_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_DeleteNamedVariableListResponse; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_DeleteNamedVariableListResponse; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/FloatingPoint.h b/src/mms/iso_mms/asn1c/FloatingPoint.h index 36d070dd..57be7e4f 100644 --- a/src/mms/iso_mms/asn1c/FloatingPoint.h +++ b/src/mms/iso_mms/asn1c/FloatingPoint.h @@ -22,14 +22,14 @@ extern "C" { typedef OCTET_STRING_t FloatingPoint_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_FloatingPoint; -asn_struct_free_f FloatingPoint_free; -asn_struct_print_f FloatingPoint_print; -asn_constr_check_f FloatingPoint_constraint; -ber_type_decoder_f FloatingPoint_decode_ber; -der_type_encoder_f FloatingPoint_encode_der; -xer_type_decoder_f FloatingPoint_decode_xer; -xer_type_encoder_f FloatingPoint_encode_xer; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_FloatingPoint; +LIB61850_INTERNAL asn_struct_free_f FloatingPoint_free; +LIB61850_INTERNAL asn_struct_print_f FloatingPoint_print; +LIB61850_INTERNAL asn_constr_check_f FloatingPoint_constraint; +LIB61850_INTERNAL ber_type_decoder_f FloatingPoint_decode_ber; +LIB61850_INTERNAL der_type_encoder_f FloatingPoint_encode_der; +LIB61850_INTERNAL xer_type_decoder_f FloatingPoint_decode_xer; +LIB61850_INTERNAL xer_type_encoder_f FloatingPoint_encode_xer; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/GeneralizedTime.h b/src/mms/iso_mms/asn1c/GeneralizedTime.h index 1ea06b06..516a9d60 100644 --- a/src/mms/iso_mms/asn1c/GeneralizedTime.h +++ b/src/mms/iso_mms/asn1c/GeneralizedTime.h @@ -13,12 +13,12 @@ extern "C" { typedef OCTET_STRING_t GeneralizedTime_t; /* Implemented via OCTET STRING */ -extern asn_TYPE_descriptor_t asn_DEF_GeneralizedTime; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_GeneralizedTime; -asn_struct_print_f GeneralizedTime_print; -asn_constr_check_f GeneralizedTime_constraint; -der_type_encoder_f GeneralizedTime_encode_der; -xer_type_encoder_f GeneralizedTime_encode_xer; +LIB61850_INTERNAL asn_struct_print_f GeneralizedTime_print; +LIB61850_INTERNAL asn_constr_check_f GeneralizedTime_constraint; +LIB61850_INTERNAL der_type_encoder_f GeneralizedTime_encode_der; +LIB61850_INTERNAL xer_type_encoder_f GeneralizedTime_encode_xer; /*********************** * Some handy helpers. * @@ -33,11 +33,11 @@ struct tm; /* */ * instead of default local one. * On error returns -1 and errno set to EINVAL */ -time_t asn_GT2time(const GeneralizedTime_t *, struct tm *_optional_tm4fill, +LIB61850_INTERNAL time_t asn_GT2time(const GeneralizedTime_t *, struct tm *_optional_tm4fill, int as_gmt); /* A version of the above function also returning the fractions of seconds */ -time_t asn_GT2time_frac(const GeneralizedTime_t *, +LIB61850_INTERNAL time_t asn_GT2time_frac(const GeneralizedTime_t *, int *frac_value, int *frac_digits, /* (value / (10 ^ digits)) */ struct tm *_optional_tm4fill, int as_gmt); @@ -46,7 +46,7 @@ time_t asn_GT2time_frac(const GeneralizedTime_t *, * For example, parsing of the time ending with ".1" seconds * with frac_digits=3 (msec) would yield frac_value = 100. */ -time_t asn_GT2time_prec(const GeneralizedTime_t *, +LIB61850_INTERNAL time_t asn_GT2time_prec(const GeneralizedTime_t *, int *frac_value, int frac_digits, struct tm *_optional_tm4fill, int as_gmt); @@ -57,9 +57,9 @@ time_t asn_GT2time_prec(const GeneralizedTime_t *, * into a GMT time zone (encoding ends with a "Z"). * On error, this function returns 0 and sets errno. */ -GeneralizedTime_t *asn_time2GT(GeneralizedTime_t *_optional_gt, +LIB61850_INTERNAL GeneralizedTime_t *asn_time2GT(GeneralizedTime_t *_optional_gt, const struct tm *, int force_gmt); -GeneralizedTime_t *asn_time2GT_frac(GeneralizedTime_t *_optional_gt, +LIB61850_INTERNAL GeneralizedTime_t *asn_time2GT_frac(GeneralizedTime_t *_optional_gt, const struct tm *, int frac_value, int frac_digits, int force_gmt); #ifdef __cplusplus diff --git a/src/mms/iso_mms/asn1c/GetNameListRequest.h b/src/mms/iso_mms/asn1c/GetNameListRequest.h index 01d04151..b87114f8 100644 --- a/src/mms/iso_mms/asn1c/GetNameListRequest.h +++ b/src/mms/iso_mms/asn1c/GetNameListRequest.h @@ -51,7 +51,7 @@ typedef struct GetNameListRequest { } GetNameListRequest_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GetNameListRequest; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_GetNameListRequest; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/GetNameListResponse.h b/src/mms/iso_mms/asn1c/GetNameListResponse.h index 777013b3..20b7aa53 100644 --- a/src/mms/iso_mms/asn1c/GetNameListResponse.h +++ b/src/mms/iso_mms/asn1c/GetNameListResponse.h @@ -37,7 +37,7 @@ typedef struct GetNameListResponse { } GetNameListResponse_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GetNameListResponse; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_GetNameListResponse; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/GetNamedVariableListAttributesRequest.h b/src/mms/iso_mms/asn1c/GetNamedVariableListAttributesRequest.h index 43e24237..3310f5cd 100644 --- a/src/mms/iso_mms/asn1c/GetNamedVariableListAttributesRequest.h +++ b/src/mms/iso_mms/asn1c/GetNamedVariableListAttributesRequest.h @@ -22,14 +22,14 @@ extern "C" { typedef ObjectName_t GetNamedVariableListAttributesRequest_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GetNamedVariableListAttributesRequest; -asn_struct_free_f GetNamedVariableListAttributesRequest_free; -asn_struct_print_f GetNamedVariableListAttributesRequest_print; -asn_constr_check_f GetNamedVariableListAttributesRequest_constraint; -ber_type_decoder_f GetNamedVariableListAttributesRequest_decode_ber; -der_type_encoder_f GetNamedVariableListAttributesRequest_encode_der; -xer_type_decoder_f GetNamedVariableListAttributesRequest_decode_xer; -xer_type_encoder_f GetNamedVariableListAttributesRequest_encode_xer; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_GetNamedVariableListAttributesRequest; +LIB61850_INTERNAL asn_struct_free_f GetNamedVariableListAttributesRequest_free; +LIB61850_INTERNAL asn_struct_print_f GetNamedVariableListAttributesRequest_print; +LIB61850_INTERNAL asn_constr_check_f GetNamedVariableListAttributesRequest_constraint; +LIB61850_INTERNAL ber_type_decoder_f GetNamedVariableListAttributesRequest_decode_ber; +LIB61850_INTERNAL der_type_encoder_f GetNamedVariableListAttributesRequest_encode_der; +LIB61850_INTERNAL xer_type_decoder_f GetNamedVariableListAttributesRequest_decode_xer; +LIB61850_INTERNAL xer_type_encoder_f GetNamedVariableListAttributesRequest_encode_xer; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/GetNamedVariableListAttributesResponse.h b/src/mms/iso_mms/asn1c/GetNamedVariableListAttributesResponse.h index 64ea208e..6cf6fe19 100644 --- a/src/mms/iso_mms/asn1c/GetNamedVariableListAttributesResponse.h +++ b/src/mms/iso_mms/asn1c/GetNamedVariableListAttributesResponse.h @@ -50,7 +50,7 @@ typedef struct GetNamedVariableListAttributesResponse { } GetNamedVariableListAttributesResponse_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GetNamedVariableListAttributesResponse; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_GetNamedVariableListAttributesResponse; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/GetVariableAccessAttributesRequest.h b/src/mms/iso_mms/asn1c/GetVariableAccessAttributesRequest.h index 6fe24c3b..3d6447f6 100644 --- a/src/mms/iso_mms/asn1c/GetVariableAccessAttributesRequest.h +++ b/src/mms/iso_mms/asn1c/GetVariableAccessAttributesRequest.h @@ -40,7 +40,7 @@ typedef struct GetVariableAccessAttributesRequest { } GetVariableAccessAttributesRequest_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GetVariableAccessAttributesRequest; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_GetVariableAccessAttributesRequest; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/GetVariableAccessAttributesResponse.h b/src/mms/iso_mms/asn1c/GetVariableAccessAttributesResponse.h index 9a5ffd4a..863a58bb 100644 --- a/src/mms/iso_mms/asn1c/GetVariableAccessAttributesResponse.h +++ b/src/mms/iso_mms/asn1c/GetVariableAccessAttributesResponse.h @@ -34,7 +34,7 @@ typedef struct GetVariableAccessAttributesResponse { } GetVariableAccessAttributesResponse_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_GetVariableAccessAttributesResponse; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_GetVariableAccessAttributesResponse; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/INTEGER.h b/src/mms/iso_mms/asn1c/INTEGER.h index 62832b12..e57ff7cc 100644 --- a/src/mms/iso_mms/asn1c/INTEGER.h +++ b/src/mms/iso_mms/asn1c/INTEGER.h @@ -32,13 +32,13 @@ typedef struct asn_INTEGER_specifics_s { int strict_enumeration; /* Enumeration set is fixed */ } asn_INTEGER_specifics_t; -asn_struct_print_f INTEGER_print; -ber_type_decoder_f INTEGER_decode_ber; -der_type_encoder_f INTEGER_encode_der; -xer_type_decoder_f INTEGER_decode_xer; -xer_type_encoder_f INTEGER_encode_xer; -per_type_decoder_f INTEGER_decode_uper; -per_type_encoder_f INTEGER_encode_uper; +LIB61850_INTERNAL asn_struct_print_f INTEGER_print; +LIB61850_INTERNAL ber_type_decoder_f INTEGER_decode_ber; +LIB61850_INTERNAL der_type_encoder_f INTEGER_encode_der; +LIB61850_INTERNAL xer_type_decoder_f INTEGER_decode_xer; +LIB61850_INTERNAL xer_type_encoder_f INTEGER_encode_xer; +LIB61850_INTERNAL per_type_decoder_f INTEGER_decode_uper; +LIB61850_INTERNAL per_type_encoder_f INTEGER_encode_uper; /*********************************** * Some handy conversion routines. * @@ -50,13 +50,13 @@ per_type_encoder_f INTEGER_encode_uper; * -1/ERANGE: Value encoded is out of range for long representation * -1/ENOMEM: Memory allocation failed (in asn_long2INTEGER()). */ -int asn_INTEGER2long(const INTEGER_t *i, long *l); -int asn_long2INTEGER(INTEGER_t *i, long l); +LIB61850_INTERNAL int asn_INTEGER2long(const INTEGER_t *i, long *l); +LIB61850_INTERNAL int asn_long2INTEGER(INTEGER_t *i, long l); /* * Convert the integer value into the corresponding enumeration map entry. */ -const asn_INTEGER_enum_map_t *INTEGER_map_value2enum(asn_INTEGER_specifics_t *specs, long value); +LIB61850_INTERNAL const asn_INTEGER_enum_map_t *INTEGER_map_value2enum(asn_INTEGER_specifics_t *specs, long value); #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/Identifier.h b/src/mms/iso_mms/asn1c/Identifier.h index 6ca982a9..5cfede4d 100644 --- a/src/mms/iso_mms/asn1c/Identifier.h +++ b/src/mms/iso_mms/asn1c/Identifier.h @@ -22,14 +22,14 @@ extern "C" { typedef VisibleString_t Identifier_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Identifier; -asn_struct_free_f Identifier_free; -asn_struct_print_f Identifier_print; -asn_constr_check_f Identifier_constraint; -ber_type_decoder_f Identifier_decode_ber; -der_type_encoder_f Identifier_encode_der; -xer_type_decoder_f Identifier_decode_xer; -xer_type_encoder_f Identifier_encode_xer; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_Identifier; +LIB61850_INTERNAL asn_struct_free_f Identifier_free; +LIB61850_INTERNAL asn_struct_print_f Identifier_print; +LIB61850_INTERNAL asn_constr_check_f Identifier_constraint; +LIB61850_INTERNAL ber_type_decoder_f Identifier_decode_ber; +LIB61850_INTERNAL der_type_encoder_f Identifier_encode_der; +LIB61850_INTERNAL xer_type_decoder_f Identifier_decode_xer; +LIB61850_INTERNAL xer_type_encoder_f Identifier_encode_xer; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/IndexRangeSeq.h b/src/mms/iso_mms/asn1c/IndexRangeSeq.h index 59e4a641..a4f3f397 100644 --- a/src/mms/iso_mms/asn1c/IndexRangeSeq.h +++ b/src/mms/iso_mms/asn1c/IndexRangeSeq.h @@ -29,7 +29,7 @@ typedef struct IndexRangeSeq { } IndexRangeSeq_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_IndexRangeSeq; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_IndexRangeSeq; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/InformationReport.h b/src/mms/iso_mms/asn1c/InformationReport.h index e2fb5812..3b1ca7e3 100644 --- a/src/mms/iso_mms/asn1c/InformationReport.h +++ b/src/mms/iso_mms/asn1c/InformationReport.h @@ -39,7 +39,7 @@ typedef struct InformationReport { } InformationReport_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_InformationReport; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_InformationReport; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/InitRequestDetail.h b/src/mms/iso_mms/asn1c/InitRequestDetail.h index 9bb774ba..cca06847 100644 --- a/src/mms/iso_mms/asn1c/InitRequestDetail.h +++ b/src/mms/iso_mms/asn1c/InitRequestDetail.h @@ -32,7 +32,7 @@ typedef struct InitRequestDetail { } InitRequestDetail_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_InitRequestDetail; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_InitRequestDetail; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/InitResponseDetail.h b/src/mms/iso_mms/asn1c/InitResponseDetail.h index 77e14334..8bdd0efc 100644 --- a/src/mms/iso_mms/asn1c/InitResponseDetail.h +++ b/src/mms/iso_mms/asn1c/InitResponseDetail.h @@ -32,7 +32,7 @@ typedef struct InitResponseDetail { } InitResponseDetail_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_InitResponseDetail; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_InitResponseDetail; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/InitiateErrorPdu.h b/src/mms/iso_mms/asn1c/InitiateErrorPdu.h index b472c670..581cc057 100644 --- a/src/mms/iso_mms/asn1c/InitiateErrorPdu.h +++ b/src/mms/iso_mms/asn1c/InitiateErrorPdu.h @@ -22,14 +22,14 @@ extern "C" { typedef ServiceError_t InitiateErrorPdu_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_InitiateErrorPdu; -asn_struct_free_f InitiateErrorPdu_free; -asn_struct_print_f InitiateErrorPdu_print; -asn_constr_check_f InitiateErrorPdu_constraint; -ber_type_decoder_f InitiateErrorPdu_decode_ber; -der_type_encoder_f InitiateErrorPdu_encode_der; -xer_type_decoder_f InitiateErrorPdu_decode_xer; -xer_type_encoder_f InitiateErrorPdu_encode_xer; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_InitiateErrorPdu; +LIB61850_INTERNAL asn_struct_free_f InitiateErrorPdu_free; +LIB61850_INTERNAL asn_struct_print_f InitiateErrorPdu_print; +LIB61850_INTERNAL asn_constr_check_f InitiateErrorPdu_constraint; +LIB61850_INTERNAL ber_type_decoder_f InitiateErrorPdu_decode_ber; +LIB61850_INTERNAL der_type_encoder_f InitiateErrorPdu_encode_der; +LIB61850_INTERNAL xer_type_decoder_f InitiateErrorPdu_decode_xer; +LIB61850_INTERNAL xer_type_encoder_f InitiateErrorPdu_encode_xer; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/InitiateRequestPdu.h b/src/mms/iso_mms/asn1c/InitiateRequestPdu.h index 4739c73d..2c118e1d 100644 --- a/src/mms/iso_mms/asn1c/InitiateRequestPdu.h +++ b/src/mms/iso_mms/asn1c/InitiateRequestPdu.h @@ -35,7 +35,7 @@ typedef struct InitiateRequestPdu { } InitiateRequestPdu_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_InitiateRequestPdu; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_InitiateRequestPdu; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/InitiateResponsePdu.h b/src/mms/iso_mms/asn1c/InitiateResponsePdu.h index e0c31d4c..c1a8e418 100644 --- a/src/mms/iso_mms/asn1c/InitiateResponsePdu.h +++ b/src/mms/iso_mms/asn1c/InitiateResponsePdu.h @@ -35,7 +35,7 @@ typedef struct InitiateResponsePdu { } InitiateResponsePdu_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_InitiateResponsePdu; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_InitiateResponsePdu; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/Integer16.h b/src/mms/iso_mms/asn1c/Integer16.h index 1657f3c0..8dd44044 100644 --- a/src/mms/iso_mms/asn1c/Integer16.h +++ b/src/mms/iso_mms/asn1c/Integer16.h @@ -22,14 +22,14 @@ extern "C" { typedef long Integer16_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Integer16; -asn_struct_free_f Integer16_free; -asn_struct_print_f Integer16_print; -asn_constr_check_f Integer16_constraint; -ber_type_decoder_f Integer16_decode_ber; -der_type_encoder_f Integer16_encode_der; -xer_type_decoder_f Integer16_decode_xer; -xer_type_encoder_f Integer16_encode_xer; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_Integer16; +LIB61850_INTERNAL asn_struct_free_f Integer16_free; +LIB61850_INTERNAL asn_struct_print_f Integer16_print; +LIB61850_INTERNAL asn_constr_check_f Integer16_constraint; +LIB61850_INTERNAL ber_type_decoder_f Integer16_decode_ber; +LIB61850_INTERNAL der_type_encoder_f Integer16_encode_der; +LIB61850_INTERNAL xer_type_decoder_f Integer16_decode_xer; +LIB61850_INTERNAL xer_type_encoder_f Integer16_encode_xer; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/Integer32.h b/src/mms/iso_mms/asn1c/Integer32.h index ef33047e..a7c7e37b 100644 --- a/src/mms/iso_mms/asn1c/Integer32.h +++ b/src/mms/iso_mms/asn1c/Integer32.h @@ -22,14 +22,14 @@ extern "C" { typedef long Integer32_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Integer32; -asn_struct_free_f Integer32_free; -asn_struct_print_f Integer32_print; -asn_constr_check_f Integer32_constraint; -ber_type_decoder_f Integer32_decode_ber; -der_type_encoder_f Integer32_encode_der; -xer_type_decoder_f Integer32_decode_xer; -xer_type_encoder_f Integer32_encode_xer; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_Integer32; +LIB61850_INTERNAL asn_struct_free_f Integer32_free; +LIB61850_INTERNAL asn_struct_print_f Integer32_print; +LIB61850_INTERNAL asn_constr_check_f Integer32_constraint; +LIB61850_INTERNAL ber_type_decoder_f Integer32_decode_ber; +LIB61850_INTERNAL der_type_encoder_f Integer32_encode_der; +LIB61850_INTERNAL xer_type_decoder_f Integer32_decode_xer; +LIB61850_INTERNAL xer_type_encoder_f Integer32_encode_xer; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/Integer8.h b/src/mms/iso_mms/asn1c/Integer8.h index 4264509e..e4b9c698 100644 --- a/src/mms/iso_mms/asn1c/Integer8.h +++ b/src/mms/iso_mms/asn1c/Integer8.h @@ -22,14 +22,14 @@ extern "C" { typedef long Integer8_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Integer8; -asn_struct_free_f Integer8_free; -asn_struct_print_f Integer8_print; -asn_constr_check_f Integer8_constraint; -ber_type_decoder_f Integer8_decode_ber; -der_type_encoder_f Integer8_encode_der; -xer_type_decoder_f Integer8_decode_xer; -xer_type_encoder_f Integer8_encode_xer; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_Integer8; +LIB61850_INTERNAL asn_struct_free_f Integer8_free; +LIB61850_INTERNAL asn_struct_print_f Integer8_print; +LIB61850_INTERNAL asn_constr_check_f Integer8_constraint; +LIB61850_INTERNAL ber_type_decoder_f Integer8_decode_ber; +LIB61850_INTERNAL der_type_encoder_f Integer8_encode_der; +LIB61850_INTERNAL xer_type_decoder_f Integer8_decode_xer; +LIB61850_INTERNAL xer_type_encoder_f Integer8_encode_xer; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/ListOfVariableSeq.h b/src/mms/iso_mms/asn1c/ListOfVariableSeq.h index 07e2c4b4..d4120077 100644 --- a/src/mms/iso_mms/asn1c/ListOfVariableSeq.h +++ b/src/mms/iso_mms/asn1c/ListOfVariableSeq.h @@ -32,7 +32,7 @@ typedef struct ListOfVariableSeq { } ListOfVariableSeq_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ListOfVariableSeq; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ListOfVariableSeq; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/MMSString.h b/src/mms/iso_mms/asn1c/MMSString.h index 0c1e783f..c9525355 100644 --- a/src/mms/iso_mms/asn1c/MMSString.h +++ b/src/mms/iso_mms/asn1c/MMSString.h @@ -22,14 +22,14 @@ extern "C" { typedef UTF8String_t MMSString_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_MMSString; -asn_struct_free_f MMSString_free; -asn_struct_print_f MMSString_print; -asn_constr_check_f MMSString_constraint; -ber_type_decoder_f MMSString_decode_ber; -der_type_encoder_f MMSString_encode_der; -xer_type_decoder_f MMSString_decode_xer; -xer_type_encoder_f MMSString_encode_xer; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_MMSString; +LIB61850_INTERNAL asn_struct_free_f MMSString_free; +LIB61850_INTERNAL asn_struct_print_f MMSString_print; +LIB61850_INTERNAL asn_constr_check_f MMSString_constraint; +LIB61850_INTERNAL ber_type_decoder_f MMSString_decode_ber; +LIB61850_INTERNAL der_type_encoder_f MMSString_encode_der; +LIB61850_INTERNAL xer_type_decoder_f MMSString_decode_xer; +LIB61850_INTERNAL xer_type_encoder_f MMSString_encode_xer; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/MmsPdu.h b/src/mms/iso_mms/asn1c/MmsPdu.h index 2ef71ca7..99a0331d 100644 --- a/src/mms/iso_mms/asn1c/MmsPdu.h +++ b/src/mms/iso_mms/asn1c/MmsPdu.h @@ -64,7 +64,7 @@ typedef struct MmsPdu { } MmsPdu_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_MmsPdu; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_MmsPdu; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/NULL.h b/src/mms/iso_mms/asn1c/NULL.h index 131e7759..44536325 100644 --- a/src/mms/iso_mms/asn1c/NULL.h +++ b/src/mms/iso_mms/asn1c/NULL.h @@ -17,14 +17,14 @@ extern "C" { */ typedef int NULL_t; -extern asn_TYPE_descriptor_t asn_DEF_NULL; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_NULL; -asn_struct_print_f NULL_print; -der_type_encoder_f NULL_encode_der; -xer_type_decoder_f NULL_decode_xer; -xer_type_encoder_f NULL_encode_xer; -per_type_decoder_f NULL_decode_uper; -per_type_encoder_f NULL_encode_uper; +LIB61850_INTERNAL asn_struct_print_f NULL_print; +LIB61850_INTERNAL der_type_encoder_f NULL_encode_der; +LIB61850_INTERNAL xer_type_decoder_f NULL_decode_xer; +LIB61850_INTERNAL xer_type_encoder_f NULL_encode_xer; +LIB61850_INTERNAL per_type_decoder_f NULL_decode_uper; +LIB61850_INTERNAL per_type_encoder_f NULL_encode_uper; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/NativeEnumerated.h b/src/mms/iso_mms/asn1c/NativeEnumerated.h index c59bb1ba..c8867930 100644 --- a/src/mms/iso_mms/asn1c/NativeEnumerated.h +++ b/src/mms/iso_mms/asn1c/NativeEnumerated.h @@ -19,11 +19,11 @@ extern "C" { #endif -extern asn_TYPE_descriptor_t asn_DEF_NativeEnumerated; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_NativeEnumerated; -xer_type_encoder_f NativeEnumerated_encode_xer; -per_type_decoder_f NativeEnumerated_decode_uper; -per_type_encoder_f NativeEnumerated_encode_uper; +LIB61850_INTERNAL xer_type_encoder_f NativeEnumerated_encode_xer; +LIB61850_INTERNAL per_type_decoder_f NativeEnumerated_decode_uper; +LIB61850_INTERNAL per_type_encoder_f NativeEnumerated_encode_uper; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/NativeInteger.c b/src/mms/iso_mms/asn1c/NativeInteger.c index 4a6f5618..d9644794 100644 --- a/src/mms/iso_mms/asn1c/NativeInteger.c +++ b/src/mms/iso_mms/asn1c/NativeInteger.c @@ -161,7 +161,6 @@ NativeInteger_encode_der(asn_TYPE_descriptor_t *sd, void *ptr, } - asn_dec_rval_t NativeInteger_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, @@ -216,7 +215,6 @@ NativeInteger_encode_uper(asn_TYPE_descriptor_t *td, return er; } - void NativeInteger_free(asn_TYPE_descriptor_t *td, void *ptr, int contents_only) { diff --git a/src/mms/iso_mms/asn1c/NativeInteger.h b/src/mms/iso_mms/asn1c/NativeInteger.h index 4e63a835..9fefd486 100644 --- a/src/mms/iso_mms/asn1c/NativeInteger.h +++ b/src/mms/iso_mms/asn1c/NativeInteger.h @@ -19,15 +19,31 @@ extern "C" { #endif +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_NativeInteger; +LIB61850_INTERNAL asn_struct_free_f NativeInteger_free; + +LIB61850_INTERNAL asn_struct_print_f NativeInteger_print; + +LIB61850_INTERNAL ber_type_decoder_f NativeInteger_decode_ber; + +LIB61850_INTERNAL der_type_encoder_f NativeInteger_encode_der; + +LIB61850_INTERNAL xer_type_decoder_f NativeInteger_decode_xer; + +LIB61850_INTERNAL xer_type_encoder_f NativeInteger_encode_xer; + +LIB61850_INTERNAL per_type_decoder_f NativeInteger_decode_uper; + +LIB61850_INTERNAL per_type_encoder_f NativeInteger_encode_uper; #ifdef __cplusplus diff --git a/src/mms/iso_mms/asn1c/OCTET_STRING.h b/src/mms/iso_mms/asn1c/OCTET_STRING.h index 5150161a..0701f826 100644 --- a/src/mms/iso_mms/asn1c/OCTET_STRING.h +++ b/src/mms/iso_mms/asn1c/OCTET_STRING.h @@ -18,20 +18,20 @@ typedef struct OCTET_STRING { asn_struct_ctx_t _asn_ctx; /* Parsing across buffer boundaries */ } OCTET_STRING_t; -extern asn_TYPE_descriptor_t asn_DEF_OCTET_STRING; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_OCTET_STRING; -asn_struct_free_f OCTET_STRING_free; -asn_struct_print_f OCTET_STRING_print; -asn_struct_print_f OCTET_STRING_print_utf8; -ber_type_decoder_f OCTET_STRING_decode_ber; -der_type_encoder_f OCTET_STRING_encode_der; -xer_type_decoder_f OCTET_STRING_decode_xer_hex; /* Hexadecimal */ -xer_type_decoder_f OCTET_STRING_decode_xer_binary; /* 01010111010 */ -xer_type_decoder_f OCTET_STRING_decode_xer_utf8; /* ASCII/UTF-8 */ -xer_type_encoder_f OCTET_STRING_encode_xer; -xer_type_encoder_f OCTET_STRING_encode_xer_utf8; -per_type_decoder_f OCTET_STRING_decode_uper; -per_type_encoder_f OCTET_STRING_encode_uper; +LIB61850_INTERNAL asn_struct_free_f OCTET_STRING_free; +LIB61850_INTERNAL asn_struct_print_f OCTET_STRING_print; +LIB61850_INTERNAL asn_struct_print_f OCTET_STRING_print_utf8; +LIB61850_INTERNAL ber_type_decoder_f OCTET_STRING_decode_ber; +LIB61850_INTERNAL der_type_encoder_f OCTET_STRING_encode_der; +LIB61850_INTERNAL xer_type_decoder_f OCTET_STRING_decode_xer_hex; /* Hexadecimal */ +LIB61850_INTERNAL xer_type_decoder_f OCTET_STRING_decode_xer_binary; /* 01010111010 */ +LIB61850_INTERNAL xer_type_decoder_f OCTET_STRING_decode_xer_utf8; /* ASCII/UTF-8 */ +LIB61850_INTERNAL xer_type_encoder_f OCTET_STRING_encode_xer; +LIB61850_INTERNAL xer_type_encoder_f OCTET_STRING_encode_xer_utf8; +LIB61850_INTERNAL per_type_decoder_f OCTET_STRING_decode_uper; +LIB61850_INTERNAL per_type_encoder_f OCTET_STRING_encode_uper; /****************************** * Handy conversion routines. * @@ -46,6 +46,7 @@ per_type_encoder_f OCTET_STRING_encode_uper; * current contents of the OCTET STRING. * Returns 0 if it was possible to perform operation, -1 otherwise. */ +LIB61850_INTERNAL int OCTET_STRING_fromBuf(OCTET_STRING_t *s, const char *str, int size); /* Handy conversion from the C string into the OCTET STRING. */ @@ -56,6 +57,7 @@ int OCTET_STRING_fromBuf(OCTET_STRING_t *s, const char *str, int size); * allocated object. NULL is permitted in str: the function will just allocate * empty OCTET STRING. */ +LIB61850_INTERNAL OCTET_STRING_t *OCTET_STRING_new_fromBuf(asn_TYPE_descriptor_t *td, const char *str, int size); diff --git a/src/mms/iso_mms/asn1c/ObjectClass.c b/src/mms/iso_mms/asn1c/ObjectClass.c index 884b1f1c..3ae1f366 100644 --- a/src/mms/iso_mms/asn1c/ObjectClass.c +++ b/src/mms/iso_mms/asn1c/ObjectClass.c @@ -33,6 +33,7 @@ static asn_CHOICE_specifics_t asn_SPC_ObjectClass_specs_1 = { 0, -1 /* Extensions start */ }; + asn_TYPE_descriptor_t asn_DEF_ObjectClass = { "ObjectClass", "ObjectClass", diff --git a/src/mms/iso_mms/asn1c/ObjectClass.h b/src/mms/iso_mms/asn1c/ObjectClass.h index 3cd9bb9f..09d1cf1d 100644 --- a/src/mms/iso_mms/asn1c/ObjectClass.h +++ b/src/mms/iso_mms/asn1c/ObjectClass.h @@ -53,7 +53,7 @@ typedef struct ObjectClass { } ObjectClass_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ObjectClass; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ObjectClass; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/ObjectName.h b/src/mms/iso_mms/asn1c/ObjectName.h index 002312cc..867772b6 100644 --- a/src/mms/iso_mms/asn1c/ObjectName.h +++ b/src/mms/iso_mms/asn1c/ObjectName.h @@ -50,7 +50,7 @@ typedef struct ObjectName { } ObjectName_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ObjectName; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ObjectName; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/ParameterSupportOptions.h b/src/mms/iso_mms/asn1c/ParameterSupportOptions.h index 56b7f070..8b923f53 100644 --- a/src/mms/iso_mms/asn1c/ParameterSupportOptions.h +++ b/src/mms/iso_mms/asn1c/ParameterSupportOptions.h @@ -36,14 +36,14 @@ typedef enum ParameterSupportOptions { typedef BIT_STRING_t ParameterSupportOptions_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ParameterSupportOptions; -asn_struct_free_f ParameterSupportOptions_free; -asn_struct_print_f ParameterSupportOptions_print; -asn_constr_check_f ParameterSupportOptions_constraint; -ber_type_decoder_f ParameterSupportOptions_decode_ber; -der_type_encoder_f ParameterSupportOptions_encode_der; -xer_type_decoder_f ParameterSupportOptions_decode_xer; -xer_type_encoder_f ParameterSupportOptions_encode_xer; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ParameterSupportOptions; +LIB61850_INTERNAL asn_struct_free_f ParameterSupportOptions_free; +LIB61850_INTERNAL asn_struct_print_f ParameterSupportOptions_print; +LIB61850_INTERNAL asn_constr_check_f ParameterSupportOptions_constraint; +LIB61850_INTERNAL ber_type_decoder_f ParameterSupportOptions_decode_ber; +LIB61850_INTERNAL der_type_encoder_f ParameterSupportOptions_encode_der; +LIB61850_INTERNAL xer_type_decoder_f ParameterSupportOptions_decode_xer; +LIB61850_INTERNAL xer_type_encoder_f ParameterSupportOptions_encode_xer; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/ReadRequest.h b/src/mms/iso_mms/asn1c/ReadRequest.h index 683cd50f..0fc323ca 100644 --- a/src/mms/iso_mms/asn1c/ReadRequest.h +++ b/src/mms/iso_mms/asn1c/ReadRequest.h @@ -30,7 +30,7 @@ typedef struct ReadRequest { } ReadRequest_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ReadRequest; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ReadRequest; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/ReadResponse.h b/src/mms/iso_mms/asn1c/ReadResponse.h index ed6d003c..c1eb1839 100644 --- a/src/mms/iso_mms/asn1c/ReadResponse.h +++ b/src/mms/iso_mms/asn1c/ReadResponse.h @@ -41,7 +41,7 @@ typedef struct ReadResponse { } ReadResponse_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ReadResponse; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ReadResponse; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/RejectPDU.h b/src/mms/iso_mms/asn1c/RejectPDU.h index 891c14d5..10948b64 100644 --- a/src/mms/iso_mms/asn1c/RejectPDU.h +++ b/src/mms/iso_mms/asn1c/RejectPDU.h @@ -120,7 +120,7 @@ typedef struct RejectPDU { } RejectPDU_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_RejectPDU; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_RejectPDU; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/ScatteredAccessDescription.h b/src/mms/iso_mms/asn1c/ScatteredAccessDescription.h index 8c8c134d..b88c6231 100644 --- a/src/mms/iso_mms/asn1c/ScatteredAccessDescription.h +++ b/src/mms/iso_mms/asn1c/ScatteredAccessDescription.h @@ -45,7 +45,7 @@ typedef struct ScatteredAccessDescription { } ScatteredAccessDescription_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ScatteredAccessDescription; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ScatteredAccessDescription; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/ServiceError.h b/src/mms/iso_mms/asn1c/ServiceError.h index c87c0c92..60f66030 100644 --- a/src/mms/iso_mms/asn1c/ServiceError.h +++ b/src/mms/iso_mms/asn1c/ServiceError.h @@ -159,7 +159,7 @@ typedef struct ServiceError { } ServiceError_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ServiceError; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ServiceError; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/ServiceSupportOptions.h b/src/mms/iso_mms/asn1c/ServiceSupportOptions.h index fcffc237..dbdd8123 100644 --- a/src/mms/iso_mms/asn1c/ServiceSupportOptions.h +++ b/src/mms/iso_mms/asn1c/ServiceSupportOptions.h @@ -111,14 +111,14 @@ typedef enum ServiceSupportOptions { typedef BIT_STRING_t ServiceSupportOptions_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_ServiceSupportOptions; -asn_struct_free_f ServiceSupportOptions_free; -asn_struct_print_f ServiceSupportOptions_print; -asn_constr_check_f ServiceSupportOptions_constraint; -ber_type_decoder_f ServiceSupportOptions_decode_ber; -der_type_encoder_f ServiceSupportOptions_encode_der; -xer_type_decoder_f ServiceSupportOptions_decode_xer; -xer_type_encoder_f ServiceSupportOptions_encode_xer; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ServiceSupportOptions; +LIB61850_INTERNAL asn_struct_free_f ServiceSupportOptions_free; +LIB61850_INTERNAL asn_struct_print_f ServiceSupportOptions_print; +LIB61850_INTERNAL asn_constr_check_f ServiceSupportOptions_constraint; +LIB61850_INTERNAL ber_type_decoder_f ServiceSupportOptions_decode_ber; +LIB61850_INTERNAL der_type_encoder_f ServiceSupportOptions_encode_der; +LIB61850_INTERNAL xer_type_decoder_f ServiceSupportOptions_decode_xer; +LIB61850_INTERNAL xer_type_encoder_f ServiceSupportOptions_encode_xer; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/StructComponent.h b/src/mms/iso_mms/asn1c/StructComponent.h index 436841ce..9edd2068 100644 --- a/src/mms/iso_mms/asn1c/StructComponent.h +++ b/src/mms/iso_mms/asn1c/StructComponent.h @@ -32,7 +32,7 @@ typedef struct StructComponent { } StructComponent_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_StructComponent; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_StructComponent; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/TimeOfDay.h b/src/mms/iso_mms/asn1c/TimeOfDay.h index a507a26f..5ef94488 100644 --- a/src/mms/iso_mms/asn1c/TimeOfDay.h +++ b/src/mms/iso_mms/asn1c/TimeOfDay.h @@ -22,14 +22,14 @@ extern "C" { typedef OCTET_STRING_t TimeOfDay_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_TimeOfDay; -asn_struct_free_f TimeOfDay_free; -asn_struct_print_f TimeOfDay_print; -asn_constr_check_f TimeOfDay_constraint; -ber_type_decoder_f TimeOfDay_decode_ber; -der_type_encoder_f TimeOfDay_encode_der; -xer_type_decoder_f TimeOfDay_decode_xer; -xer_type_encoder_f TimeOfDay_encode_xer; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_TimeOfDay; +LIB61850_INTERNAL asn_struct_free_f TimeOfDay_free; +LIB61850_INTERNAL asn_struct_print_f TimeOfDay_print; +LIB61850_INTERNAL asn_constr_check_f TimeOfDay_constraint; +LIB61850_INTERNAL ber_type_decoder_f TimeOfDay_decode_ber; +LIB61850_INTERNAL der_type_encoder_f TimeOfDay_encode_der; +LIB61850_INTERNAL xer_type_decoder_f TimeOfDay_decode_xer; +LIB61850_INTERNAL xer_type_encoder_f TimeOfDay_encode_xer; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/TypeSpecification.h b/src/mms/iso_mms/asn1c/TypeSpecification.h index cea38d7b..5f72faba 100644 --- a/src/mms/iso_mms/asn1c/TypeSpecification.h +++ b/src/mms/iso_mms/asn1c/TypeSpecification.h @@ -111,7 +111,7 @@ typedef struct TypeSpecification { } TypeSpecification_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_TypeSpecification; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_TypeSpecification; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/UTF8String.h b/src/mms/iso_mms/asn1c/UTF8String.h index 3bc8ea69..d659ac4d 100644 --- a/src/mms/iso_mms/asn1c/UTF8String.h +++ b/src/mms/iso_mms/asn1c/UTF8String.h @@ -13,10 +13,10 @@ extern "C" { typedef OCTET_STRING_t UTF8String_t; /* Implemented via OCTET STRING */ -extern asn_TYPE_descriptor_t asn_DEF_UTF8String; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_UTF8String; -asn_struct_print_f UTF8String_print; -asn_constr_check_f UTF8String_constraint; +LIB61850_INTERNAL asn_struct_print_f UTF8String_print; +LIB61850_INTERNAL asn_constr_check_f UTF8String_constraint; /* * Returns length of the given UTF-8 string in characters, @@ -27,6 +27,7 @@ asn_constr_check_f UTF8String_constraint; * -4: Not minimal length encoding * -5: Invalid arguments */ +LIB61850_INTERNAL ssize_t UTF8String_length(const UTF8String_t *st); /* @@ -40,6 +41,7 @@ ssize_t UTF8String_length(const UTF8String_t *st); * is equivalent to * UTF8String_length(const UTF8String_t *st); */ +LIB61850_INTERNAL size_t UTF8String_to_wcs(const UTF8String_t *st, uint32_t *dst, size_t dstlen); #ifdef __cplusplus diff --git a/src/mms/iso_mms/asn1c/UnconfirmedPDU.h b/src/mms/iso_mms/asn1c/UnconfirmedPDU.h index fc2366a1..7fa42a81 100644 --- a/src/mms/iso_mms/asn1c/UnconfirmedPDU.h +++ b/src/mms/iso_mms/asn1c/UnconfirmedPDU.h @@ -28,7 +28,7 @@ typedef struct UnconfirmedPDU { } UnconfirmedPDU_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_UnconfirmedPDU; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_UnconfirmedPDU; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/UnconfirmedService.h b/src/mms/iso_mms/asn1c/UnconfirmedService.h index 20ed9e9d..705cbe88 100644 --- a/src/mms/iso_mms/asn1c/UnconfirmedService.h +++ b/src/mms/iso_mms/asn1c/UnconfirmedService.h @@ -37,7 +37,7 @@ typedef struct UnconfirmedService { } UnconfirmedService_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_UnconfirmedService; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_UnconfirmedService; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/Unsigned16.h b/src/mms/iso_mms/asn1c/Unsigned16.h index 8edf3dce..e5eec467 100644 --- a/src/mms/iso_mms/asn1c/Unsigned16.h +++ b/src/mms/iso_mms/asn1c/Unsigned16.h @@ -22,14 +22,14 @@ extern "C" { typedef long Unsigned16_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Unsigned16; -asn_struct_free_f Unsigned16_free; -asn_struct_print_f Unsigned16_print; -asn_constr_check_f Unsigned16_constraint; -ber_type_decoder_f Unsigned16_decode_ber; -der_type_encoder_f Unsigned16_encode_der; -xer_type_decoder_f Unsigned16_decode_xer; -xer_type_encoder_f Unsigned16_encode_xer; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_Unsigned16; +LIB61850_INTERNAL asn_struct_free_f Unsigned16_free; +LIB61850_INTERNAL asn_struct_print_f Unsigned16_print; +LIB61850_INTERNAL asn_constr_check_f Unsigned16_constraint; +LIB61850_INTERNAL ber_type_decoder_f Unsigned16_decode_ber; +LIB61850_INTERNAL der_type_encoder_f Unsigned16_encode_der; +LIB61850_INTERNAL xer_type_decoder_f Unsigned16_decode_xer; +LIB61850_INTERNAL xer_type_encoder_f Unsigned16_encode_xer; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/Unsigned32.h b/src/mms/iso_mms/asn1c/Unsigned32.h index 3fbe1b52..14871af2 100644 --- a/src/mms/iso_mms/asn1c/Unsigned32.h +++ b/src/mms/iso_mms/asn1c/Unsigned32.h @@ -22,14 +22,14 @@ extern "C" { typedef INTEGER_t Unsigned32_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Unsigned32; -asn_struct_free_f Unsigned32_free; -asn_struct_print_f Unsigned32_print; -asn_constr_check_f Unsigned32_constraint; -ber_type_decoder_f Unsigned32_decode_ber; -der_type_encoder_f Unsigned32_encode_der; -xer_type_decoder_f Unsigned32_decode_xer; -xer_type_encoder_f Unsigned32_encode_xer; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_Unsigned32; +LIB61850_INTERNAL asn_struct_free_f Unsigned32_free; +LIB61850_INTERNAL asn_struct_print_f Unsigned32_print; +LIB61850_INTERNAL asn_constr_check_f Unsigned32_constraint; +LIB61850_INTERNAL ber_type_decoder_f Unsigned32_decode_ber; +LIB61850_INTERNAL der_type_encoder_f Unsigned32_encode_der; +LIB61850_INTERNAL xer_type_decoder_f Unsigned32_decode_xer; +LIB61850_INTERNAL xer_type_encoder_f Unsigned32_encode_xer; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/Unsigned8.h b/src/mms/iso_mms/asn1c/Unsigned8.h index 0b813b3e..e1ad5b56 100644 --- a/src/mms/iso_mms/asn1c/Unsigned8.h +++ b/src/mms/iso_mms/asn1c/Unsigned8.h @@ -22,14 +22,14 @@ extern "C" { typedef long Unsigned8_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_Unsigned8; -asn_struct_free_f Unsigned8_free; -asn_struct_print_f Unsigned8_print; -asn_constr_check_f Unsigned8_constraint; -ber_type_decoder_f Unsigned8_decode_ber; -der_type_encoder_f Unsigned8_encode_der; -xer_type_decoder_f Unsigned8_decode_xer; -xer_type_encoder_f Unsigned8_encode_xer; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_Unsigned8; +LIB61850_INTERNAL asn_struct_free_f Unsigned8_free; +LIB61850_INTERNAL asn_struct_print_f Unsigned8_print; +LIB61850_INTERNAL asn_constr_check_f Unsigned8_constraint; +LIB61850_INTERNAL ber_type_decoder_f Unsigned8_decode_ber; +LIB61850_INTERNAL der_type_encoder_f Unsigned8_encode_der; +LIB61850_INTERNAL xer_type_decoder_f Unsigned8_decode_xer; +LIB61850_INTERNAL xer_type_encoder_f Unsigned8_encode_xer; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/UtcTime.h b/src/mms/iso_mms/asn1c/UtcTime.h index 17d6225b..8f94945f 100644 --- a/src/mms/iso_mms/asn1c/UtcTime.h +++ b/src/mms/iso_mms/asn1c/UtcTime.h @@ -22,14 +22,14 @@ extern "C" { typedef OCTET_STRING_t UtcTime_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_UtcTime; -asn_struct_free_f UtcTime_free; -asn_struct_print_f UtcTime_print; -asn_constr_check_f UtcTime_constraint; -ber_type_decoder_f UtcTime_decode_ber; -der_type_encoder_f UtcTime_encode_der; -xer_type_decoder_f UtcTime_decode_xer; -xer_type_encoder_f UtcTime_encode_xer; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_UtcTime; +LIB61850_INTERNAL asn_struct_free_f UtcTime_free; +LIB61850_INTERNAL asn_struct_print_f UtcTime_print; +LIB61850_INTERNAL asn_constr_check_f UtcTime_constraint; +LIB61850_INTERNAL ber_type_decoder_f UtcTime_decode_ber; +LIB61850_INTERNAL der_type_encoder_f UtcTime_encode_der; +LIB61850_INTERNAL xer_type_decoder_f UtcTime_decode_xer; +LIB61850_INTERNAL xer_type_encoder_f UtcTime_encode_xer; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/VariableAccessSpecification.h b/src/mms/iso_mms/asn1c/VariableAccessSpecification.h index 7b16064a..587e7648 100644 --- a/src/mms/iso_mms/asn1c/VariableAccessSpecification.h +++ b/src/mms/iso_mms/asn1c/VariableAccessSpecification.h @@ -51,7 +51,7 @@ typedef struct VariableAccessSpecification { } VariableAccessSpecification_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_VariableAccessSpecification; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_VariableAccessSpecification; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/VariableSpecification.h b/src/mms/iso_mms/asn1c/VariableSpecification.h index efc2a9ad..7d09d7df 100644 --- a/src/mms/iso_mms/asn1c/VariableSpecification.h +++ b/src/mms/iso_mms/asn1c/VariableSpecification.h @@ -60,7 +60,7 @@ typedef struct VariableSpecification { } VariableSpecification_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_VariableSpecification; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_VariableSpecification; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/VisibleString.h b/src/mms/iso_mms/asn1c/VisibleString.h index 20ba8cc5..04d8068d 100644 --- a/src/mms/iso_mms/asn1c/VisibleString.h +++ b/src/mms/iso_mms/asn1c/VisibleString.h @@ -13,9 +13,9 @@ extern "C" { typedef OCTET_STRING_t VisibleString_t; /* Implemented via OCTET STRING */ -extern asn_TYPE_descriptor_t asn_DEF_VisibleString; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_VisibleString; -asn_constr_check_f VisibleString_constraint; +LIB61850_INTERNAL asn_constr_check_f VisibleString_constraint; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/WriteRequest.h b/src/mms/iso_mms/asn1c/WriteRequest.h index 6b1a5ab0..d61237a5 100644 --- a/src/mms/iso_mms/asn1c/WriteRequest.h +++ b/src/mms/iso_mms/asn1c/WriteRequest.h @@ -41,7 +41,7 @@ typedef struct WriteRequest { } WriteRequest_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_WriteRequest; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_WriteRequest; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/WriteResponse.h b/src/mms/iso_mms/asn1c/WriteResponse.h index 5561ed60..2c51490c 100644 --- a/src/mms/iso_mms/asn1c/WriteResponse.h +++ b/src/mms/iso_mms/asn1c/WriteResponse.h @@ -49,7 +49,7 @@ typedef struct WriteResponse { } WriteResponse_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_WriteResponse; +LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_WriteResponse; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/asn_SEQUENCE_OF.h b/src/mms/iso_mms/asn1c/asn_SEQUENCE_OF.h index e678f034..a28ff4fe 100644 --- a/src/mms/iso_mms/asn1c/asn_SEQUENCE_OF.h +++ b/src/mms/iso_mms/asn1c/asn_SEQUENCE_OF.h @@ -35,7 +35,7 @@ extern "C" { * If _do_free is given AND the (*free) is initialized, the element * will be freed using the custom (*free) function as well. */ -void asn_sequence_del(void *asn_sequence_of_x, int number, int _do_free); +LIB61850_INTERNAL void asn_sequence_del(void *asn_sequence_of_x, int number, int _do_free); /* * Cope with different conversions requirements to/from void in C and C++. diff --git a/src/mms/iso_mms/asn1c/asn_SET_OF.h b/src/mms/iso_mms/asn1c/asn_SET_OF.h index 7edf14b5..dc3e21b8 100644 --- a/src/mms/iso_mms/asn1c/asn_SET_OF.h +++ b/src/mms/iso_mms/asn1c/asn_SET_OF.h @@ -29,7 +29,7 @@ extern "C" { * RETURN VALUES: * 0 for success and -1/errno for failure. */ -int asn_set_add(void *asn_set_of_x, void *ptr); +LIB61850_INTERNAL int asn_set_add(void *asn_set_of_x, void *ptr); /* * Delete the element from the set by its number (base 0). @@ -39,13 +39,13 @@ int asn_set_add(void *asn_set_of_x, void *ptr); * If _do_free is given AND the (*free) is initialized, the element * will be freed using the custom (*free) function as well. */ -void asn_set_del(void *asn_set_of_x, int number, int _do_free); +LIB61850_INTERNAL void asn_set_del(void *asn_set_of_x, int number, int _do_free); /* * Empty the contents of the set. Will free the elements, if (*free) is given. * Will NOT free the set itself. */ -void asn_set_empty(void *asn_set_of_x); +LIB61850_INTERNAL void asn_set_empty(void *asn_set_of_x); /* * Cope with different conversions requirements to/from void in C and C++. diff --git a/src/mms/iso_mms/asn1c/asn_codecs_prim.h b/src/mms/iso_mms/asn1c/asn_codecs_prim.h index 0f683fdd..7043ee61 100644 --- a/src/mms/iso_mms/asn1c/asn_codecs_prim.h +++ b/src/mms/iso_mms/asn1c/asn_codecs_prim.h @@ -16,9 +16,9 @@ typedef struct ASN__PRIMITIVE_TYPE_s { int size; /* Size of the buffer */ } ASN__PRIMITIVE_TYPE_t; /* Do not use this type directly! */ -asn_struct_free_f ASN__PRIMITIVE_TYPE_free; -ber_type_decoder_f ber_decode_primitive; -der_type_encoder_f der_encode_primitive; +LIB61850_INTERNAL asn_struct_free_f ASN__PRIMITIVE_TYPE_free; +LIB61850_INTERNAL ber_type_decoder_f ber_decode_primitive; +LIB61850_INTERNAL der_type_encoder_f der_encode_primitive; /* * A callback specification for the xer_decode_primitive() function below. @@ -38,7 +38,7 @@ typedef enum xer_pbd_rval (xer_primitive_body_decoder_f) * Specific function to decode simple primitive types. * Also see xer_decode_general() in xer_decoder.h */ -asn_dec_rval_t xer_decode_primitive(asn_codec_ctx_t *opt_codec_ctx, +LIB61850_INTERNAL asn_dec_rval_t xer_decode_primitive(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *type_descriptor, void **struct_ptr, size_t struct_size, const char *opt_mname, diff --git a/src/mms/iso_mms/asn1c/asn_internal.h b/src/mms/iso_mms/asn1c/asn_internal.h index 2ba232bc..1965b16c 100644 --- a/src/mms/iso_mms/asn1c/asn_internal.h +++ b/src/mms/iso_mms/asn1c/asn_internal.h @@ -24,7 +24,7 @@ extern "C" { /* Environment version might be used to avoid running with the old library */ #define ASN1C_ENVIRONMENT_VERSION 920 /* Compile-time version */ -int get_asn1c_environment_version(void); /* Run-time version */ +LIB61850_INTERNAL int get_asn1c_environment_version(void); /* Run-time version */ #if 0 #ifndef CALLOC diff --git a/src/mms/iso_mms/asn1c/asn_system.h b/src/mms/iso_mms/asn1c/asn_system.h index 0fdb37fa..76f69c5f 100644 --- a/src/mms/iso_mms/asn1c/asn_system.h +++ b/src/mms/iso_mms/asn1c/asn_system.h @@ -17,6 +17,7 @@ #include /* For memcpy(3) */ #include "stack_config.h" +#include "libiec61850_platform_includes.h" #if CONFIG_INCLUDE_PLATFORM_SPECIFIC_HEADERS #include "libiec61850_platform_specific.h" #else diff --git a/src/mms/iso_mms/asn1c/ber_decoder.h b/src/mms/iso_mms/asn1c/ber_decoder.h index 768133b6..303aeb7b 100644 --- a/src/mms/iso_mms/asn1c/ber_decoder.h +++ b/src/mms/iso_mms/asn1c/ber_decoder.h @@ -18,7 +18,7 @@ struct asn_codec_ctx_s; /* Forward declaration */ * The BER decoder of any type. * This function may be invoked directly from the application. */ -asn_dec_rval_t ber_decode(struct asn_codec_ctx_s *opt_codec_ctx, +LIB61850_INTERNAL asn_dec_rval_t ber_decode(struct asn_codec_ctx_s *opt_codec_ctx, struct asn_TYPE_descriptor_s *type_descriptor, void **struct_ptr, /* Pointer to a target structure's pointer */ const void *buffer, /* Data to be decoded */ @@ -45,7 +45,7 @@ typedef asn_dec_rval_t (ber_type_decoder_f)( * "end of content" sequences. The number may only be negative if the * head->last_tag_form is non-zero. */ -asn_dec_rval_t ber_check_tags( +LIB61850_INTERNAL asn_dec_rval_t ber_check_tags( struct asn_codec_ctx_s *opt_codec_ctx, /* codec options */ struct asn_TYPE_descriptor_s *type_descriptor, asn_struct_ctx_t *opt_ctx, /* saved decoding context */ diff --git a/src/mms/iso_mms/asn1c/ber_tlv_length.h b/src/mms/iso_mms/asn1c/ber_tlv_length.h index 34968022..68001747 100644 --- a/src/mms/iso_mms/asn1c/ber_tlv_length.h +++ b/src/mms/iso_mms/asn1c/ber_tlv_length.h @@ -21,7 +21,7 @@ typedef ssize_t ber_tlv_len_t; * On return with >0, len_r is constrained as -1..MAX, where -1 mean * that the value is of indefinite length. */ -ssize_t ber_fetch_length(int _is_constructed, const void *bufptr, size_t size, +LIB61850_INTERNAL ssize_t ber_fetch_length(int _is_constructed, const void *bufptr, size_t size, ber_tlv_len_t *len_r); /* @@ -31,7 +31,7 @@ ssize_t ber_fetch_length(int _is_constructed, const void *bufptr, size_t size, * RETURN VALUES: * Standard {-1,0,>0} convention. */ -ssize_t ber_skip_length( +LIB61850_INTERNAL ssize_t ber_skip_length( struct asn_codec_ctx_s *opt_codec_ctx, /* optional context */ int _is_constructed, const void *bufptr, size_t size); @@ -41,7 +41,7 @@ ssize_t ber_skip_length( * it is a caller's responsibility to check the return value * against the supplied buffer's size. */ -size_t der_tlv_length_serialize(ber_tlv_len_t len, void *bufptr, size_t size); +LIB61850_INTERNAL size_t der_tlv_length_serialize(ber_tlv_len_t len, void *bufptr, size_t size); #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/ber_tlv_tag.h b/src/mms/iso_mms/asn1c/ber_tlv_tag.h index 60e86686..ca1746b3 100644 --- a/src/mms/iso_mms/asn1c/ber_tlv_tag.h +++ b/src/mms/iso_mms/asn1c/ber_tlv_tag.h @@ -31,9 +31,9 @@ typedef unsigned ber_tlv_tag_t; /* BER TAG from Tag-Length-Value */ * (i.e. "[PRIVATE 0]"). * Return values correspond to their libc counterparts (if any). */ -ssize_t ber_tlv_tag_snprint(ber_tlv_tag_t tag, char *buf, size_t buflen); -ssize_t ber_tlv_tag_fwrite(ber_tlv_tag_t tag, FILE *); -char *ber_tlv_tag_string(ber_tlv_tag_t tag); +LIB61850_INTERNAL ssize_t ber_tlv_tag_snprint(ber_tlv_tag_t tag, char *buf, size_t buflen); +LIB61850_INTERNAL ssize_t ber_tlv_tag_fwrite(ber_tlv_tag_t tag, FILE *); +LIB61850_INTERNAL char *ber_tlv_tag_string(ber_tlv_tag_t tag); /* @@ -43,7 +43,7 @@ char *ber_tlv_tag_string(ber_tlv_tag_t tag); * -1: Fatal error deciphering tag. * >0: Number of bytes used from bufptr. tag_r will contain the tag. */ -ssize_t ber_fetch_tag(const void *bufptr, size_t size, ber_tlv_tag_t *tag_r); +LIB61850_INTERNAL ssize_t ber_fetch_tag(const void *bufptr, size_t size, ber_tlv_tag_t *tag_r); /* * This function serializes the tag (T from TLV) in BER format. @@ -51,7 +51,7 @@ ssize_t ber_fetch_tag(const void *bufptr, size_t size, ber_tlv_tag_t *tag_r); * it is a caller's responsibility to check the return value * against the supplied buffer's size. */ -size_t ber_tlv_tag_serialize(ber_tlv_tag_t tag, void *bufptr, size_t size); +LIB61850_INTERNAL size_t ber_tlv_tag_serialize(ber_tlv_tag_t tag, void *bufptr, size_t size); #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/constr_CHOICE.h b/src/mms/iso_mms/asn1c/constr_CHOICE.h index 83404e6d..8d1b289e 100644 --- a/src/mms/iso_mms/asn1c/constr_CHOICE.h +++ b/src/mms/iso_mms/asn1c/constr_CHOICE.h @@ -39,16 +39,16 @@ typedef struct asn_CHOICE_specifics_s { /* * A set specialized functions dealing with the CHOICE type. */ -asn_struct_free_f CHOICE_free; -asn_struct_print_f CHOICE_print; -asn_constr_check_f CHOICE_constraint; -ber_type_decoder_f CHOICE_decode_ber; -der_type_encoder_f CHOICE_encode_der; -xer_type_decoder_f CHOICE_decode_xer; -xer_type_encoder_f CHOICE_encode_xer; -per_type_decoder_f CHOICE_decode_uper; -per_type_encoder_f CHOICE_encode_uper; -asn_outmost_tag_f CHOICE_outmost_tag; +LIB61850_INTERNAL asn_struct_free_f CHOICE_free; +LIB61850_INTERNAL asn_struct_print_f CHOICE_print; +LIB61850_INTERNAL asn_constr_check_f CHOICE_constraint; +LIB61850_INTERNAL ber_type_decoder_f CHOICE_decode_ber; +LIB61850_INTERNAL der_type_encoder_f CHOICE_encode_der; +LIB61850_INTERNAL xer_type_decoder_f CHOICE_decode_xer; +LIB61850_INTERNAL xer_type_encoder_f CHOICE_encode_xer; +LIB61850_INTERNAL per_type_decoder_f CHOICE_decode_uper; +LIB61850_INTERNAL per_type_encoder_f CHOICE_encode_uper; +LIB61850_INTERNAL asn_outmost_tag_f CHOICE_outmost_tag; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/constr_SEQUENCE.h b/src/mms/iso_mms/asn1c/constr_SEQUENCE.h index 5f589d5c..e8c5e1aa 100644 --- a/src/mms/iso_mms/asn1c/constr_SEQUENCE.h +++ b/src/mms/iso_mms/asn1c/constr_SEQUENCE.h @@ -43,15 +43,15 @@ typedef struct asn_SEQUENCE_specifics_s { /* * A set specialized functions dealing with the SEQUENCE type. */ -asn_struct_free_f SEQUENCE_free; -asn_struct_print_f SEQUENCE_print; -asn_constr_check_f SEQUENCE_constraint; -ber_type_decoder_f SEQUENCE_decode_ber; -der_type_encoder_f SEQUENCE_encode_der; -xer_type_decoder_f SEQUENCE_decode_xer; -xer_type_encoder_f SEQUENCE_encode_xer; -per_type_decoder_f SEQUENCE_decode_uper; -per_type_encoder_f SEQUENCE_encode_uper; +LIB61850_INTERNAL asn_struct_free_f SEQUENCE_free; +LIB61850_INTERNAL asn_struct_print_f SEQUENCE_print; +LIB61850_INTERNAL asn_constr_check_f SEQUENCE_constraint; +LIB61850_INTERNAL ber_type_decoder_f SEQUENCE_decode_ber; +LIB61850_INTERNAL der_type_encoder_f SEQUENCE_encode_der; +LIB61850_INTERNAL xer_type_decoder_f SEQUENCE_decode_xer; +LIB61850_INTERNAL xer_type_encoder_f SEQUENCE_encode_xer; +LIB61850_INTERNAL per_type_decoder_f SEQUENCE_decode_uper; +LIB61850_INTERNAL per_type_encoder_f SEQUENCE_encode_uper; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/constr_SEQUENCE_OF.h b/src/mms/iso_mms/asn1c/constr_SEQUENCE_OF.h index e2272f32..b13478ce 100644 --- a/src/mms/iso_mms/asn1c/constr_SEQUENCE_OF.h +++ b/src/mms/iso_mms/asn1c/constr_SEQUENCE_OF.h @@ -22,9 +22,9 @@ extern "C" { #define SEQUENCE_OF_decode_ber SET_OF_decode_ber #define SEQUENCE_OF_decode_xer SET_OF_decode_xer #define SEQUENCE_OF_decode_uper SET_OF_decode_uper -der_type_encoder_f SEQUENCE_OF_encode_der; -xer_type_encoder_f SEQUENCE_OF_encode_xer; -per_type_encoder_f SEQUENCE_OF_encode_uper; +LIB61850_INTERNAL der_type_encoder_f SEQUENCE_OF_encode_der; +LIB61850_INTERNAL xer_type_encoder_f SEQUENCE_OF_encode_xer; +LIB61850_INTERNAL per_type_encoder_f SEQUENCE_OF_encode_uper; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/constr_SET_OF.h b/src/mms/iso_mms/asn1c/constr_SET_OF.h index bcd09662..9d707155 100644 --- a/src/mms/iso_mms/asn1c/constr_SET_OF.h +++ b/src/mms/iso_mms/asn1c/constr_SET_OF.h @@ -25,15 +25,15 @@ typedef struct asn_SET_OF_specifics_s { /* * A set specialized functions dealing with the SET OF type. */ -asn_struct_free_f SET_OF_free; -asn_struct_print_f SET_OF_print; -asn_constr_check_f SET_OF_constraint; -ber_type_decoder_f SET_OF_decode_ber; -der_type_encoder_f SET_OF_encode_der; -xer_type_decoder_f SET_OF_decode_xer; -xer_type_encoder_f SET_OF_encode_xer; -per_type_decoder_f SET_OF_decode_uper; -per_type_encoder_f SET_OF_encode_uper; +LIB61850_INTERNAL asn_struct_free_f SET_OF_free; +LIB61850_INTERNAL asn_struct_print_f SET_OF_print; +LIB61850_INTERNAL asn_constr_check_f SET_OF_constraint; +LIB61850_INTERNAL ber_type_decoder_f SET_OF_decode_ber; +LIB61850_INTERNAL der_type_encoder_f SET_OF_encode_der; +LIB61850_INTERNAL xer_type_decoder_f SET_OF_decode_xer; +LIB61850_INTERNAL xer_type_encoder_f SET_OF_encode_xer; +LIB61850_INTERNAL per_type_decoder_f SET_OF_decode_uper; +LIB61850_INTERNAL per_type_encoder_f SET_OF_encode_uper; #ifdef __cplusplus } diff --git a/src/mms/iso_mms/asn1c/constr_TYPE.h b/src/mms/iso_mms/asn1c/constr_TYPE.h index 95507c80..2e1c7929 100644 --- a/src/mms/iso_mms/asn1c/constr_TYPE.h +++ b/src/mms/iso_mms/asn1c/constr_TYPE.h @@ -169,7 +169,7 @@ typedef struct asn_TYPE_tag2member_s { * -1: Problem dumping the structure. * (See also xer_fprint() in xer_encoder.h) */ -int asn_fprint(FILE *stream, /* Destination stream descriptor */ +LIB61850_INTERNAL int asn_fprint(FILE *stream, /* Destination stream descriptor */ asn_TYPE_descriptor_t *td, /* ASN.1 type descriptor */ const void *struct_ptr); /* Structure to be printed */ diff --git a/src/mms/iso_mms/asn1c/constraints.h b/src/mms/iso_mms/asn1c/constraints.h index 5032345e..95864404 100644 --- a/src/mms/iso_mms/asn1c/constraints.h +++ b/src/mms/iso_mms/asn1c/constraints.h @@ -25,7 +25,7 @@ struct asn_TYPE_descriptor_s; /* Forward declaration */ * This function returns 0 in case all ASN.1 constraints are met * and -1 if one or more constraints were failed. */ -int +LIB61850_INTERNAL int asn_check_constraints(struct asn_TYPE_descriptor_s *type_descriptor, const void *struct_ptr, /* Target language's structure */ char *errbuf, /* Returned error description */ @@ -48,8 +48,8 @@ typedef int (asn_constr_check_f)( * INTERNALLY USEFUL FUNCTIONS * *******************************/ -asn_constr_check_f asn_generic_no_constraint; /* No constraint whatsoever */ -asn_constr_check_f asn_generic_unknown_constraint; /* Not fully supported */ +LIB61850_INTERNAL asn_constr_check_f asn_generic_no_constraint; /* No constraint whatsoever */ +LIB61850_INTERNAL asn_constr_check_f asn_generic_unknown_constraint; /* Not fully supported */ /* * Invoke the callback with a complete error message. diff --git a/src/mms/iso_mms/asn1c/der_encoder.h b/src/mms/iso_mms/asn1c/der_encoder.h index 4e2fb06c..44cd85f3 100644 --- a/src/mms/iso_mms/asn1c/der_encoder.h +++ b/src/mms/iso_mms/asn1c/der_encoder.h @@ -16,14 +16,14 @@ struct asn_TYPE_descriptor_s; /* Forward declaration */ /* * The DER encoder of any type. May be invoked by the application. */ -asn_enc_rval_t der_encode(struct asn_TYPE_descriptor_s *type_descriptor, +LIB61850_INTERNAL asn_enc_rval_t der_encode(struct asn_TYPE_descriptor_s *type_descriptor, void *struct_ptr, /* Structure to be encoded */ asn_app_consume_bytes_f *consume_bytes_cb, void *app_key /* Arbitrary callback argument */ ); /* A variant of der_encode() which encodes data into the pre-allocated buffer */ -asn_enc_rval_t der_encode_to_buffer( +LIB61850_INTERNAL asn_enc_rval_t der_encode_to_buffer( struct asn_TYPE_descriptor_s *type_descriptor, void *struct_ptr, /* Structure to be encoded */ void *buffer, /* Pre-allocated buffer */ @@ -50,7 +50,7 @@ typedef asn_enc_rval_t (der_type_encoder_f)( /* * Write out leading TL[v] sequence according to the type definition. */ -ssize_t der_write_tags( +LIB61850_INTERNAL ssize_t der_write_tags( struct asn_TYPE_descriptor_s *type_descriptor, size_t struct_length, int tag_mode, /* {-1,0,1}: IMPLICIT, no, EXPLICIT */ diff --git a/src/mms/iso_mms/asn1c/per_decoder.h b/src/mms/iso_mms/asn1c/per_decoder.h index 26aaf594..ba9b5a97 100644 --- a/src/mms/iso_mms/asn1c/per_decoder.h +++ b/src/mms/iso_mms/asn1c/per_decoder.h @@ -17,6 +17,7 @@ struct asn_TYPE_descriptor_s; /* Forward declaration */ /* * Unaligned PER decoder of any ASN.1 type. May be invoked by the application. */ +LIB61850_INTERNAL asn_dec_rval_t uper_decode(struct asn_codec_ctx_s *opt_codec_ctx, struct asn_TYPE_descriptor_s *type_descriptor, /* Type to decode */ void **struct_ptr, /* Pointer to a target structure's pointer */ diff --git a/src/mms/iso_mms/asn1c/per_encoder.h b/src/mms/iso_mms/asn1c/per_encoder.h index 9ac130b7..95d7260e 100644 --- a/src/mms/iso_mms/asn1c/per_encoder.h +++ b/src/mms/iso_mms/asn1c/per_encoder.h @@ -17,6 +17,7 @@ struct asn_TYPE_descriptor_s; /* Forward declaration */ /* * Unaligned PER encoder of any ASN.1 type. May be invoked by the application. */ +LIB61850_INTERNAL asn_enc_rval_t uper_encode(struct asn_TYPE_descriptor_s *type_descriptor, void *struct_ptr, /* Structure to be encoded */ asn_app_consume_bytes_f *consume_bytes_cb, /* Data collector */ @@ -24,6 +25,7 @@ asn_enc_rval_t uper_encode(struct asn_TYPE_descriptor_s *type_descriptor, ); /* A variant of uper_encode() which encodes data into the existing buffer */ +LIB61850_INTERNAL asn_enc_rval_t uper_encode_to_buffer( struct asn_TYPE_descriptor_s *type_descriptor, void *struct_ptr, /* Structure to be encoded */ diff --git a/src/mms/iso_mms/asn1c/per_support.h b/src/mms/iso_mms/asn1c/per_support.h index face6ca8..e393129e 100644 --- a/src/mms/iso_mms/asn1c/per_support.h +++ b/src/mms/iso_mms/asn1c/per_support.h @@ -47,6 +47,7 @@ typedef struct asn_per_data_s { * This function returns -1 if the specified number of bits could not be * extracted due to EOD or other conditions. */ +LIB61850_INTERNAL int32_t per_get_few_bits(asn_per_data_t *per_data, int get_nbits); /* @@ -54,12 +55,14 @@ int32_t per_get_few_bits(asn_per_data_t *per_data, int get_nbits); * This function returns -1 if the specified number of bits could not be * extracted due to EOD or other conditions. */ +LIB61850_INTERNAL int per_get_many_bits(asn_per_data_t *pd, uint8_t *dst, int right_align, int get_nbits); /* * Get the length "n" from the Unaligned PER stream. */ +LIB61850_INTERNAL ssize_t uper_get_length(asn_per_data_t *pd, int effective_bound_bits, int *repeat); @@ -67,6 +70,7 @@ ssize_t uper_get_length(asn_per_data_t *pd, /* * Get the normally small non-negative whole number. */ +LIB61850_INTERNAL ssize_t uper_get_nsnnwn(asn_per_data_t *pd); /* @@ -83,9 +87,11 @@ typedef struct asn_per_outp_s { } asn_per_outp_t; /* Output a small number of bits (<= 31) */ +LIB61850_INTERNAL int per_put_few_bits(asn_per_outp_t *per_data, uint32_t bits, int obits); /* Output a large number of bits */ +LIB61850_INTERNAL int per_put_many_bits(asn_per_outp_t *po, const uint8_t *src, int put_nbits); /* @@ -93,11 +99,13 @@ int per_put_many_bits(asn_per_outp_t *po, const uint8_t *src, int put_nbits); * This function returns the number of units which may be flushed * in the next units saving iteration. */ +LIB61850_INTERNAL ssize_t uper_put_length(asn_per_outp_t *po, size_t whole_length); /* * Put the normally small non-negative whole number. */ +LIB61850_INTERNAL int uper_put_nsnnwn(asn_per_outp_t *po, int n); #ifdef __cplusplus diff --git a/src/mms/iso_mms/asn1c/xer_decoder.h b/src/mms/iso_mms/asn1c/xer_decoder.h index cf0d846f..732bce1b 100644 --- a/src/mms/iso_mms/asn1c/xer_decoder.h +++ b/src/mms/iso_mms/asn1c/xer_decoder.h @@ -16,6 +16,7 @@ struct asn_TYPE_descriptor_s; /* Forward declaration */ /* * The XER decoder of any ASN.1 type. May be invoked by the application. */ +LIB61850_INTERNAL asn_dec_rval_t xer_decode(struct asn_codec_ctx_s *opt_codec_ctx, struct asn_TYPE_descriptor_s *type_descriptor, void **struct_ptr, /* Pointer to a target structure's pointer */ @@ -43,6 +44,7 @@ typedef asn_dec_rval_t (xer_type_decoder_f)(asn_codec_ctx_t *opt_codec_ctx, * and others. This function should not be used by applications, as its API * is subject to changes. */ +LIB61850_INTERNAL asn_dec_rval_t xer_decode_general(asn_codec_ctx_t *opt_codec_ctx, asn_struct_ctx_t *ctx, /* Type decoder context */ void *struct_key, /* Treated as opaque pointer */ @@ -67,6 +69,8 @@ asn_dec_rval_t xer_decode_general(asn_codec_ctx_t *opt_codec_ctx, PXER_TEXT, /* Plain text between XER tags */ PXER_COMMENT /* A comment, may be part of */ } pxer_chunk_type_e; + +LIB61850_INTERNAL ssize_t xer_next_token(int *stateContext, const void *buffer, size_t size, pxer_chunk_type_e *_ch_type); @@ -83,6 +87,8 @@ ssize_t xer_next_token(int *stateContext, XCT_UNKNOWN_CL = 6, /* Unexpected tag */ XCT_UNKNOWN_BO = 7 /* Unexpected tag */ } xer_check_tag_e; + +LIB61850_INTERNAL xer_check_tag_e xer_check_tag(const void *buf_ptr, int size, const char *need_tag); @@ -92,11 +98,13 @@ xer_check_tag_e xer_check_tag(const void *buf_ptr, int size, * 1: Whitespace or empty string * 0: Non-whitespace */ +LIB61850_INTERNAL int xer_is_whitespace(const void *chunk_buf, size_t chunk_size); /* * Skip the series of anticipated extensions. */ +LIB61850_INTERNAL int xer_skip_unknown(xer_check_tag_e tcv, ber_tlv_len_t *depth); #ifdef __cplusplus diff --git a/src/mms/iso_mms/asn1c/xer_encoder.h b/src/mms/iso_mms/asn1c/xer_encoder.h index 1cb546a3..56aafa00 100644 --- a/src/mms/iso_mms/asn1c/xer_encoder.h +++ b/src/mms/iso_mms/asn1c/xer_encoder.h @@ -23,6 +23,7 @@ enum xer_encoder_flags_e { /* * The XER encoder of any type. May be invoked by the application. */ +LIB61850_INTERNAL asn_enc_rval_t xer_encode(struct asn_TYPE_descriptor_s *type_descriptor, void *struct_ptr, /* Structure to be encoded */ enum xer_encoder_flags_e xer_flags, @@ -38,6 +39,7 @@ asn_enc_rval_t xer_encode(struct asn_TYPE_descriptor_s *type_descriptor, * -1: Problem printing the structure. * WARNING: No sensible errno value is returned. */ +LIB61850_INTERNAL int xer_fprint(FILE *stream, struct asn_TYPE_descriptor_s *td, void *sptr); /* diff --git a/src/mms/iso_mms/asn1c/xer_support.h b/src/mms/iso_mms/asn1c/xer_support.h index 8b01944a..2d93132f 100644 --- a/src/mms/iso_mms/asn1c/xer_support.h +++ b/src/mms/iso_mms/asn1c/xer_support.h @@ -45,6 +45,7 @@ typedef int (pxml_callback_f)(pxml_chunk_type_e _type, * It will always be lesser than or equal to the specified _size. * The next invocation of this function must account the difference. */ +LIB61850_INTERNAL ssize_t pxml_parse(int *_stateContext, const void *_buf, size_t _size, pxml_callback_f *cb, void *_key); diff --git a/src/mms/iso_mms/client/mms_client_files.c b/src/mms/iso_mms/client/mms_client_files.c index eed99468..55029570 100644 --- a/src/mms/iso_mms/client/mms_client_files.c +++ b/src/mms/iso_mms/client/mms_client_files.c @@ -30,6 +30,7 @@ #include "mms_client_internal.h" #include "ber_encoder.h" #include "ber_decode.h" +#include "ber_integer.h" #include "conversions.h" #if (MMS_OBTAIN_FILE_SERVICE == 1) diff --git a/src/sampled_values/sv_publisher.h b/src/sampled_values/sv_publisher.h index 957e12a8..1ea27c1e 100644 --- a/src/sampled_values/sv_publisher.h +++ b/src/sampled_values/sv_publisher.h @@ -1,7 +1,7 @@ /* * sv_publisher.h * - * Copyright 2016 Michael Zillgith + * Copyright 2016-2018 Michael Zillgith * * This file is part of libIEC61850. * @@ -74,7 +74,7 @@ typedef struct sSVPublisher_ASDU* SVPublisher_ASDU; * \param[in] parameters optional parameters for setting VLAN options and destination MAC address. Use NULL for default values. * \return the new SV publisher instance. */ -SVPublisher +LIB61850_API SVPublisher SVPublisher_create(CommParameters* parameters, const char* interfaceId); /** @@ -85,7 +85,7 @@ SVPublisher_create(CommParameters* parameters, const char* interfaceId); * \param[in] confRev Configuration revision number. Should be incremented each time that the configuration of the logical device changes. * \return the new ASDU instance. */ -SVPublisher_ASDU +LIB61850_API SVPublisher_ASDU SVPublisher_addASDU(SVPublisher self, const char* svID, const char* datset, uint32_t confRev); /** @@ -95,7 +95,7 @@ SVPublisher_addASDU(SVPublisher self, const char* svID, const char* datset, uint * * \param[in] self the Sampled Values publisher instance. */ -void +LIB61850_API void SVPublisher_setupComplete(SVPublisher self); /** @@ -103,7 +103,7 @@ SVPublisher_setupComplete(SVPublisher self); * * \param[in] self the Sampled Values publisher instance. */ -void +LIB61850_API void SVPublisher_publish(SVPublisher self); /** @@ -111,7 +111,7 @@ SVPublisher_publish(SVPublisher self); * * \param[in] self the Sampled Values publisher instance. */ -void +LIB61850_API void SVPublisher_destroy(SVPublisher self); /** @@ -127,7 +127,7 @@ SVPublisher_destroy(SVPublisher self); * * \param[in] self the Sampled Values ASDU instance. */ -void +LIB61850_API void SVPublisher_ASDU_resetBuffer(SVPublisher_ASDU self); /** @@ -136,7 +136,7 @@ SVPublisher_ASDU_resetBuffer(SVPublisher_ASDU self); * \param[in] self the Sampled Values ASDU instance. * \return the offset in bytes within the ASDU data block. */ -int +LIB61850_API int SVPublisher_ASDU_addINT8(SVPublisher_ASDU self); /** @@ -146,7 +146,7 @@ SVPublisher_ASDU_addINT8(SVPublisher_ASDU self); * \param[in] index The offset within the data block of the ASDU in bytes. * \param[in] value The value which should be set. */ -void +LIB61850_API void SVPublisher_ASDU_setINT8(SVPublisher_ASDU self, int index, int8_t value); /** @@ -155,7 +155,7 @@ SVPublisher_ASDU_setINT8(SVPublisher_ASDU self, int index, int8_t value); * \param[in] self the Sampled Values ASDU instance. * \return the offset in bytes within the ASDU data block. */ -int +LIB61850_API int SVPublisher_ASDU_addINT32(SVPublisher_ASDU self); /** @@ -165,7 +165,7 @@ SVPublisher_ASDU_addINT32(SVPublisher_ASDU self); * \param[in] index The offset within the data block of the ASDU in bytes. * \param[in] value The value which should be set. */ -void +LIB61850_API void SVPublisher_ASDU_setINT32(SVPublisher_ASDU self, int index, int32_t value); /** @@ -174,7 +174,7 @@ SVPublisher_ASDU_setINT32(SVPublisher_ASDU self, int index, int32_t value); * \param[in] self the Sampled Values ASDU instance. * \return the offset in bytes of the new element within the ASDU data block. */ -int +LIB61850_API int SVPublisher_ASDU_addINT64(SVPublisher_ASDU self); /** @@ -184,7 +184,7 @@ SVPublisher_ASDU_addINT64(SVPublisher_ASDU self); * \param[in] index The offset within the data block of the ASDU in bytes. * \param[in] value The value which should be set. */ -void +LIB61850_API void SVPublisher_ASDU_setINT64(SVPublisher_ASDU self, int index, int64_t value); /** @@ -193,7 +193,7 @@ SVPublisher_ASDU_setINT64(SVPublisher_ASDU self, int index, int64_t value); * \param[in] self the Sampled Values ASDU instance. * \return the offset in bytes of the new element within the ASDU data block. */ -int +LIB61850_API int SVPublisher_ASDU_addFLOAT(SVPublisher_ASDU self); /** @@ -203,7 +203,7 @@ SVPublisher_ASDU_addFLOAT(SVPublisher_ASDU self); * \param[in] index The offset within the data block of the ASDU in bytes. * \param[in] value The value which should be set. */ -void +LIB61850_API void SVPublisher_ASDU_setFLOAT(SVPublisher_ASDU self, int index, float value); /** @@ -212,7 +212,7 @@ SVPublisher_ASDU_setFLOAT(SVPublisher_ASDU self, int index, float value); * \param[in] self the Sampled Values ASDU instance. * \return the offset in bytes of the new element within the ASDU data block. */ -int +LIB61850_API int SVPublisher_ASDU_addFLOAT64(SVPublisher_ASDU self); /** @@ -222,7 +222,7 @@ SVPublisher_ASDU_addFLOAT64(SVPublisher_ASDU self); * \param[in] index The offset within the data block of the ASDU in bytes. * \param[in] value The value which should be set. */ -void +LIB61850_API void SVPublisher_ASDU_setFLOAT64(SVPublisher_ASDU self, int index, double value); /** @@ -231,7 +231,7 @@ SVPublisher_ASDU_setFLOAT64(SVPublisher_ASDU self, int index, double value); * \param[in] self the Sampled Values ASDU instance. * \return the offset in bytes of the new element within the ASDU data block. */ -int +LIB61850_API int SVPublisher_ASDU_addTimestamp(SVPublisher_ASDU self); /** @@ -241,7 +241,7 @@ SVPublisher_ASDU_addTimestamp(SVPublisher_ASDU self); * \param[in] index The offset within the data block of the ASDU in bytes. * \param[in] value The value which should be set. */ -void +LIB61850_API void SVPublisher_ASDU_setTimestamp(SVPublisher_ASDU self, int index, Timestamp value); /** @@ -252,7 +252,7 @@ SVPublisher_ASDU_setTimestamp(SVPublisher_ASDU self, int index, Timestamp value) * \param[in] self the Sampled Values ASDU instance. * \return the offset in bytes of the new element within the ASDU data block. */ -int +LIB61850_API int SVPublisher_ASDU_addQuality(SVPublisher_ASDU self); /** @@ -262,7 +262,7 @@ SVPublisher_ASDU_addQuality(SVPublisher_ASDU self); * \param[in] index The offset within the data block of the ASDU in bytes. * \param[in] value The value which should be set. */ -void +LIB61850_API void SVPublisher_ASDU_setQuality(SVPublisher_ASDU self, int index, Quality value); /** @@ -271,7 +271,7 @@ SVPublisher_ASDU_setQuality(SVPublisher_ASDU self, int index, Quality value); * \param[in] self the Sampled Values ASDU instance. * \param[in] value the new value of the attribute. */ -void +LIB61850_API void SVPublisher_ASDU_setSmpCnt(SVPublisher_ASDU self, uint16_t value); /** @@ -279,7 +279,7 @@ SVPublisher_ASDU_setSmpCnt(SVPublisher_ASDU self, uint16_t value); * * \param[in] self the Sampled Values ASDU instance. */ -uint16_t +LIB61850_API uint16_t SVPublisher_ASDU_getSmpCnt(SVPublisher_ASDU self); /** @@ -291,7 +291,7 @@ SVPublisher_ASDU_getSmpCnt(SVPublisher_ASDU self); * * \param[in] self the Sampled Values ASDU instance. */ -void +LIB61850_API void SVPublisher_ASDU_increaseSmpCnt(SVPublisher_ASDU self); /** @@ -301,7 +301,7 @@ SVPublisher_ASDU_increaseSmpCnt(SVPublisher_ASDU self); * \param[in] self the Sampled Values ASDU instance. * \param[in] value the new sample counter limit */ -void +LIB61850_API void SVPublisher_ASDU_setSmpCntWrap(SVPublisher_ASDU self, uint16_t value); /** @@ -309,7 +309,7 @@ SVPublisher_ASDU_setSmpCntWrap(SVPublisher_ASDU self, uint16_t value); * * \param[in] self the Sampled Values ASDU instance. */ -void +LIB61850_API void SVPublisher_ASDU_setRefrTm(SVPublisher_ASDU self, uint64_t refrTm); /** @@ -321,7 +321,7 @@ SVPublisher_ASDU_setRefrTm(SVPublisher_ASDU self, uint64_t refrTm); * \param[in] self the Sampled Values ASDU instance. * \param smpMod one of IEC61850_SV_SMPMOD_PER_NOMINAL_PERIOD, IEC61850_SV_SMPMOD_SAMPLES_PER_SECOND or IEC61850_SV_SMPMOD_SECONDS_PER_SAMPLE */ -void +LIB61850_API void SVPublisher_ASDU_setSmpMod(SVPublisher_ASDU self, uint8_t smpMod); /** @@ -333,7 +333,7 @@ SVPublisher_ASDU_setSmpMod(SVPublisher_ASDU self, uint8_t smpMod); * \param[in] self the Sampled Values ASDU instance. * \param smpRate Amount of samples (default per nominal period, see SmpMod). */ -void +LIB61850_API void SVPublisher_ASDU_setSmpRate(SVPublisher_ASDU self, uint16_t smpRate); /**@} @}*/ @@ -357,70 +357,70 @@ typedef struct sSVPublisher* SampledValuesPublisher; typedef struct sSV_ASDU* SV_ASDU; -DEPRECATED SVPublisher +LIB61850_API DEPRECATED SVPublisher SampledValuesPublisher_create(CommParameters* parameters, const char* interfaceId); -DEPRECATED SVPublisher_ASDU +LIB61850_API DEPRECATED SVPublisher_ASDU SampledValuesPublisher_addASDU(SVPublisher self, char* svID, char* datset, uint32_t confRev); -DEPRECATED void +LIB61850_API DEPRECATED void SampledValuesPublisher_setupComplete(SVPublisher self); -DEPRECATED void +LIB61850_API DEPRECATED void SampledValuesPublisher_publish(SVPublisher self); -DEPRECATED void +LIB61850_API DEPRECATED void SampledValuesPublisher_destroy(SVPublisher self); -DEPRECATED void +LIB61850_API DEPRECATED void SV_ASDU_resetBuffer(SVPublisher_ASDU self); -DEPRECATED int +LIB61850_API DEPRECATED int SV_ASDU_addINT8(SVPublisher_ASDU self); -DEPRECATED void +LIB61850_API DEPRECATED void SV_ASDU_setINT8(SVPublisher_ASDU self, int index, int8_t value); -DEPRECATED int +LIB61850_API DEPRECATED int SV_ASDU_addINT32(SVPublisher_ASDU self); -DEPRECATED void +LIB61850_API DEPRECATED void SV_ASDU_setINT32(SVPublisher_ASDU self, int index, int32_t value); -DEPRECATED int +LIB61850_API DEPRECATED int SV_ASDU_addINT64(SVPublisher_ASDU self); -DEPRECATED void +LIB61850_API DEPRECATED void SV_ASDU_setINT64(SVPublisher_ASDU self, int index, int64_t value); -DEPRECATED int +LIB61850_API DEPRECATED int SV_ASDU_addFLOAT(SVPublisher_ASDU self); -DEPRECATED void +LIB61850_API DEPRECATED void SV_ASDU_setFLOAT(SVPublisher_ASDU self, int index, float value); -DEPRECATED int +LIB61850_API DEPRECATED int SV_ASDU_addFLOAT64(SVPublisher_ASDU self); -DEPRECATED void +LIB61850_API DEPRECATED void SV_ASDU_setFLOAT64(SVPublisher_ASDU self, int index, double value); -void DEPRECATED +LIB61850_API DEPRECATED void SV_ASDU_setSmpCnt(SVPublisher_ASDU self, uint16_t value); -DEPRECATED uint16_t +LIB61850_API DEPRECATED uint16_t SV_ASDU_getSmpCnt(SVPublisher_ASDU self); -DEPRECATED void +LIB61850_API DEPRECATED void SV_ASDU_increaseSmpCnt(SVPublisher_ASDU self); -DEPRECATED void +LIB61850_API DEPRECATED void SV_ASDU_setRefrTm(SVPublisher_ASDU self, uint64_t refrTm); -DEPRECATED void +LIB61850_API DEPRECATED void SV_ASDU_setSmpMod(SVPublisher_ASDU self, uint8_t smpMod); -DEPRECATED void +LIB61850_API DEPRECATED void SV_ASDU_setSmpRate(SVPublisher_ASDU self, uint16_t smpRate); /**@}*/ diff --git a/src/sampled_values/sv_subscriber.h b/src/sampled_values/sv_subscriber.h index 7379ac0b..7b427d90 100644 --- a/src/sampled_values/sv_subscriber.h +++ b/src/sampled_values/sv_subscriber.h @@ -129,7 +129,7 @@ typedef struct sSVReceiver* SVReceiver; * * \return the newly created receiver instance */ -SVReceiver +LIB61850_API SVReceiver SVReceiver_create(void); /** @@ -137,7 +137,7 @@ SVReceiver_create(void); * * \param self the receiver instance reference */ -void +LIB61850_API void SVReceiver_disableDestAddrCheck(SVReceiver self); /** @@ -150,7 +150,7 @@ SVReceiver_disableDestAddrCheck(SVReceiver self); * * \param self the receiver instance reference */ -void +LIB61850_API void SVReceiver_enableDestAddrCheck(SVReceiver self); /** @@ -163,7 +163,7 @@ SVReceiver_enableDestAddrCheck(SVReceiver self); * \param self the receiver instance reference * \param interfaceId the Ethernet interface id (platform specific e.g. eth0 for linux). */ -void +LIB61850_API void SVReceiver_setInterfaceId(SVReceiver self, const char* interfaceId); /** @@ -174,7 +174,7 @@ SVReceiver_setInterfaceId(SVReceiver self, const char* interfaceId); * \param self the receiver instance reference * \param subscriber the subscriber instance to connect */ -void +LIB61850_API void SVReceiver_addSubscriber(SVReceiver self, SVSubscriber subscriber); /** @@ -183,7 +183,7 @@ SVReceiver_addSubscriber(SVReceiver self, SVSubscriber subscriber); * \param self the receiver instance reference * \param subscriber the subscriber instance to disconnect */ -void +LIB61850_API void SVReceiver_removeSubscriber(SVReceiver self, SVSubscriber subscriber); /** @@ -193,7 +193,7 @@ SVReceiver_removeSubscriber(SVReceiver self, SVSubscriber subscriber); * * \param self the receiver instance reference */ -void +LIB61850_API void SVReceiver_start(SVReceiver self); /** @@ -201,7 +201,7 @@ SVReceiver_start(SVReceiver self); * * \param self the receiver instance reference */ -void +LIB61850_API void SVReceiver_stop(SVReceiver self); /** @@ -213,7 +213,7 @@ SVReceiver_stop(SVReceiver self); * * \return true if SV receiver is running, false otherwise */ -bool +LIB61850_API bool SVReceiver_isRunning(SVReceiver self); /** @@ -221,17 +221,17 @@ SVReceiver_isRunning(SVReceiver self); * * \param self the receiver instance reference */ -void +LIB61850_API void SVReceiver_destroy(SVReceiver self); /*************************************** * Functions for non-threaded operation ***************************************/ -EthernetSocket +LIB61850_API EthernetSocket SVReceiver_startThreadless(SVReceiver self); -void +LIB61850_API void SVReceiver_stopThreadless(SVReceiver self); /** @@ -243,14 +243,14 @@ SVReceiver_stopThreadless(SVReceiver self); * * \return true if a message was available and has been parsed, false otherwise */ -bool +LIB61850_API bool SVReceiver_tick(SVReceiver self); /* * Subscriber */ -SVSubscriber +LIB61850_API SVSubscriber SVSubscriber_create(const uint8_t* ethAddr, uint16_t appID); /** @@ -265,10 +265,10 @@ SVSubscriber_create(const uint8_t* ethAddr, uint16_t appID); * \param a user provided parameter that is provided to the callback function * */ -void +LIB61850_API void SVSubscriber_setListener(SVSubscriber self, SVUpdateListener listener, void* parameter); -void +LIB61850_API void SVSubscriber_destroy(SVSubscriber self); /************************************************************************* @@ -288,7 +288,7 @@ SVSubscriber_destroy(SVSubscriber self); * * \param self ASDU object instance */ -uint16_t +LIB61850_API uint16_t SVSubscriber_ASDU_getSmpCnt(SVSubscriber_ASDU self); /** @@ -296,7 +296,7 @@ SVSubscriber_ASDU_getSmpCnt(SVSubscriber_ASDU self); * * \param self ASDU object instance */ -const char* +LIB61850_API const char* SVSubscriber_ASDU_getSvId(SVSubscriber_ASDU self); /** @@ -304,7 +304,7 @@ SVSubscriber_ASDU_getSvId(SVSubscriber_ASDU self); * * \param self ASDU object instance */ -const char* +LIB61850_API const char* SVSubscriber_ASDU_getDatSet(SVSubscriber_ASDU self); /** @@ -312,7 +312,7 @@ SVSubscriber_ASDU_getDatSet(SVSubscriber_ASDU self); * * \param self ASDU object instance */ -uint32_t +LIB61850_API uint32_t SVSubscriber_ASDU_getConfRev(SVSubscriber_ASDU self); /** @@ -320,7 +320,7 @@ SVSubscriber_ASDU_getConfRev(SVSubscriber_ASDU self); * * \param self ASDU object instance */ -uint8_t +LIB61850_API uint8_t SVSubscriber_ASDU_getSmpMod(SVSubscriber_ASDU self); /** @@ -328,7 +328,7 @@ SVSubscriber_ASDU_getSmpMod(SVSubscriber_ASDU self); * * \param self ASDU object instance */ -uint16_t +LIB61850_API uint16_t SVSubscriber_ASDU_getSmpRate(SVSubscriber_ASDU self); /** @@ -338,7 +338,7 @@ SVSubscriber_ASDU_getSmpRate(SVSubscriber_ASDU self); * * \return true if DatSet value is present, false otherwise */ -bool +LIB61850_API bool SVSubscriber_ASDU_hasDatSet(SVSubscriber_ASDU self); /** @@ -348,7 +348,7 @@ SVSubscriber_ASDU_hasDatSet(SVSubscriber_ASDU self); * * \return true if RefrTm value is present, false otherwise */ -bool +LIB61850_API bool SVSubscriber_ASDU_hasRefrTm(SVSubscriber_ASDU self); /** @@ -358,7 +358,7 @@ SVSubscriber_ASDU_hasRefrTm(SVSubscriber_ASDU self); * * \return true if SmpMod value is present, false otherwise */ -bool +LIB61850_API bool SVSubscriber_ASDU_hasSmpMod(SVSubscriber_ASDU self); /** @@ -368,7 +368,7 @@ SVSubscriber_ASDU_hasSmpMod(SVSubscriber_ASDU self); * * \return true if SmpRate value is present, false otherwise */ -bool +LIB61850_API bool SVSubscriber_ASDU_hasSmpRate(SVSubscriber_ASDU self); /** @@ -378,7 +378,7 @@ SVSubscriber_ASDU_hasSmpRate(SVSubscriber_ASDU self); * * \return the time value as ms timestamp or 0 if RefrTm is not present in the SV ASDU */ -uint64_t +LIB61850_API uint64_t SVSubscriber_ASDU_getRefrTmAsMs(SVSubscriber_ASDU self); /** @@ -389,7 +389,7 @@ SVSubscriber_ASDU_getRefrTmAsMs(SVSubscriber_ASDU self); * * \return SV data */ -int8_t +LIB61850_API int8_t SVSubscriber_ASDU_getINT8(SVSubscriber_ASDU self, int index); /** @@ -400,7 +400,7 @@ SVSubscriber_ASDU_getINT8(SVSubscriber_ASDU self, int index); * * \return SV data */ -int16_t +LIB61850_API int16_t SVSubscriber_ASDU_getINT16(SVSubscriber_ASDU self, int index); /** @@ -411,7 +411,7 @@ SVSubscriber_ASDU_getINT16(SVSubscriber_ASDU self, int index); * * \return SV data */ -int32_t +LIB61850_API int32_t SVSubscriber_ASDU_getINT32(SVSubscriber_ASDU self, int index); /** @@ -422,7 +422,7 @@ SVSubscriber_ASDU_getINT32(SVSubscriber_ASDU self, int index); * * \return SV data */ -int64_t +LIB61850_API int64_t SVSubscriber_ASDU_getINT64(SVSubscriber_ASDU self, int index); /** @@ -433,7 +433,7 @@ SVSubscriber_ASDU_getINT64(SVSubscriber_ASDU self, int index); * * \return SV data */ -uint8_t +LIB61850_API uint8_t SVSubscriber_ASDU_getINT8U(SVSubscriber_ASDU self, int index); /** @@ -444,7 +444,7 @@ SVSubscriber_ASDU_getINT8U(SVSubscriber_ASDU self, int index); * * \return SV data */ -uint16_t +LIB61850_API uint16_t SVSubscriber_ASDU_getINT16U(SVSubscriber_ASDU self, int index); /** @@ -455,7 +455,7 @@ SVSubscriber_ASDU_getINT16U(SVSubscriber_ASDU self, int index); * * \return SV data */ -uint32_t +LIB61850_API uint32_t SVSubscriber_ASDU_getINT32U(SVSubscriber_ASDU self, int index); /** @@ -466,7 +466,7 @@ SVSubscriber_ASDU_getINT32U(SVSubscriber_ASDU self, int index); * * \return SV data */ -uint64_t +LIB61850_API uint64_t SVSubscriber_ASDU_getINT64U(SVSubscriber_ASDU self, int index); /** @@ -477,7 +477,7 @@ SVSubscriber_ASDU_getINT64U(SVSubscriber_ASDU self, int index); * * \return SV data */ -float +LIB61850_API float SVSubscriber_ASDU_getFLOAT32(SVSubscriber_ASDU self, int index); /** @@ -488,7 +488,7 @@ SVSubscriber_ASDU_getFLOAT32(SVSubscriber_ASDU self, int index); * * \return SV data */ -double +LIB61850_API double SVSubscriber_ASDU_getFLOAT64(SVSubscriber_ASDU self, int index); /** @@ -499,7 +499,7 @@ SVSubscriber_ASDU_getFLOAT64(SVSubscriber_ASDU self, int index); * * \return SV data */ -Timestamp +LIB61850_API Timestamp SVSubscriber_ASDU_getTimestamp(SVSubscriber_ASDU self, int index); /** @@ -512,7 +512,7 @@ SVSubscriber_ASDU_getTimestamp(SVSubscriber_ASDU self, int index); * * \return SV data */ -Quality +LIB61850_API Quality SVSubscriber_ASDU_getQuality(SVSubscriber_ASDU self, int index); /** @@ -522,7 +522,7 @@ SVSubscriber_ASDU_getQuality(SVSubscriber_ASDU self, int index); * * \return size of the ASDU data part in bytes. */ -int +LIB61850_API int SVSubscriber_ASDU_getDataSize(SVSubscriber_ASDU self); #ifndef DEPRECATED @@ -542,52 +542,52 @@ SVSubscriber_ASDU_getDataSize(SVSubscriber_ASDU self); typedef struct sSVSubscriberASDU* SVClientASDU; -DEPRECATED uint16_t +LIB61850_API DEPRECATED uint16_t SVClientASDU_getSmpCnt(SVSubscriber_ASDU self); -DEPRECATED const char* +LIB61850_API DEPRECATED const char* SVClientASDU_getSvId(SVSubscriber_ASDU self); -DEPRECATED uint32_t +LIB61850_API DEPRECATED uint32_t SVClientASDU_getConfRev(SVSubscriber_ASDU self); -DEPRECATED bool +LIB61850_API DEPRECATED bool SVClientASDU_hasRefrTm(SVSubscriber_ASDU self); -DEPRECATED uint64_t +LIB61850_API DEPRECATED uint64_t SVClientASDU_getRefrTmAsMs(SVSubscriber_ASDU self); -DEPRECATED int8_t +LIB61850_API DEPRECATED int8_t SVClientASDU_getINT8(SVSubscriber_ASDU self, int index); -DEPRECATED int16_t +LIB61850_API DEPRECATED int16_t SVClientASDU_getINT16(SVSubscriber_ASDU self, int index); -DEPRECATED int32_t +LIB61850_API DEPRECATED int32_t SVClientASDU_getINT32(SVSubscriber_ASDU self, int index); -DEPRECATED int64_t +LIB61850_API DEPRECATED int64_t SVClientASDU_getINT64(SVSubscriber_ASDU self, int index); -DEPRECATED uint8_t +LIB61850_API DEPRECATED uint8_t SVClientASDU_getINT8U(SVSubscriber_ASDU self, int index); -DEPRECATED uint16_t +LIB61850_API DEPRECATED uint16_t SVClientASDU_getINT16U(SVSubscriber_ASDU self, int index); -DEPRECATED uint32_t +LIB61850_API DEPRECATED uint32_t SVClientASDU_getINT32U(SVSubscriber_ASDU self, int index); -DEPRECATED uint64_t +LIB61850_API DEPRECATED uint64_t SVClientASDU_getINT64U(SVSubscriber_ASDU self, int index); -DEPRECATED float +LIB61850_API DEPRECATED float SVClientASDU_getFLOAT32(SVSubscriber_ASDU self, int index); -DEPRECATED double +LIB61850_API DEPRECATED double SVClientASDU_getFLOAT64(SVSubscriber_ASDU self, int index); -DEPRECATED int +LIB61850_API DEPRECATED int SVClientASDU_getDataSize(SVSubscriber_ASDU self); /**@} @}*/ diff --git a/src/vs/libiec61850-wo-goose.def b/src/vs/libiec61850-wo-goose.def deleted file mode 100644 index 1d98f484..00000000 --- a/src/vs/libiec61850-wo-goose.def +++ /dev/null @@ -1,623 +0,0 @@ -EXPORTS - Asn1PrimitivaValue_compare @13 - Asn1PrimitiveValue_clone @14 - Asn1PrimitiveValue_create @15 - Asn1PrimitiveValue_destroy @16 - Asn1PrimitiveValue_getMaxSize @17 - Asn1PrimitiveValue_getSize @18 - CAC_Point_create @90 - CAC_ScaledValueConfig_create @91 - CAC_Unit_create @92 - CAC_ValWithTrans_create @93 - CAC_Vector_create @94 - CDC_ACD_create @95 - CDC_ACT_create @96 - CDC_ASG_create @97 - CDC_BCR_create @98 - CDC_BSC_create @99 - CDC_CMV_create @100 - CDC_DEL_create @101 - CDC_DPC_create @102 - CDC_DPS_create @103 - CDC_ENC_create @104 - CDC_ENG_create @105 - CDC_ENS_create @106 - CDC_HST_create @107 - CDC_INC_create @108 - CDC_ING_create @109 - CDC_INS_create @110 - CDC_LPL_create @111 - CDC_MV_create @112 - CDC_SAV_create @113 - CDC_SEC_create @114 - CDC_SPC_create @115 - CDC_SPG_create @116 - CDC_SPS_create @117 - CDC_WYE_create @118 - ClientConnection_getPeerAddress @129 - ClientConnection_getSecurityToken @130 - ClientDataSet_destroy @131 - ClientDataSet_getDataSetSize @132 - ClientDataSet_getReference @133 - ClientDataSet_getValues @134 - ClientReportControlBlock_create @156 - ClientReportControlBlock_destroy @157 - ClientReportControlBlock_getBufTm @158 - ClientReportControlBlock_getDataSetReference @160 - ClientReportControlBlock_getEntryId @161 - ClientReportControlBlock_getEntryTime @162 - ClientReportControlBlock_getGI @163 - ClientReportControlBlock_getIntgPd @164 - ClientReportControlBlock_getObjectReference @165 - ClientReportControlBlock_getOptFlds @166 - ClientReportControlBlock_getOwner @167 - ClientReportControlBlock_getPurgeBuf @168 - ClientReportControlBlock_getResv @169 - ClientReportControlBlock_getResvTms @170 - ClientReportControlBlock_getRptEna @171 - ClientReportControlBlock_getRptId @172 - ClientReportControlBlock_getSqNum @173 - ClientReportControlBlock_getTrgOps @174 - ClientReportControlBlock_isBuffered @175 - ClientReportControlBlock_setBufTm @176 - ClientReportControlBlock_setDataSetReference @177 - ClientReportControlBlock_setEntryId @178 - ClientReportControlBlock_setGI @179 - ClientReportControlBlock_setIntgPd @180 - ClientReportControlBlock_setOptFlds @181 - ClientReportControlBlock_setPurgeBuf @182 - ClientReportControlBlock_setResv @183 - ClientReportControlBlock_setResvTms @184 - ClientReportControlBlock_setRptEna @185 - ClientReportControlBlock_setRptId @186 - ClientReportControlBlock_setTrgOps @187 - ClientReport_create @188 - ClientReport_destroy @189 - ClientReport_getDataSetValues - ClientReport_getEntryId @191 - ClientReport_getRcbReference @192 - ClientReport_getReasonForInclusion @193 - ClientReport_getTimestamp @194 - ClientReport_hasTimestamp @195 - ClientReport_getRptId - ConfigFileParser_createModelFromConfigFile @210 - ControlObjectClient_cancel @211 - ControlObjectClient_create @212 - ControlObjectClient_destroy @213 - ControlObjectClient_enableInterlockCheck @214 - ControlObjectClient_enableSynchroCheck @215 - ControlObjectClient_getControlModel @216 - ControlObjectClient_getLastApplError @217 - ControlObjectClient_getObjectReference @218 - ControlObjectClient_operate @219 - ControlObjectClient_select @220 - ControlObjectClient_selectWithValue @221 - ControlObjectClient_setLastApplError @222 - ControlObjectClient_setCommandTerminationHandler - DataAttribute_create @273 - DataObject_create @274 - DataObject_hasFCData @275 - DataSetEntry_create @276 - DataSet_create @277 - FileDirectoryEntry_create @291 - FileDirectoryEntry_destroy @292 - FileDirectoryEntry_getFileName @293 - FileDirectoryEntry_getFileSize @294 - FileDirectoryEntry_getLastModified @295 - FileSystem_closeDirectory @296 - FileSystem_closeFile @297 - FileSystem_deleteFile @298 - FileSystem_getFileInfo @299 - FileSystem_openDirectory @300 - FileSystem_openFile @301 - FileSystem_readDirectory @302 - FileSystem_readFile @303 - FileSystem_renameFile @304 - FunctionalConstraint_fromString @313 - FunctionalConstraint_toString @314 - GSEControlBlock_create @316 - Hal_getTimeInMs @354 - IedConnection_abort @366 - IedConnection_close @367 - IedConnection_connect @368 - IedConnection_create @369 - IedConnection_createDataSet @370 - IedConnection_deleteDataSet @371 - IedConnection_deleteFile @372 - IedConnection_destroy @373 - IedConnection_getDataDirectory @376 - IedConnection_getDataDirectoryFC @377 - IedConnection_getDataSetDirectory @378 - IedConnection_getDeviceModelFromServer @379 - IedConnection_getFile @380 - IedConnection_getFileDirectory @381 - IedConnection_getLastApplError @383 - IedConnection_getLogicalDeviceDirectory @384 - IedConnection_getLogicalDeviceList @385 - IedConnection_getLogicalNodeDirectory @386 - IedConnection_getLogicalNodeVariables @387 - IedConnection_getMmsConnection @388 - IedConnection_getRCBValues @389 - IedConnection_getServerDirectory @390 - IedConnection_getState @391 - IedConnection_getVariableSpecification @392 - IedConnection_installConnectionClosedHandler @393 - IedConnection_installReportHandler @394 - IedConnection_readDataSetValues @395 - IedConnection_readObject @396 - IedConnection_release @397 - IedConnection_setRCBValues @401 - IedConnection_triggerGIReport @402 - IedConnection_uninstallReportHandler @403 - IedConnection_writeObject @404 - IedModel_create @405 - IedModel_destroy @406 - IedModel_getDevice @407 - IedModel_getLogicalDeviceCount @408 - IedModel_getModelNodeByObjectReference @409 - IedModel_getModelNodeByShortAddress @410 - IedModel_lookupDataSet @411 - IedModel_setAttributeValuesToNull @412 - IedServer_create @413 - IedServer_destroy @414 - IedServer_getAttributeValue @416 - IedServer_getDataModel @417 - IedServer_getFunctionalConstrainedData @418 - IedServer_getMmsServer @420 - IedServer_handleWriteAccess @421 - IedServer_isRunning @422 - IedServer_lockDataModel @423 - IedServer_setAuthenticator @425 - IedServer_setConnectionIndicationHandler @426 - IedServer_setControlHandler @427 - IedServer_setPerformCheckHandler @428 - IedServer_setWaitForExecutionHandler @429 - IedServer_setWriteAccessPolicy @430 - IedServer_start @431 - IedServer_stop @432 - IedServer_unlockDataModel @433 - IedServer_updateAttributeValue @434 - IedServer_updateBitStringAttributeValue @435 - IedServer_updateBooleanAttributeValue @436 - IedServer_updateFloatAttributeValue @437 - IedServer_updateInt32AttributeValue @438 - IedServer_updateQuality @439 - IedServer_updateUTCTimeAttributeValue @440 - IedServer_updateUnsignedAttributeValue @441 - IsoConnectionParameters_create @479 - IsoConnectionParameters_destroy @480 - IsoConnectionParameters_setAcseAuthenticationParameter @481 - IsoConnectionParameters_setLocalAddresses @482 - IsoConnectionParameters_setLocalApTitle @483 - IsoConnectionParameters_setRemoteAddresses @484 - IsoConnectionParameters_setRemoteApTitle @485 - IsoConnectionParameters_setTcpParameters @486 - IsoConnection_close @487 - IsoConnection_create @488 - IsoConnection_getPeerAddress @489 - IsoConnection_getSecurityToken @490 - IsoServer_closeConnection @502 - IsoServer_create @503 - IsoServer_destroy @504 - IsoServer_getAuthenticator @505 - IsoServer_getAuthenticatorParameter @506 - IsoServer_getState @507 - IsoServer_setAuthenticator @508 - IsoServer_setConnectionHandler @509 - IsoServer_setLocalIpAddress @510 - IsoServer_setTcpPort @511 - IsoServer_startListening @512 - IsoServer_stopListening @513 - LinkedList_add @523 - LinkedList_create @524 - LinkedList_destroy @525 - LinkedList_destroyDeep @526 - LinkedList_destroyStatic @527 - LinkedList_get @528 - LinkedList_getLastElement @529 - LinkedList_getNext @530 - LinkedList_insertAfter @531 - LinkedList_printStringList @532 - LinkedList_remove @533 - LinkedList_size @534 - LinkedList_getData - LogicalDevice_create @535 - LogicalDevice_getLogicalNodeCount @537 - LogicalNode_create @538 - LogicalNode_hasFCData @539 - MmsConnection_abort @559 - MmsConnection_conclude @560 - MmsConnection_connect @561 - MmsConnection_create @562 - MmsConnection_defineNamedVariableList @563 - MmsConnection_defineNamedVariableListAssociationSpecific @564 - MmsConnection_deleteAssociationSpecificNamedVariableList @565 - MmsConnection_deleteNamedVariableList @566 - MmsConnection_destroy @567 - MmsConnection_fileClose @568 - MmsConnection_fileDelete @569 - MmsConnection_fileOpen @570 - MmsConnection_fileRead @571 - MmsConnection_fileRename @572 - MmsConnection_getDomainNames @573 - MmsConnection_getDomainVariableListNames @574 - MmsConnection_getDomainVariableNames @575 - MmsConnection_getFileDirectory @576 - MmsConnection_getIsoConnectionParameters @577 - MmsConnection_getLocalDetail @578 - MmsConnection_getServerStatus @579 - MmsConnection_getVMDVariableNames @580 - MmsConnection_getVariableAccessAttributes @581 - MmsConnection_getVariableListNamesAssociationSpecific @582 - MmsConnection_identify @583 - MmsConnection_readArrayElements @584 - MmsConnection_readMultipleVariables @585 - MmsConnection_readNamedVariableListDirectory @586 - MmsConnection_readNamedVariableListDirectoryAssociationSpecific @587 - MmsConnection_readNamedVariableListValues @588 - MmsConnection_readNamedVariableListValuesAssociationSpecific @589 - MmsConnection_readVariable @590 - MmsConnection_setConnectionLostHandler @591 - MmsConnection_setInformationReportHandler @592 - MmsConnection_setLocalDetail @593 - MmsConnection_setRequestTimeout @594 - MmsConnection_writeMultipleVariables @595 - MmsConnection_writeVariable @596 - MmsDevice_create @597 - MmsDevice_destroy @598 - MmsDevice_getDomain @599 - MmsDomain_addNamedVariableList @600 - MmsDomain_create @601 - MmsDomain_deleteNamedVariableList @602 - MmsDomain_destroy @603 - MmsDomain_getName @604 - MmsDomain_getNamedVariable @605 - MmsDomain_getNamedVariableList @606 - MmsDomain_getNamedVariableLists @607 - MmsServerIdentity_destroy @669 - MmsServer_create @670 - MmsServer_destroy @671 - MmsServer_getDevice @672 - MmsServer_getModelName @673 - MmsServer_getRevision @674 - MmsServer_getVMDLogicalStatus @675 - MmsServer_getVMDPhysicalStatus @676 - MmsServer_getValueFromCache @677 - MmsServer_getVendorName @678 - MmsServer_insertIntoCache @679 - MmsServer_installConnectionHandler @680 - MmsServer_installReadHandler @681 - MmsServer_installWriteHandler @682 - MmsServer_lockModel @683 - MmsServer_setClientAuthenticator @684 - MmsServer_setServerIdentity @686 - MmsServer_setStatusRequestListener @687 - MmsServer_setVMDStatus @688 - MmsServer_startListening @689 - MmsServer_stopListening @690 - MmsServer_unlockModel @691 - MmsValue_clone @696 - MmsValue_cloneToBuffer @697 - MmsValue_createArray @698 - MmsValue_createEmptyStructure @699 - MmsValue_createEmptyArray @700 - MmsValue_delete @701 - MmsValue_deleteAllBitStringBits @702 - MmsValue_deleteConditional @703 - MmsValue_deleteIfNotNull @704 - MmsValue_equalTypes @705 - MmsValue_equals @706 - MmsValue_getArraySize @707 - MmsValue_getBinaryTimeAsUtcMs @708 - MmsValue_getBitStringAsInteger @709 - MmsValue_getBitStringBit @710 - MmsValue_getBitStringByteSize @711 - MmsValue_getBitStringSize @712 - MmsValue_getBoolean @713 - MmsValue_getDataAccessError @714 - MmsValue_getElement @715 - MmsValue_getNumberOfSetBits @716 - MmsValue_getOctetStringBuffer @717 - MmsValue_getOctetStringMaxSize @718 - MmsValue_getOctetStringSize @719 - MmsValue_getSizeInMemory @720 - MmsValue_getSubElement @721 - MmsValue_getType @722 - MmsValue_getUtcTimeInMs @723 - MmsValue_isDeletable @724 - MmsValue_newBinaryTime @726 - MmsValue_newBitString @727 - MmsValue_newBoolean @728 - MmsValue_newDataAccessError @729 - MmsValue_newDefaultValue @730 - MmsValue_newDouble @731 - MmsValue_newFloat @732 - MmsValue_newInteger @733 - MmsValue_newIntegerFromBerInteger @734 - MmsValue_newIntegerFromInt16 @735 - MmsValue_newIntegerFromInt32 @736 - MmsValue_newIntegerFromInt64 @737 - MmsValue_newMmsString @738 - MmsValue_newOctetString @739 - MmsValue_newStructure @740 - MmsValue_newUnsigned @741 - MmsValue_newUnsignedFromBerInteger @742 - MmsValue_newUnsignedFromUint32 @743 - MmsValue_newUtcTime @744 - MmsValue_newUtcTimeByMsTime @745 - MmsValue_newVisibleString @746 - MmsValue_newVisibleStringFromByteArray @747 - MmsValue_setAllBitStringBits @748 - MmsValue_setBinaryTime @749 - MmsValue_setBitStringBit @750 - MmsValue_setBitStringFromInteger @751 - MmsValue_setBoolean @752 - MmsValue_setDeletable @753 - MmsValue_setDeletableRecursive @754 - MmsValue_setDouble @755 - MmsValue_setElement @756 - MmsValue_setFloat @757 - MmsValue_setInt32 @758 - MmsValue_setInt64 @759 - MmsValue_setMmsString @760 - MmsValue_setOctetString @761 - MmsValue_setUint16 @762 - MmsValue_setUint32 @763 - MmsValue_setUint8 @764 - MmsValue_setUtcTime @765 - MmsValue_setUtcTimeByBuffer @766 - MmsValue_setUtcTimeMs @767 - MmsValue_setVisibleString @768 - MmsValue_toDouble @769 - MmsValue_toFloat @770 - MmsValue_toInt32 @771 - MmsValue_toInt64 @772 - MmsValue_toString @773 - MmsValue_toUint32 @774 - MmsValue_toUnixTimestamp @775 - MmsValue_update @776 - MmsValue_getBitStringAsIntegerBigEndian - MmsValue_setBitStringFromIntegerBigEndian - MmsVariableAccessSpecification_create @777 - MmsVariableAccessSpecification_createAlternateAccess @778 - MmsVariableAccessSpecification_destroy @779 - MmsVariableSpecification_destroy @780 - MmsVariableSpecification_getArrayElementSpecification @781 - MmsVariableSpecification_getChildSpecificationByIndex @782 - MmsVariableSpecification_getChildValue @783 - MmsVariableSpecification_getExponentWidth @784 - MmsVariableSpecification_getName @785 - MmsVariableSpecification_getSize @786 - MmsVariableSpecification_getStructureElements @787 - MmsVariableSpecification_getType @788 - MmsVariableSpecification_getNamedVariableRecursive - ModelNode_getChild @789 - ModelNode_getChildCount @790 - ModelNode_getObjectReference @791 - PhyComAddress_create @827 - Quality_fromMmsValue @828 - Quality_getValidity @829 - Quality_isFlagSet @830 - Quality_setFlag @831 - Quality_setValidity @832 - Quality_unsetFlag @833 - Thread_create @893 - Thread_destroy @894 - Thread_sleep @895 - Thread_start @896 - ReportControlBlock_create - IedConnection_readBooleanValue - IedConnection_readFloatValue - IedConnection_readStringValue - IedConnection_readInt32Value - IedConnection_readUnsigned32Value - IedConnection_readTimestampValue - IedConnection_readQualityValue - IedConnection_writeBooleanValue - IedConnection_writeInt32Value - IedConnection_writeUnsigned32Value - IedConnection_writeFloatValue - IedConnection_writeVisibleStringValue - IedConnection_writeOctetString - Timestamp_getTimeInSeconds - Timestamp_getTimeInMs - Timestamp_isLeapSecondKnown - Timestamp_setLeapSecondKnown - Timestamp_hasClockFailure - Timestamp_setClockFailure - Timestamp_isClockNotSynchronized - Timestamp_setClockNotSynchronized - Timestamp_getSubsecondPrecision - Timestamp_setSubsecondPrecision - Timestamp_setTimeInSeconds - Timestamp_setTimeInMilliseconds - MmsValue_getTypeString - IedModel_getModelNodeByShortObjectReference - ClientReportControlBlock_getConfRev - MmsValue_newIntegerFromInt8 - AcseAuthenticationParameter_create - AcseAuthenticationParameter_destroy - AcseAuthenticationParameter_setAuthMechanism - AcseAuthenticationParameter_setPassword - IedServer_startThreadless - IedServer_processIncomingData - IedServer_performPeriodicTasks - IedServer_stopThreadless - Dbpos_fromMmsValue - Dbpos_toMmsValue - SettingGroupControlBlock_create - MmsConnection_setConnectTimeout - IedConnection_setConnectTimeout - MmsValue_newVisibleStringWithSize - MmsValue_newMmsStringWithSize - MmsValue_setInt8 - MmsValue_setInt16 - LogicalDevice_getSettingGroupControlBlock - IedServer_changeActiveSettingGroup - IedServer_setActiveSettingGroupChangedHandler - IedServer_disableGoosePublishing - IedServer_setEditSettingGroupChangedHandler - IedServer_setEditSettingGroupConfirmationHandler - IedConnection_getDataDirectoryByFC - IedServer_getActiveSettingGroup - ClientReport_hasSeqNum - ClientReport_getSeqNum - ClientReport_hasDataSetName - ClientReport_hasReasonForInclusion - ClientReport_hasConfRev - ClientReport_getConfRev - ClientReport_hasBufOvfl - ClientReport_hasDataReference - LibIEC61850_getVersionString - ClientReport_getDataReference - IedServer_getBooleanAttributeValue - IedServer_getInt32AttributeValue - IedServer_getInt64AttributeValue - IedServer_getUInt32AttributeValue - IedServer_getFloatAttributeValue - IedServer_getUTCTimeAttributeValue - IedServer_getBitStringAttributeValue - IedServer_getStringAttributeValue - ModelNode_getChildWithFc - IedServer_updateTimestampAttributeValue - MmsValue_getUtcTimeBuffer - Timestamp_clearFlags - IedServer_setGooseInterfaceId - ClientReport_getBufOvfl - MmsValue_getUtcTimeInMsWithUs - IedModel_setIedNameForDynamicModel - ControlObjectClient_useConstantT - ControlObjectClient_setOrigin - LogicalDevice_getChildByMmsVariableName - LogicalNode_getDataSet - ClientReport_getDataSetName - MmsValue_getStringSize - SVControlBlock_create - SVControlBlock_addPhyComAddress - GSEControlBlock_addPhyComAddress - ClientSVControlBlock_create - ClientSVControlBlock_destroy - ClientSVControlBlock_isMulticast - ClientSVControlBlock_getLastComError - ClientSVControlBlock_setSvEna - ClientSVControlBlock_getSvEna - ClientSVControlBlock_setResv - ClientSVControlBlock_getResv - ClientSVControlBlock_getMsvID - ClientSVControlBlock_getDatSet - ClientSVControlBlock_getConfRev - ClientSVControlBlock_getSmpRate - ClientSVControlBlock_getDstAddress - ClientSVControlBlock_getOptFlds - ClientSVControlBlock_getSmpMod - ClientSVControlBlock_getNoASDU - IedServer_setSVCBHandler - IedModel_getSVControlBlock - MmsValue_printToBuffer - CDC_CTE_create - CDC_SPV_create - CDC_TMS_create - MmsValue_getUtcTimeQuality - MmsConnection_getMmsConnectionParameters - IedServer_updateVisibleStringAttributeValue - MmsValue_setUtcTimeQuality - MmsValue_decodeMmsData - MmsValue_encodeMmsData - ControlObjectClient_setInterlockCheck - ControlObjectClient_setSynchroCheck - LogStorage_addEntry - LogStorage_addEntryData - LogStorage_getEntries - LogStorage_getEntriesAfter - LogStorage_getOldestAndNewestEntries - LogStorage_destroy - IedServer_setLogStorage - MmsJournalEntry_destroy - MmsJournalEntry_getEntryID - MmsJournalEntry_getOccurenceTime - MmsJournalEntry_getJournalVariables - MmsJournalVariable_getTag - MmsJournalVariable_getValue - MmsConnection_readJournalTimeRange - MmsConnection_readJournalStartAfter - LogControlBlock_create - Log_create - IedConnection_queryLogByTime - IedConnection_queryLogAfter - CDC_DPL_create - MmsConnection_setRawMessageHandler - ModelNode_getType - ControlObjectClient_setTestMode - LogStorage_setMaxLogEntries - MmsServer_installObtainFileHandler - MmsServer_installGetFileCompleteHandler - MmsServer_handleBackgroundTasks - FileSystem_writeFile - MmsConnection_obtainFile - IedConnection_setFile - IedConnection_readInt64Value - Timestamp_create - Timestamp_destroy - Timestamp_setByMmsUtcTime - IedServer_setLocalIpAddress - Timestamp_toMmsValue - MmsServer_installFileAccessHandler - MmsServer_setFilestoreBasepath - MmsConnection_setFilestoreBasepath - IedConnection_setFilestoreBasepath - IedServer_setFilestoreBasepath - IedModel_getDeviceByInst - MmsConnection_writeNamedVariableList - IedConnection_writeDataSetValues - MmsVariableSpecification_isValueOfType - IedServer_udpateDbposValue - MmsServer_setLocalIpAddress - MmsServer_isRunning - IedServer_createWithTlsSupport - IedConnection_createWithTlsSupport - ClientGooseControlBlock_getDstAddress - ClientGooseControlBlock_setDstAddress - CDC_VSS_create - CDC_VSG_create - Timestamp_createFromByteArray - IedModel_getDeviceByIndex - IedServerConfig_create - IedServerConfig_destroy - IedServerConfig_setReportBufferSize - IedServerConfig_getReportBufferSize - IedServer_createWithConfig - IedServerConfig_setFileServiceBasePath - IedServerConfig_getFileServiceBasePath - ClientGooseControlBlock_create - ClientGooseControlBlock_destroy - IedConnection_getGoCBValues - IedConnection_setGoCBValues - ClientGooseControlBlock_getGoEna - ClientGooseControlBlock_setGoEna - ClientGooseControlBlock_getGoID - ClientGooseControlBlock_setGoID - ClientGooseControlBlock_getDatSet - ClientGooseControlBlock_setDatSet - ClientGooseControlBlock_getConfRev - ClientGooseControlBlock_getNdsComm - ClientGooseControlBlock_getMinTime - ClientGooseControlBlock_getMaxTime - ClientGooseControlBlock_getFixedOffs - ControlObjectClient_getCtlValType - IedServerConfig_enableFileService - IedServerConfig_isFileServiceEnabled - IedServerConfig_enableDynamicDataSetService - IedServerConfig_isDynamicDataSetServiceEnabled - IedServerConfig_enableLogService - IedServerConfig_isLogServiceEnabled - IedServerConfig_setEdition - IedServerConfig_getEdition - IedServerConfig_setMaxMmsConnections - IedServerConfig_getMaxMmsConnections - IedServerConfig_setMaxDataSetEntries - IedServerConfig_getMaxDatasSetEntries - IedServerConfig_setMaxAssociationSpecificDataSets - IedServerConfig_getMaxAssociationSpecificDataSets - IedServerConfig_setMaxDomainSpecificDataSets - IedServerConfig_getMaxDomainSpecificDataSets - IedServer_setReadAccessHandler diff --git a/src/vs/libiec61850.def b/src/vs/libiec61850.def deleted file mode 100644 index 1f8a5039..00000000 --- a/src/vs/libiec61850.def +++ /dev/null @@ -1,751 +0,0 @@ -EXPORTS - Asn1PrimitivaValue_compare @13 - Asn1PrimitiveValue_clone @14 - Asn1PrimitiveValue_create @15 - Asn1PrimitiveValue_destroy @16 - Asn1PrimitiveValue_getMaxSize @17 - Asn1PrimitiveValue_getSize @18 - CAC_Point_create @90 - CAC_ScaledValueConfig_create @91 - CAC_Unit_create @92 - CAC_ValWithTrans_create @93 - CAC_Vector_create @94 - CDC_ACD_create @95 - CDC_ACT_create @96 - CDC_ASG_create @97 - CDC_BCR_create @98 - CDC_BSC_create @99 - CDC_CMV_create @100 - CDC_DEL_create @101 - CDC_DPC_create @102 - CDC_DPS_create @103 - CDC_ENC_create @104 - CDC_ENG_create @105 - CDC_ENS_create @106 - CDC_HST_create @107 - CDC_INC_create @108 - CDC_ING_create @109 - CDC_INS_create @110 - CDC_LPL_create @111 - CDC_MV_create @112 - CDC_SAV_create @113 - CDC_SEC_create @114 - CDC_SPC_create @115 - CDC_SPG_create @116 - CDC_SPS_create @117 - CDC_WYE_create @118 - ClientConnection_getPeerAddress @129 - ClientConnection_getSecurityToken @130 - ClientDataSet_destroy @131 - ClientDataSet_getDataSetSize @132 - ClientDataSet_getReference @133 - ClientDataSet_getValues @134 - ClientReportControlBlock_create @156 - ClientReportControlBlock_destroy @157 - ClientReportControlBlock_getBufTm @158 - ClientReportControlBlock_getDataSetReference @160 - ClientReportControlBlock_getEntryId @161 - ClientReportControlBlock_getEntryTime @162 - ClientReportControlBlock_getGI @163 - ClientReportControlBlock_getIntgPd @164 - ClientReportControlBlock_getObjectReference @165 - ClientReportControlBlock_getOptFlds @166 - ClientReportControlBlock_getOwner @167 - ClientReportControlBlock_getPurgeBuf @168 - ClientReportControlBlock_getResv @169 - ClientReportControlBlock_getResvTms @170 - ClientReportControlBlock_getRptEna @171 - ClientReportControlBlock_getRptId @172 - ClientReportControlBlock_getSqNum @173 - ClientReportControlBlock_getTrgOps @174 - ClientReportControlBlock_isBuffered @175 - ClientReportControlBlock_setBufTm @176 - ClientReportControlBlock_setDataSetReference @177 - ClientReportControlBlock_setEntryId @178 - ClientReportControlBlock_setGI @179 - ClientReportControlBlock_setIntgPd @180 - ClientReportControlBlock_setOptFlds @181 - ClientReportControlBlock_setPurgeBuf @182 - ClientReportControlBlock_setResv @183 - ClientReportControlBlock_setResvTms @184 - ClientReportControlBlock_setRptEna @185 - ClientReportControlBlock_setRptId @186 - ClientReportControlBlock_setTrgOps @187 - ClientReport_create @188 - ClientReport_destroy @189 - ClientReport_getDataSetValues - ClientReport_getEntryId @191 - ClientReport_getRcbReference @192 - ClientReport_getReasonForInclusion @193 - ClientReport_getTimestamp @194 - ClientReport_hasTimestamp @195 - ClientReport_getRptId - ConfigFileParser_createModelFromConfigFile @210 - ControlObjectClient_cancel @211 - ControlObjectClient_create @212 - ControlObjectClient_destroy @213 - ControlObjectClient_enableInterlockCheck @214 - ControlObjectClient_enableSynchroCheck @215 - ControlObjectClient_getControlModel @216 - ControlObjectClient_getLastApplError @217 - ControlObjectClient_getObjectReference @218 - ControlObjectClient_operate @219 - ControlObjectClient_select @220 - ControlObjectClient_selectWithValue @221 - ControlObjectClient_setLastApplError @222 - ControlObjectClient_setCommandTerminationHandler - DataAttribute_create @273 - DataObject_create @274 - DataObject_hasFCData @275 - DataSetEntry_create @276 - DataSet_create @277 - FileDirectoryEntry_create @291 - FileDirectoryEntry_destroy @292 - FileDirectoryEntry_getFileName @293 - FileDirectoryEntry_getFileSize @294 - FileDirectoryEntry_getLastModified @295 - FileSystem_closeDirectory @296 - FileSystem_closeFile @297 - FileSystem_deleteFile @298 - FileSystem_getFileInfo @299 - FileSystem_openDirectory @300 - FileSystem_openFile @301 - FileSystem_readDirectory @302 - FileSystem_readFile @303 - FileSystem_renameFile @304 - FunctionalConstraint_fromString @313 - FunctionalConstraint_toString @314 - GSEControlBlock_create @316 - GoosePublisher_create @328 - GoosePublisher_destroy @329 - GoosePublisher_increaseStNum @330 - GoosePublisher_publish @331 - GoosePublisher_reset @332 - GoosePublisher_setConfRev @333 - GoosePublisher_setDataSetRef @334 - GoosePublisher_setGoCbRef @335 - GoosePublisher_setGoID @336 - GoosePublisher_setNeedsCommission @337 - GoosePublisher_setSimulation @338 - GoosePublisher_setTimeAllowedToLive @339 - GooseSubscriber_create @340 - GooseSubscriber_destroy @341 - GooseSubscriber_getDataSetValues @342 - GooseSubscriber_getSqNum @343 - GooseSubscriber_getStNum @344 - GooseSubscriber_getTimeAllowedToLive @345 - GooseSubscriber_getTimestamp @346 - GooseSubscriber_isTest @347 - GooseSubscriber_needsCommission @348 - GooseSubscriber_setAppId @349 - GooseSubscriber_setListener @351 - Hal_getTimeInMs @354 - IedConnection_abort @366 - IedConnection_close @367 - IedConnection_connect @368 - IedConnection_create @369 - IedConnection_createDataSet @370 - IedConnection_deleteDataSet @371 - IedConnection_deleteFile @372 - IedConnection_destroy @373 - IedConnection_getDataDirectory @376 - IedConnection_getDataDirectoryFC @377 - IedConnection_getDataSetDirectory @378 - IedConnection_getDeviceModelFromServer @379 - IedConnection_getFile @380 - IedConnection_getFileDirectory @381 - IedConnection_getLastApplError @383 - IedConnection_getLogicalDeviceDirectory @384 - IedConnection_getLogicalDeviceList @385 - IedConnection_getLogicalNodeDirectory @386 - IedConnection_getLogicalNodeVariables @387 - IedConnection_getMmsConnection @388 - IedConnection_getRCBValues @389 - IedConnection_getServerDirectory @390 - IedConnection_getState @391 - IedConnection_getVariableSpecification @392 - IedConnection_installConnectionClosedHandler @393 - IedConnection_installReportHandler @394 - IedConnection_readDataSetValues @395 - IedConnection_readObject @396 - IedConnection_release @397 - IedConnection_setRCBValues @401 - IedConnection_triggerGIReport @402 - IedConnection_uninstallReportHandler @403 - IedConnection_writeObject @404 - IedModel_create @405 - IedModel_destroy @406 - IedModel_getDevice @407 - IedModel_getLogicalDeviceCount @408 - IedModel_getModelNodeByObjectReference @409 - IedModel_getModelNodeByShortAddress @410 - IedModel_lookupDataSet @411 - IedModel_setAttributeValuesToNull @412 - IedServer_create @413 - IedServer_destroy @414 - IedServer_enableGoosePublishing @415 - IedServer_getAttributeValue @416 - IedServer_getDataModel @417 - IedServer_getFunctionalConstrainedData @418 - IedServer_getMmsServer @420 - IedServer_handleWriteAccess @421 - IedServer_isRunning @422 - IedServer_lockDataModel @423 - IedServer_setAuthenticator @425 - IedServer_setConnectionIndicationHandler @426 - IedServer_setControlHandler @427 - IedServer_setPerformCheckHandler @428 - IedServer_setWaitForExecutionHandler @429 - IedServer_setWriteAccessPolicy @430 - IedServer_start @431 - IedServer_stop @432 - IedServer_unlockDataModel @433 - IedServer_updateAttributeValue @434 - IedServer_updateBitStringAttributeValue @435 - IedServer_updateBooleanAttributeValue @436 - IedServer_updateFloatAttributeValue @437 - IedServer_updateInt32AttributeValue @438 - IedServer_updateQuality @439 - IedServer_updateUTCTimeAttributeValue @440 - IedServer_updateUnsignedAttributeValue @441 - IsoConnectionParameters_create @479 - IsoConnectionParameters_destroy @480 - IsoConnectionParameters_setAcseAuthenticationParameter @481 - IsoConnectionParameters_setLocalAddresses @482 - IsoConnectionParameters_setLocalApTitle @483 - IsoConnectionParameters_setRemoteAddresses @484 - IsoConnectionParameters_setRemoteApTitle @485 - IsoConnectionParameters_setTcpParameters @486 - IsoConnection_close @487 - IsoConnection_create @488 - IsoConnection_getPeerAddress @489 - IsoConnection_getSecurityToken @490 - IsoServer_closeConnection @502 - IsoServer_create @503 - IsoServer_destroy @504 - IsoServer_getAuthenticator @505 - IsoServer_getAuthenticatorParameter @506 - IsoServer_getState @507 - IsoServer_setAuthenticator @508 - IsoServer_setConnectionHandler @509 - IsoServer_setLocalIpAddress @510 - IsoServer_setTcpPort @511 - IsoServer_startListening @512 - IsoServer_stopListening @513 - LinkedList_add @523 - LinkedList_create @524 - LinkedList_destroy @525 - LinkedList_destroyDeep @526 - LinkedList_destroyStatic @527 - LinkedList_get @528 - LinkedList_getLastElement @529 - LinkedList_getNext @530 - LinkedList_insertAfter @531 - LinkedList_printStringList @532 - LinkedList_remove @533 - LinkedList_size @534 - LinkedList_getData - LogicalDevice_create @535 - LogicalDevice_getLogicalNodeCount @537 - LogicalNode_create @538 - LogicalNode_hasFCData @539 - MmsConnection_abort @559 - MmsConnection_conclude @560 - MmsConnection_connect @561 - MmsConnection_create @562 - MmsConnection_defineNamedVariableList @563 - MmsConnection_defineNamedVariableListAssociationSpecific @564 - MmsConnection_deleteAssociationSpecificNamedVariableList @565 - MmsConnection_deleteNamedVariableList @566 - MmsConnection_destroy @567 - MmsConnection_fileClose @568 - MmsConnection_fileDelete @569 - MmsConnection_fileOpen @570 - MmsConnection_fileRead @571 - MmsConnection_fileRename @572 - MmsConnection_getDomainNames @573 - MmsConnection_getDomainVariableListNames @574 - MmsConnection_getDomainVariableNames @575 - MmsConnection_getFileDirectory @576 - MmsConnection_getIsoConnectionParameters @577 - MmsConnection_getLocalDetail @578 - MmsConnection_getServerStatus @579 - MmsConnection_getVMDVariableNames @580 - MmsConnection_getVariableAccessAttributes @581 - MmsConnection_getVariableListNamesAssociationSpecific @582 - MmsConnection_identify @583 - MmsConnection_readArrayElements @584 - MmsConnection_readMultipleVariables @585 - MmsConnection_readNamedVariableListDirectory @586 - MmsConnection_readNamedVariableListDirectoryAssociationSpecific @587 - MmsConnection_readNamedVariableListValues @588 - MmsConnection_readNamedVariableListValuesAssociationSpecific @589 - MmsConnection_readVariable @590 - MmsConnection_setConnectionLostHandler @591 - MmsConnection_setInformationReportHandler @592 - MmsConnection_setLocalDetail @593 - MmsConnection_setRequestTimeout @594 - MmsConnection_writeMultipleVariables @595 - MmsConnection_writeVariable @596 - MmsDevice_create @597 - MmsDevice_destroy @598 - MmsDevice_getDomain @599 - MmsDomain_addNamedVariableList @600 - MmsDomain_create @601 - MmsDomain_deleteNamedVariableList @602 - MmsDomain_destroy @603 - MmsDomain_getName @604 - MmsDomain_getNamedVariable @605 - MmsDomain_getNamedVariableList @606 - MmsDomain_getNamedVariableLists @607 - MmsServerIdentity_destroy @669 - MmsServer_create @670 - MmsServer_destroy @671 - MmsServer_getDevice @672 - MmsServer_getModelName @673 - MmsServer_getRevision @674 - MmsServer_getVMDLogicalStatus @675 - MmsServer_getVMDPhysicalStatus @676 - MmsServer_getValueFromCache @677 - MmsServer_getVendorName @678 - MmsServer_insertIntoCache @679 - MmsServer_installConnectionHandler @680 - MmsServer_installReadHandler @681 - MmsServer_installWriteHandler @682 - MmsServer_lockModel @683 - MmsServer_setClientAuthenticator @684 - MmsServer_setServerIdentity @686 - MmsServer_setStatusRequestListener @687 - MmsServer_setVMDStatus @688 - MmsServer_startListening @689 - MmsServer_stopListening @690 - MmsServer_unlockModel @691 - MmsValue_clone @696 - MmsValue_cloneToBuffer @697 - MmsValue_createArray @698 - MmsValue_createEmptyStructure @699 - MmsValue_createEmptyArray @700 - MmsValue_delete @701 - MmsValue_deleteAllBitStringBits @702 - MmsValue_deleteConditional @703 - MmsValue_deleteIfNotNull @704 - MmsValue_equalTypes @705 - MmsValue_equals @706 - MmsValue_getArraySize @707 - MmsValue_getBinaryTimeAsUtcMs @708 - MmsValue_getBitStringAsInteger @709 - MmsValue_getBitStringBit @710 - MmsValue_getBitStringByteSize @711 - MmsValue_getBitStringSize @712 - MmsValue_getBoolean @713 - MmsValue_getDataAccessError @714 - MmsValue_getElement @715 - MmsValue_getNumberOfSetBits @716 - MmsValue_getOctetStringBuffer @717 - MmsValue_getOctetStringMaxSize @718 - MmsValue_getOctetStringSize @719 - MmsValue_getSizeInMemory @720 - MmsValue_getSubElement @721 - MmsValue_getType @722 - MmsValue_getUtcTimeInMs @723 - MmsValue_isDeletable @724 - MmsValue_newBinaryTime @726 - MmsValue_newBitString @727 - MmsValue_newBoolean @728 - MmsValue_newDataAccessError @729 - MmsValue_newDefaultValue @730 - MmsValue_newDouble @731 - MmsValue_newFloat @732 - MmsValue_newInteger @733 - MmsValue_newIntegerFromBerInteger @734 - MmsValue_newIntegerFromInt16 @735 - MmsValue_newIntegerFromInt32 @736 - MmsValue_newIntegerFromInt64 @737 - MmsValue_newMmsString @738 - MmsValue_newOctetString @739 - MmsValue_newStructure @740 - MmsValue_newUnsigned @741 - MmsValue_newUnsignedFromBerInteger @742 - MmsValue_newUnsignedFromUint32 @743 - MmsValue_newUtcTime @744 - MmsValue_newUtcTimeByMsTime @745 - MmsValue_newVisibleString @746 - MmsValue_newVisibleStringFromByteArray @747 - MmsValue_setAllBitStringBits @748 - MmsValue_setBinaryTime @749 - MmsValue_setBitStringBit @750 - MmsValue_setBitStringFromInteger @751 - MmsValue_setBoolean @752 - MmsValue_setDeletable @753 - MmsValue_setDeletableRecursive @754 - MmsValue_setDouble @755 - MmsValue_setElement @756 - MmsValue_setFloat @757 - MmsValue_setInt32 @758 - MmsValue_setInt64 @759 - MmsValue_setMmsString @760 - MmsValue_setOctetString @761 - MmsValue_setUint16 @762 - MmsValue_setUint32 @763 - MmsValue_setUint8 @764 - MmsValue_setUtcTime @765 - MmsValue_setUtcTimeByBuffer @766 - MmsValue_setUtcTimeMs @767 - MmsValue_setVisibleString @768 - MmsValue_toDouble @769 - MmsValue_toFloat @770 - MmsValue_toInt32 @771 - MmsValue_toInt64 @772 - MmsValue_toString @773 - MmsValue_toUint32 @774 - MmsValue_toUnixTimestamp @775 - MmsValue_update @776 - MmsValue_getBitStringAsIntegerBigEndian - MmsValue_setBitStringFromIntegerBigEndian - MmsVariableAccessSpecification_create @777 - MmsVariableAccessSpecification_createAlternateAccess @778 - MmsVariableAccessSpecification_destroy @779 - MmsVariableSpecification_destroy @780 - MmsVariableSpecification_getArrayElementSpecification @781 - MmsVariableSpecification_getChildSpecificationByIndex @782 - MmsVariableSpecification_getChildValue @783 - MmsVariableSpecification_getExponentWidth @784 - MmsVariableSpecification_getName @785 - MmsVariableSpecification_getSize @786 - MmsVariableSpecification_getStructureElements @787 - MmsVariableSpecification_getType @788 - MmsVariableSpecification_getNamedVariableRecursive - ModelNode_getChild @789 - ModelNode_getChildCount @790 - ModelNode_getObjectReference @791 - PhyComAddress_create @827 - Quality_fromMmsValue @828 - Quality_getValidity @829 - Quality_isFlagSet @830 - Quality_setFlag @831 - Quality_setValidity @832 - Quality_unsetFlag @833 - Thread_create @893 - Thread_destroy @894 - Thread_sleep @895 - Thread_start @896 - ReportControlBlock_create - IedConnection_readBooleanValue - IedConnection_readFloatValue - IedConnection_readStringValue - IedConnection_readInt32Value - IedConnection_readUnsigned32Value - IedConnection_readTimestampValue - IedConnection_readQualityValue - IedConnection_writeBooleanValue - IedConnection_writeInt32Value - IedConnection_writeUnsigned32Value - IedConnection_writeFloatValue - IedConnection_writeVisibleStringValue - IedConnection_writeOctetString - Timestamp_getTimeInSeconds - Timestamp_getTimeInMs - Timestamp_isLeapSecondKnown - Timestamp_setLeapSecondKnown - Timestamp_hasClockFailure - Timestamp_setClockFailure - Timestamp_isClockNotSynchronized - Timestamp_setClockNotSynchronized - Timestamp_getSubsecondPrecision - Timestamp_setSubsecondPrecision - Timestamp_setTimeInSeconds - Timestamp_setTimeInMilliseconds - MmsValue_getTypeString - IedModel_getModelNodeByShortObjectReference - ClientReportControlBlock_getConfRev - MmsValue_newIntegerFromInt8 - AcseAuthenticationParameter_create - AcseAuthenticationParameter_destroy - AcseAuthenticationParameter_setAuthMechanism - AcseAuthenticationParameter_setPassword - IedServer_startThreadless - IedServer_processIncomingData - IedServer_performPeriodicTasks - IedServer_stopThreadless - Dbpos_fromMmsValue - Dbpos_toMmsValue - SettingGroupControlBlock_create - MmsConnection_setConnectTimeout - IedConnection_setConnectTimeout - MmsValue_newVisibleStringWithSize - MmsValue_newMmsStringWithSize - MmsValue_setInt8 - MmsValue_setInt16 - LogicalDevice_getSettingGroupControlBlock - IedServer_changeActiveSettingGroup - IedServer_setActiveSettingGroupChangedHandler - IedServer_disableGoosePublishing - IedServer_setEditSettingGroupChangedHandler - IedServer_setEditSettingGroupConfirmationHandler - IedConnection_getDataDirectoryByFC - IedServer_getActiveSettingGroup - ClientReport_hasSeqNum - ClientReport_getSeqNum - ClientReport_hasDataSetName - ClientReport_hasReasonForInclusion - ClientReport_hasConfRev - ClientReport_getConfRev - ClientReport_hasBufOvfl - ClientReport_hasDataReference - LibIEC61850_getVersionString - ClientReport_getDataReference - IedServer_getBooleanAttributeValue - IedServer_getInt32AttributeValue - IedServer_getInt64AttributeValue - IedServer_getUInt32AttributeValue - IedServer_getFloatAttributeValue - IedServer_getUTCTimeAttributeValue - IedServer_getBitStringAttributeValue - IedServer_getStringAttributeValue - ModelNode_getChildWithFc - IedServer_updateTimestampAttributeValue - MmsValue_getUtcTimeBuffer - Timestamp_clearFlags - IedServer_setGooseInterfaceId - ClientReport_getBufOvfl - MmsValue_getUtcTimeInMsWithUs - IedModel_setIedNameForDynamicModel - ControlObjectClient_useConstantT - ControlObjectClient_setOrigin - LogicalDevice_getChildByMmsVariableName - LogicalNode_getDataSet - ClientReport_getDataSetName - MmsValue_getStringSize - SVControlBlock_create - SVControlBlock_addPhyComAddress - GSEControlBlock_addPhyComAddress - SVReceiver_create - SVReceiver_setInterfaceId - SVReceiver_addSubscriber - SVReceiver_removeSubscriber - SVReceiver_start - SVReceiver_stop - SVReceiver_destroy - SVReceiver_startThreadless - SVReceiver_stopThreadless - SVReceiver_tick - SVSubscriber_create - SVSubscriber_setListener - SVSubscriber_destroy - SVClientASDU_getSmpCnt - SVClientASDU_getSvId - SVClientASDU_getConfRev - SVClientASDU_getINT8 - SVClientASDU_getINT16 - SVClientASDU_getINT32 - SVClientASDU_getINT8U - SVClientASDU_getINT16U - SVClientASDU_getINT32U - SVClientASDU_getFLOAT32 - SVClientASDU_getFLOAT64 - SVClientASDU_getDataSize - ClientSVControlBlock_create - ClientSVControlBlock_destroy - ClientSVControlBlock_isMulticast - ClientSVControlBlock_getLastComError - ClientSVControlBlock_setSvEna - ClientSVControlBlock_getSvEna - ClientSVControlBlock_setResv - ClientSVControlBlock_getResv - ClientSVControlBlock_getMsvID - ClientSVControlBlock_getDatSet - ClientSVControlBlock_getConfRev - ClientSVControlBlock_getSmpRate - ClientSVControlBlock_getDstAddress - ClientSVControlBlock_getOptFlds - ClientSVControlBlock_getSmpMod - 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 - CDC_CTE_create - CDC_SPV_create - CDC_TMS_create - MmsValue_getUtcTimeQuality - MmsValue_decodeMmsData - MmsValue_encodeMmsData - MmsConnection_getMmsConnectionParameters - IedServer_updateVisibleStringAttributeValue - ControlObjectClient_setInterlockCheck - ControlObjectClient_setSynchroCheck - LogStorage_addEntry - LogStorage_addEntryData - LogStorage_getEntries - LogStorage_getEntriesAfter - LogStorage_getOldestAndNewestEntries - LogStorage_destroy - IedServer_setLogStorage - MmsJournalEntry_destroy - MmsJournalEntry_getEntryID - MmsJournalEntry_getOccurenceTime - MmsJournalEntry_getJournalVariables - MmsJournalVariable_getTag - MmsJournalVariable_getValue - MmsConnection_readJournalTimeRange - MmsConnection_readJournalStartAfter - LogControlBlock_create - Log_create - IedConnection_queryLogByTime - IedConnection_queryLogAfter - CDC_DPL_create - SV_ASDU_addFLOAT64 - SV_ASDU_setFLOAT64 - MmsConnection_setRawMessageHandler - ModelNode_getType - ControlObjectClient_setTestMode - LogStorage_setMaxLogEntries - MmsServer_installObtainFileHandler - MmsServer_installGetFileCompleteHandler - MmsServer_handleBackgroundTasks - FileSystem_writeFile - MmsConnection_obtainFile - IedConnection_setFile - IedConnection_readInt64Value - Timestamp_create - Timestamp_destroy - Timestamp_setByMmsUtcTime - IedServer_setLocalIpAddress - Timestamp_toMmsValue - MmsServer_installFileAccessHandler - MmsServer_setFilestoreBasepath - MmsConnection_setFilestoreBasepath - IedConnection_setFilestoreBasepath - IedServer_setFilestoreBasepath - GooseReceiver_isRunning - IedModel_getDeviceByInst - MmsConnection_writeNamedVariableList - SVClientASDU_hasRefrTm - SVClientASDU_getRefrTmAsMs - IedConnection_writeDataSetValues - MmsVariableSpecification_isValueOfType - IedServer_udpateDbposValue - MmsServer_setLocalIpAddress - MmsServer_isRunning - IedServer_createWithTlsSupport - IedConnection_createWithTlsSupport - ClientGooseControlBlock_getDstAddress - ClientGooseControlBlock_setDstAddress - SVPublisher_create - SVPublisher_addASDU - SVPublisher_setupComplete - SVPublisher_publish - SVPublisher_destroy - SVPublisher_ASDU_resetBuffer - SVPublisher_ASDU_addINT8 - SVPublisher_ASDU_setINT8 - SVPublisher_ASDU_addINT32 - SVPublisher_ASDU_setINT32 - SVPublisher_ASDU_addINT64 - SVPublisher_ASDU_setINT64 - SVPublisher_ASDU_addFLOAT - SVPublisher_ASDU_setFLOAT - SVPublisher_ASDU_addFLOAT64 - SVPublisher_ASDU_setFLOAT64 - SVPublisher_ASDU_setSmpCnt - SVPublisher_ASDU_getSmpCnt - SVPublisher_ASDU_increaseSmpCnt - SVPublisher_ASDU_setRefrTm - SVPublisher_ASDU_setSmpMod - SVPublisher_ASDU_setSmpRate - SVSubscriber_ASDU_getSmpCnt - SVSubscriber_ASDU_getSvId - SVSubscriber_ASDU_getConfRev - SVSubscriber_ASDU_hasRefrTm - SVSubscriber_ASDU_getRefrTmAsMs - SVSubscriber_ASDU_getINT8 - SVSubscriber_ASDU_getINT16 - SVSubscriber_ASDU_getINT32 - SVSubscriber_ASDU_getINT64 - SVSubscriber_ASDU_getINT8U - SVSubscriber_ASDU_getINT16U - SVSubscriber_ASDU_getINT32U - SVSubscriber_ASDU_getINT64U - SVSubscriber_ASDU_getFLOAT32 - SVSubscriber_ASDU_getFLOAT64 - SVSubscriber_ASDU_getDataSize - CDC_VSS_create - CDC_VSG_create - SVReceiver_isRunning - SVSubscriber_ASDU_getTimestamp - SVPublisher_ASDU_addTimestamp - SVPublisher_ASDU_setTimestamp - SVSubscriber_ASDU_getQuality - SVPublisher_ASDU_addQuality - SVPublisher_ASDU_setQuality - Timestamp_createFromByteArray - IedModel_getDeviceByIndex - SVReceiver_enableDestAddrCheck - IedServerConfig_create - IedServerConfig_destroy - IedServerConfig_setReportBufferSize - IedServerConfig_getReportBufferSize - IedServer_createWithConfig - IedServerConfig_setFileServiceBasePath - IedServerConfig_getFileServiceBasePath - ClientGooseControlBlock_create - ClientGooseControlBlock_destroy - IedConnection_getGoCBValues - IedConnection_setGoCBValues - ClientGooseControlBlock_getGoEna - ClientGooseControlBlock_setGoEna - ClientGooseControlBlock_getGoID - ClientGooseControlBlock_setGoID - ClientGooseControlBlock_getDatSet - ClientGooseControlBlock_setDatSet - ClientGooseControlBlock_getConfRev - ClientGooseControlBlock_getNdsComm - ClientGooseControlBlock_getMinTime - ClientGooseControlBlock_getMaxTime - ClientGooseControlBlock_getFixedOffs - ControlObjectClient_getCtlValType - SVPublisher_ASDU_setSmpCntWrap - IedServerConfig_enableFileService - IedServerConfig_isFileServiceEnabled - IedServerConfig_enableDynamicDataSetService - IedServerConfig_isDynamicDataSetServiceEnabled - IedServerConfig_enableLogService - IedServerConfig_isLogServiceEnabled - IedServerConfig_setEdition - IedServerConfig_getEdition - IedServerConfig_setMaxMmsConnections - IedServerConfig_getMaxMmsConnections - IedServerConfig_setMaxDataSetEntries - IedServerConfig_getMaxDatasSetEntries - IedServerConfig_setMaxAssociationSpecificDataSets - IedServerConfig_getMaxAssociationSpecificDataSets - IedServerConfig_setMaxDomainSpecificDataSets - IedServerConfig_getMaxDomainSpecificDataSets - IedServer_setReadAccessHandler