- added API export/internal decorations

- removed .def files for windows
pull/93/head
Michael Zillgith 7 years ago
parent 5201473262
commit 2b7dc5c5fe

@ -11,7 +11,7 @@ project(libiec61850)
ENABLE_TESTING() ENABLE_TESTING()
set(LIB_VERSION_MAJOR "1") set(LIB_VERSION_MAJOR "1")
set(LIB_VERSION_MINOR "3") set(LIB_VERSION_MINOR "4")
set(LIB_VERSION_PATCH "0") set(LIB_VERSION_PATCH "0")
set(LIB_VERSION "${LIB_VERSION_MAJOR}.${LIB_VERSION_MINOR}.${LIB_VERSION_PATCH}") set(LIB_VERSION "${LIB_VERSION_MAJOR}.${LIB_VERSION_MINOR}.${LIB_VERSION_PATCH}")

@ -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_value.h
LIB_API_HEADER_FILES += src/mms/inc/mms_common.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_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_type_spec.h
LIB_API_HEADER_FILES += src/mms/inc/mms_client_connection.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_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_subscriber.h
LIB_API_HEADER_FILES += src/goose/goose_receiver.h LIB_API_HEADER_FILES += src/goose/goose_receiver.h
LIB_API_HEADER_FILES += src/goose/goose_publisher.h LIB_API_HEADER_FILES += src/goose/goose_publisher.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 <http://www.gnu.org/licenses/>.
*
* See COPYING file for the complete license text.
*/
#ifndef HAL_INC_HAL_BASE_H_
#define HAL_INC_HAL_BASE_H_
#include <stdlib.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#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_ */

@ -24,8 +24,7 @@
#ifndef ETHERNET_HAL_H_ #ifndef ETHERNET_HAL_H_
#define ETHERNET_HAL_H_ #define ETHERNET_HAL_H_
#include <stdint.h> #include "hal_base.h"
#include <stdbool.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -56,7 +55,7 @@ typedef struct sEthernetHandleSet* EthernetHandleSet;
* *
* \return new EthernetHandleSet instance * \return new EthernetHandleSet instance
*/ */
EthernetHandleSet PAL_API EthernetHandleSet
EthernetHandleSet_new(void); EthernetHandleSet_new(void);
/** /**
@ -65,7 +64,7 @@ EthernetHandleSet_new(void);
* \param self the HandleSet instance * \param self the HandleSet instance
* \param sock the socket to add * \param sock the socket to add
*/ */
void PAL_API void
EthernetHandleSet_addSocket(EthernetHandleSet self, const EthernetSocket sock); EthernetHandleSet_addSocket(EthernetHandleSet self, const EthernetSocket sock);
/** /**
@ -74,7 +73,7 @@ EthernetHandleSet_addSocket(EthernetHandleSet self, const EthernetSocket sock);
* \param self the HandleSet instance * \param self the HandleSet instance
* \param sock the socket to add * \param sock the socket to add
*/ */
void PAL_API void
EthernetHandleSet_removeSocket(EthernetHandleSet self, const EthernetSocket sock); 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. * or 0 if no data is pending on any of the monitored connections.
* The function shall return -1 if a socket error occures. * The function shall return -1 if a socket error occures.
*/ */
int PAL_API int
EthernetHandleSet_waitReady(EthernetHandleSet self, unsigned int timeoutMs); 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 * \param self the HandleSet instance to destroy
*/ */
void PAL_API void
EthernetHandleSet_destroy(EthernetHandleSet self); EthernetHandleSet_destroy(EthernetHandleSet self);
/** /**
@ -108,7 +107,7 @@ EthernetHandleSet_destroy(EthernetHandleSet self);
* \param interfaceId the ID of the Ethernet interface * \param interfaceId the ID of the Ethernet interface
* \param addr pointer to a buffer to store the MAC address * \param addr pointer to a buffer to store the MAC address
*/ */
void PAL_API void
Ethernet_getInterfaceMACAddress(const char* interfaceId, uint8_t* addr); 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 interfaceId the ID of the Ethernet interface
* \param destAddress byte array that contains the Ethernet MAC address * \param destAddress byte array that contains the Ethernet MAC address
*/ */
EthernetSocket PAL_API EthernetSocket
Ethernet_createSocket(const char* interfaceId, uint8_t* destAddress); 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 * \param ethSocket the ethernet socket handle
*/ */
void PAL_API void
Ethernet_destroySocket(EthernetSocket ethSocket); Ethernet_destroySocket(EthernetSocket ethSocket);
void PAL_API void
Ethernet_sendPacket(EthernetSocket ethSocket, uint8_t* buffer, int packetSize); 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 ethSocket the ethernet socket handle
* \param etherType the ether type of messages to accept * \param etherType the ether type of messages to accept
*/ */
void PAL_API void
Ethernet_setProtocolFilter(EthernetSocket ethSocket, uint16_t etherType); 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 * \return size of message received in bytes
*/ */
int PAL_API int
Ethernet_receivePacket(EthernetSocket ethSocket, uint8_t* buffer, int bufferSize); 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 * \return true if Ethernet support is available, false otherwise
*/ */
bool PAL_API bool
Ethernet_isSupported(void); Ethernet_isSupported(void);
/*! @} */ /*! @} */

@ -24,6 +24,8 @@
#ifndef FILESYSTEM_HAL_H_ #ifndef FILESYSTEM_HAL_H_
#define FILESYSTEM_HAL_H_ #define FILESYSTEM_HAL_H_
#include "hal_base.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #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 * \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 * NULL if opening fails
*/ */
FileHandle PAL_API FileHandle
FileSystem_openFile(char* pathName, bool readWrite); FileSystem_openFile(char* pathName, bool readWrite);
/** /**
@ -72,7 +74,7 @@ FileSystem_openFile(char* pathName, bool readWrite);
* *
* \return the number of bytes actually read * \return the number of bytes actually read
*/ */
int PAL_API int
FileSystem_readFile(FileHandle handle, uint8_t* buffer, int maxSize); 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 * \return the number of bytes actually written
*/ */
int PAL_API int
FileSystem_writeFile(FileHandle handle, uint8_t* buffer, int size); 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 * \param handle the file handle to identify the file
*/ */
void PAL_API void
FileSystem_closeFile(FileHandle handle); FileSystem_closeFile(FileHandle handle);
/** /**
@ -108,7 +110,7 @@ FileSystem_closeFile(FileHandle handle);
* *
* \return true if file exists, false if not * \return true if file exists, false if not
*/ */
bool PAL_API bool
FileSystem_getFileInfo(char* filename, uint32_t* fileSize, uint64_t* lastModificationTimestamp); 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 * \return true on success, false on error
*/ */
bool PAL_API bool
FileSystem_deleteFile(char* filename); FileSystem_deleteFile(char* filename);
/** /**
@ -129,7 +131,7 @@ FileSystem_deleteFile(char* filename);
* *
* \return true on success, false on error * \return true on success, false on error
*/ */
bool PAL_API bool
FileSystem_renameFile(char* oldFilename, char* newFilename); 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 * \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); FileSystem_openDirectory(char* directoryName);
/** /**
@ -154,7 +156,7 @@ FileSystem_openDirectory(char* directoryName);
* *
* \return the name of the directory entry * \return the name of the directory entry
*/ */
char* PAL_API char*
FileSystem_readDirectory(DirectoryHandle directory, bool* isDirectory); FileSystem_readDirectory(DirectoryHandle directory, bool* isDirectory);
@ -163,7 +165,7 @@ FileSystem_readDirectory(DirectoryHandle directory, bool* isDirectory);
* *
* \param directory the handle to identify the directory * \param directory the handle to identify the directory
*/ */
void PAL_API void
FileSystem_closeDirectory(DirectoryHandle directory); FileSystem_closeDirectory(DirectoryHandle directory);

@ -24,8 +24,7 @@
#ifndef SRC_IEC60870_LINK_LAYER_SERIAL_PORT_H_ #ifndef SRC_IEC60870_LINK_LAYER_SERIAL_PORT_H_
#define SRC_IEC60870_LINK_LAYER_SERIAL_PORT_H_ #define SRC_IEC60870_LINK_LAYER_SERIAL_PORT_H_
#include <stdint.h> #include "hal_base.h"
#include <stdbool.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -72,13 +71,13 @@ typedef enum {
* *
* \return the new SerialPort instance * \return the new SerialPort instance
*/ */
SerialPort PAL_API SerialPort
SerialPort_create(const char* interfaceName, int baudRate, uint8_t dataBits, char parity, uint8_t stopBits); SerialPort_create(const char* interfaceName, int baudRate, uint8_t dataBits, char parity, uint8_t stopBits);
/** /**
* \brief Destroy the SerialPort instance and release all resources * \brief Destroy the SerialPort instance and release all resources
*/ */
void PAL_API void
SerialPort_destroy(SerialPort self); 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) * \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); SerialPort_open(SerialPort self);
/** /**
* \brief Close (release) the serial interface * \brief Close (release) the serial interface
*/ */
void PAL_API void
SerialPort_close(SerialPort self); SerialPort_close(SerialPort self);
/** /**
@ -100,7 +99,7 @@ SerialPort_close(SerialPort self);
* *
* \return the baud rate in baud * \return the baud rate in baud
*/ */
int PAL_API int
SerialPort_getBaudRate(SerialPort self); SerialPort_getBaudRate(SerialPort self);
/** /**
@ -108,13 +107,13 @@ SerialPort_getBaudRate(SerialPort self);
* *
* \param timeout the timeout value in ms. * \param timeout the timeout value in ms.
*/ */
void PAL_API void
SerialPort_setTimeout(SerialPort self, int timeout); SerialPort_setTimeout(SerialPort self, int timeout);
/** /**
* \brief Discard all data in the input buffer of the serial interface * \brief Discard all data in the input buffer of the serial interface
*/ */
void PAL_API void
SerialPort_discardInBuffer(SerialPort self); SerialPort_discardInBuffer(SerialPort self);
/** /**
@ -122,7 +121,7 @@ SerialPort_discardInBuffer(SerialPort self);
* *
* \return number of read bytes of -1 in case of an error * \return number of read bytes of -1 in case of an error
*/ */
int PAL_API int
SerialPort_readByte(SerialPort self); SerialPort_readByte(SerialPort self);
/** /**
@ -134,13 +133,13 @@ SerialPort_readByte(SerialPort self);
* *
* \return number of bytes written, or -1 in case of an error * \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); SerialPort_write(SerialPort self, uint8_t* buffer, int startPos, int numberOfBytes);
/** /**
* \brief Get the error code of the last operation * \brief Get the error code of the last operation
*/ */
SerialPortError PAL_API SerialPortError
SerialPort_getLastError(SerialPort self); SerialPort_getLastError(SerialPort self);
/*! @} */ /*! @} */

@ -24,8 +24,7 @@
#ifndef SOCKET_HAL_H_ #ifndef SOCKET_HAL_H_
#define SOCKET_HAL_H_ #define SOCKET_HAL_H_
#include <stdint.h> #include "hal_base.h"
#include <stdbool.h>
/** /**
* \file hal_socket.h * \file hal_socket.h
@ -78,13 +77,13 @@ typedef enum
* *
* \return new HandleSet instance * \return new HandleSet instance
*/ */
HandleSet PAL_API HandleSet
Handleset_new(void); Handleset_new(void);
/** /**
* \brief Reset the handle set for reuse * \brief Reset the handle set for reuse
*/ */
void PAL_API void
Handleset_reset(HandleSet self); Handleset_reset(HandleSet self);
/** /**
@ -93,7 +92,7 @@ Handleset_reset(HandleSet self);
* \param self the HandleSet instance * \param self the HandleSet instance
* \param sock the socket to add * \param sock the socket to add
*/ */
void PAL_API void
Handleset_addSocket(HandleSet self, const Socket sock); 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. * or 0 if no data is pending on any of the monitored connections.
* The function shall return -1 if a socket error occures. * The function shall return -1 if a socket error occures.
*/ */
int PAL_API int
Handleset_waitReady(HandleSet self, unsigned int timeoutMs); 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 * \param self the HandleSet instance to destroy
*/ */
void PAL_API void
Handleset_destroy(HandleSet self); Handleset_destroy(HandleSet self);
/** /**
@ -132,11 +131,11 @@ Handleset_destroy(HandleSet self);
* *
* \return the newly create TcpServerSocket instance * \return the newly create TcpServerSocket instance
*/ */
ServerSocket PAL_API ServerSocket
TcpServerSocket_create(const char* address, int port); TcpServerSocket_create(const char* address, int port);
void PAL_API void
ServerSocket_listen(ServerSocket self); 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 * \return handle of the new connection socket or NULL if no new connection is available
*/ */
Socket PAL_API Socket
ServerSocket_accept(ServerSocket self); 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 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 * \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); 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 * \param backlog the number of pending connections in the queue
* *
*/ */
void PAL_API void
ServerSocket_setBacklog(ServerSocket self, int backlog); ServerSocket_setBacklog(ServerSocket self, int backlog);
/** /**
@ -190,7 +189,7 @@ ServerSocket_setBacklog(ServerSocket self, int backlog);
* *
* \param self server socket instance * \param self server socket instance
*/ */
void PAL_API void
ServerSocket_destroy(ServerSocket self); ServerSocket_destroy(ServerSocket self);
/** /**
@ -200,7 +199,7 @@ ServerSocket_destroy(ServerSocket self);
* *
* \return a new client socket instance. * \return a new client socket instance.
*/ */
Socket PAL_API Socket
TcpSocket_create(void); TcpSocket_create(void);
/** /**
@ -209,7 +208,7 @@ TcpSocket_create(void);
* \param self the client socket instance * \param self the client socket instance
* \param timeoutInMs the timeout in ms * \param timeoutInMs the timeout in ms
*/ */
void PAL_API void
Socket_setConnectTimeout(Socket self, uint32_t timeoutInMs); 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 * \return true if the connection was established successfully, false otherwise
*/ */
bool PAL_API bool
Socket_connect(Socket self, const char* address, int port); Socket_connect(Socket self, const char* address, int port);
bool PAL_API bool
Socket_connectAsync(Socket self, const char* address, int port); Socket_connectAsync(Socket self, const char* address, int port);
SocketState PAL_API SocketState
Socket_checkAsyncConnectState(Socket self); Socket_checkAsyncConnectState(Socket self);
/** /**
@ -255,7 +254,7 @@ Socket_checkAsyncConnectState(Socket self);
* *
* \return the number of bytes read or -1 if an error occurred * \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); 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 * \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); 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. * \return the IP address and port number as strings separated by the ':' character.
*/ */
char* PAL_API char*
Socket_getPeerAddress(Socket self); 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 * \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. * address is an IPv6 address the IP part is encapsulated in square brackets.
*/ */
char* PAL_API char*
Socket_getPeerAddressStatic(Socket self, char* peerAddressString); 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 * \param self the client, connection or server socket instance
*/ */
void PAL_API void
Socket_destroy(Socket self); Socket_destroy(Socket self);
/*! @} */ /*! @} */

@ -3,7 +3,7 @@
* *
* Multi-threading abstraction layer * Multi-threading abstraction layer
* *
* Copyright 2013, 2014 Michael Zillgith * Copyright 2013-2018 Michael Zillgith
* *
* This file is part of libIEC61850. * This file is part of libIEC61850.
* *
@ -26,7 +26,7 @@
#ifndef THREAD_HAL_H_ #ifndef THREAD_HAL_H_
#define THREAD_HAL_H_ #define THREAD_HAL_H_
#include <stdbool.h> #include "hal_base.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -66,7 +66,7 @@ typedef void* (*ThreadExecutionFunction) (void*);
* *
* \return the newly created Thread instance * \return the newly created Thread instance
*/ */
Thread PAL_API Thread
Thread_create(ThreadExecutionFunction function, void* parameter, bool autodestroy); 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 * \param thread the Thread instance to start
*/ */
void PAL_API void
Thread_start(Thread thread); Thread_start(Thread thread);
/** /**
@ -85,26 +85,26 @@ Thread_start(Thread thread);
* *
* \param thread the Thread instance to destroy * \param thread the Thread instance to destroy
*/ */
void PAL_API void
Thread_destroy(Thread thread); Thread_destroy(Thread thread);
/** /**
* \brief Suspend execution of the Thread for the specified number of milliseconds * \brief Suspend execution of the Thread for the specified number of milliseconds
*/ */
void PAL_API void
Thread_sleep(int millies); Thread_sleep(int millies);
Semaphore PAL_API Semaphore
Semaphore_create(int initialValue); Semaphore_create(int initialValue);
/* Wait until semaphore value is greater than zero. Then decrease the semaphore value. */ /* Wait until semaphore value is greater than zero. Then decrease the semaphore value. */
void PAL_API void
Semaphore_wait(Semaphore self); Semaphore_wait(Semaphore self);
void PAL_API void
Semaphore_post(Semaphore self); Semaphore_post(Semaphore self);
void PAL_API void
Semaphore_destroy(Semaphore self); Semaphore_destroy(Semaphore self);
/*! @} */ /*! @} */

@ -24,12 +24,12 @@
#ifndef HAL_C_ #ifndef HAL_C_
#define HAL_C_ #define HAL_C_
#include "hal_base.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include <stdint.h>
/** /**
* \file hal_time.h * \file hal_time.h
* \brief Abstraction layer for system time access * \brief Abstraction layer for system time access
@ -54,7 +54,7 @@ extern "C" {
* *
* \return the system time with millisecond resolution. * \return the system time with millisecond resolution.
*/ */
uint64_t PAL_API uint64_t
Hal_getTimeInMs(void); Hal_getTimeInMs(void);
/*! @} */ /*! @} */

@ -24,6 +24,8 @@
#ifndef MEMORY_H_ #ifndef MEMORY_H_
#define MEMORY_H_ #define MEMORY_H_
#include "hal_base.h"
#define CALLOC(nmemb, size) Memory_calloc(nmemb, size) #define CALLOC(nmemb, size) Memory_calloc(nmemb, size)
#define MALLOC(size) Memory_malloc(size) #define MALLOC(size) Memory_malloc(size)
#define REALLOC(oldptr, size) Memory_realloc(oldptr, size) #define REALLOC(oldptr, size) Memory_realloc(oldptr, size)
@ -38,24 +40,22 @@
extern "C" { extern "C" {
#endif #endif
#include <stdlib.h>
typedef void typedef void
(*MemoryExceptionHandler) (void* parameter); (*MemoryExceptionHandler) (void* parameter);
void PAL_API void
Memory_installExceptionHandler(MemoryExceptionHandler handler, void* parameter); Memory_installExceptionHandler(MemoryExceptionHandler handler, void* parameter);
void* PAL_API void*
Memory_malloc(size_t size); Memory_malloc(size_t size);
void* PAL_API void*
Memory_calloc(size_t nmemb, size_t size); Memory_calloc(size_t nmemb, size_t size);
void * PAL_API void *
Memory_realloc(void *ptr, size_t size); Memory_realloc(void *ptr, size_t size);
void PAL_API void
Memory_free(void* memb); Memory_free(void* memb);
#ifdef __cplusplus #ifdef __cplusplus

@ -16,8 +16,7 @@
extern "C" { extern "C" {
#endif #endif
#include <stdbool.h> #include "hal_base.h"
#include <stdint.h>
/** /**
* \file tls_config.h * \file tls_config.h
@ -42,11 +41,11 @@ typedef struct sTLSConfiguration* TLSConfiguration;
* *
* \return the new TLS configuration * \return the new TLS configuration
*/ */
TLSConfiguration PAL_API TLSConfiguration
TLSConfiguration_create(void); TLSConfiguration_create(void);
/* will be called by stack automatically when appropriate */ /* will be called by stack automatically when appropriate */
void PAL_API void
TLSConfiguration_setClientMode(TLSConfiguration self); TLSConfiguration_setClientMode(TLSConfiguration self);
/** /**
@ -54,7 +53,7 @@ TLSConfiguration_setClientMode(TLSConfiguration self);
* *
* \param value true to enable chain validation, false to disable * \param value true to enable chain validation, false to disable
*/ */
void PAL_API void
TLSConfiguration_setChainValidation(TLSConfiguration self, bool value); TLSConfiguration_setChainValidation(TLSConfiguration self, bool value);
/** /**
@ -65,7 +64,7 @@ TLSConfiguration_setChainValidation(TLSConfiguration self, bool value);
* *
* \param value true to enable setting, false otherwise * \param value true to enable setting, false otherwise
*/ */
void PAL_API void
TLSConfiguration_setAllowOnlyKnownCertificates(TLSConfiguration self, bool value); 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) * \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); 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) * \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); TLSConfiguration_setOwnCertificateFromFile(TLSConfiguration self, const char* filename);
bool PAL_API bool
TLSConfiguration_setOwnKey(TLSConfiguration self, uint8_t* key, int keyLen, const char* keyPassword); 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); TLSConfiguration_setOwnKeyFromFile(TLSConfiguration self, const char* filename, const char* keyPassword);
bool PAL_API bool
TLSConfiguration_addAllowedCertificate(TLSConfiguration self, uint8_t* certifcate, int certLen); TLSConfiguration_addAllowedCertificate(TLSConfiguration self, uint8_t* certifcate, int certLen);
bool PAL_API bool
TLSConfiguration_addAllowedCertificateFromFile(TLSConfiguration self, const char* filename); TLSConfiguration_addAllowedCertificateFromFile(TLSConfiguration self, const char* filename);
bool PAL_API bool
TLSConfiguration_addCACertificate(TLSConfiguration self, uint8_t* certifcate, int certLen); TLSConfiguration_addCACertificate(TLSConfiguration self, uint8_t* certifcate, int certLen);
bool PAL_API bool
TLSConfiguration_addCACertificateFromFile(TLSConfiguration self, const char* filename); 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 * \param timeInMs session renegotiation timeout in milliseconds
*/ */
void PAL_API void
TLSConfiguration_setRenegotiationTime(TLSConfiguration self, int timeInMs); TLSConfiguration_setRenegotiationTime(TLSConfiguration self, int timeInMs);
void PAL_API void
TLSConfiguration_destroy(TLSConfiguration self); TLSConfiguration_destroy(TLSConfiguration self);
/** @} */ /** @} */

@ -41,7 +41,6 @@ extern "C" {
* @{ * @{
*/ */
#include <stdint.h>
#include "tls_config.h" #include "tls_config.h"
#include "hal_socket.h" #include "hal_socket.h"
@ -59,13 +58,13 @@ typedef struct sTLSSocket* TLSSocket;
* *
* \return new TLS connection instance * \return new TLS connection instance
*/ */
TLSSocket PAL_API TLSSocket
TLSSocket_create(Socket socket, TLSConfiguration configuration, bool storeClientCert); TLSSocket_create(Socket socket, TLSConfiguration configuration, bool storeClientCert);
/** /**
* \brief Perform a new TLS handshake/session renegotiation * \brief Perform a new TLS handshake/session renegotiation
*/ */
bool PAL_API bool
TLSSocket_performHandshake(TLSSocket self); TLSSocket_performHandshake(TLSSocket self);
/** /**
@ -75,7 +74,7 @@ TLSSocket_performHandshake(TLSSocket self);
* *
* \return the certificate byte buffer * \return the certificate byte buffer
*/ */
uint8_t* PAL_API uint8_t*
TLSSocket_getPeerCertificate(TLSSocket self, int* certSize); 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 * \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); 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 * \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); TLSSocket_write(TLSSocket self, uint8_t* buf, int size);
/** /**
* \brief Closes the TLS connection and released all resources * \brief Closes the TLS connection and released all resources
*/ */
void PAL_API void
TLSSocket_close(TLSSocket self); TLSSocket_close(TLSSocket self);
/*! @} */ /*! @} */

@ -94,7 +94,7 @@ CFLAGS+=-m64
endif endif
LDLIBS=-lws2_32 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! # on Windows: only compile with ethernet support if winpcap files are in third_party/winpcap!

@ -218,8 +218,6 @@ ELSE()
add_definitions(-DEXCLUDE_ETHERNET_WINDOWS) add_definitions(-DEXCLUDE_ETHERNET_WINDOWS)
ENDIF() ENDIF()
set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}\"/DEF:${CMAKE_CURRENT_SOURCE_DIR}/vs/libiec61850.def\"")
include_directories( include_directories(
../third_party/winpcap/include ../third_party/winpcap/include
) )
@ -333,6 +331,7 @@ IF(MINGW)
target_link_libraries(iec61850-shared ws2_32 iphlpapi) target_link_libraries(iec61850-shared ws2_32 iphlpapi)
target_link_libraries(iec61850 ws2_32 iphlpapi) target_link_libraries(iec61850 ws2_32 iphlpapi)
ENDIF(MINGW) ENDIF(MINGW)
iF(WITH_WPCAP) iF(WITH_WPCAP)
target_link_libraries(iec61850 target_link_libraries(iec61850
${CMAKE_CURRENT_SOURCE_DIR}/../third_party/winpcap/lib/wpcap.lib ${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 ${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) ENDIF(WITH_WPCAP)
set(BINDIR "bin") set(BINDIR "bin")

@ -794,11 +794,8 @@ INPUT = "iec61850/inc/iec61850_client.h" \
"goose/goose_receiver.h" \ "goose/goose_receiver.h" \
"sampled_values/sv_subscriber.h" \ "sampled_values/sv_subscriber.h" \
"sampled_values/sv_publisher.h" \ "sampled_values/sv_publisher.h" \
"mms/inc/mms_device_model.h" \
"mms/inc/mms_types.h" \ "mms/inc/mms_types.h" \
"mms/inc/mms_common.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_named_variable_list.h" \
"mms/inc/mms_type_spec.h" \ "mms/inc/mms_type_spec.h" \
"mms/inc/mms_types.h" \ "mms/inc/mms_types.h" \

@ -35,41 +35,6 @@ BufferChain_init(BufferChain self, int length, int partLength, BufferChain nextP
self->buffer = buffer; 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 void
MemoryArea_initialize(MemoryArea* self, uint8_t* memory, int size) MemoryArea_initialize(MemoryArea* self, uint8_t* memory, int size)
{ {

@ -1,13 +1,31 @@
/* /*
* buffer_chain.h * buffer_chain.h
* *
* Created on: Nov 10, 2013 * Copyright 2013-2018 Michael Zillgith
* Author: mzillgit *
* 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 <http://www.gnu.org/licenses/>.
*
* See COPYING file for the complete license text.
*/ */
#ifndef BUFFER_CHAIN_H_ #ifndef BUFFER_CHAIN_H_
#define BUFFER_CHAIN_H_ #define BUFFER_CHAIN_H_
#include "libiec61850_platform_includes.h"
typedef struct sBufferChain* BufferChain; typedef struct sBufferChain* BufferChain;
struct sBufferChain { struct sBufferChain {
@ -18,26 +36,19 @@ struct sBufferChain {
BufferChain nextPart; BufferChain nextPart;
}; };
void LIB61850_INTERNAL void
BufferChain_init(BufferChain self, int length, int partLength, BufferChain nextPart, uint8_t* buffer); 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 { typedef struct {
uint8_t* memory; uint8_t* memory;
int currentPos; int currentPos;
int size; int size;
} MemoryArea; } MemoryArea;
void LIB61850_INTERNAL void
MemoryArea_initialize(MemoryArea* self, uint8_t* memory, int size); MemoryArea_initialize(MemoryArea* self, uint8_t* memory, int size);
uint8_t* LIB61850_INTERNAL uint8_t*
MemoryArea_getNextBlock(MemoryArea* self, int size); MemoryArea_getNextBlock(MemoryArea* self, int size);
#if 0 #if 0

@ -1,7 +1,7 @@
/* /*
* byte_buffer.h * byte_buffer.h
* *
* Copyright 2013 Michael Zillgith * Copyright 2013-2018 Michael Zillgith
* *
* This file is part of libIEC61850. * This file is part of libIEC61850.
* *
@ -36,34 +36,34 @@ typedef struct {
int size; int size;
} ByteBuffer; } ByteBuffer;
ByteBuffer* LIB61850_INTERNAL ByteBuffer*
ByteBuffer_create(ByteBuffer* self, int maxSize); ByteBuffer_create(ByteBuffer* self, int maxSize);
void LIB61850_INTERNAL void
ByteBuffer_destroy(ByteBuffer* self); ByteBuffer_destroy(ByteBuffer* self);
void LIB61850_INTERNAL void
ByteBuffer_wrap(ByteBuffer* self, uint8_t* buf, int size, int maxSize); ByteBuffer_wrap(ByteBuffer* self, uint8_t* buf, int size, int maxSize);
int LIB61850_INTERNAL int
ByteBuffer_append(ByteBuffer* self, uint8_t* data, int dataSize); ByteBuffer_append(ByteBuffer* self, uint8_t* data, int dataSize);
int LIB61850_INTERNAL int
ByteBuffer_appendByte(ByteBuffer* self, uint8_t byte); ByteBuffer_appendByte(ByteBuffer* self, uint8_t byte);
uint8_t* LIB61850_INTERNAL uint8_t*
ByteBuffer_getBuffer(ByteBuffer* self); ByteBuffer_getBuffer(ByteBuffer* self);
int LIB61850_INTERNAL int
ByteBuffer_getSize(ByteBuffer* self); ByteBuffer_getSize(ByteBuffer* self);
int LIB61850_INTERNAL int
ByteBuffer_getMaxSize(ByteBuffer* self); ByteBuffer_getMaxSize(ByteBuffer* self);
int LIB61850_INTERNAL int
ByteBuffer_setSize(ByteBuffer* self, int size); ByteBuffer_setSize(ByteBuffer* self, int size);
void LIB61850_INTERNAL void
ByteBuffer_print(ByteBuffer* self, char* message); ByteBuffer_print(ByteBuffer* self, char* message);
#ifdef __cplusplus #ifdef __cplusplus

@ -3,7 +3,7 @@
* *
* Some helper functions to convert data. * Some helper functions to convert data.
* *
* Copyright 2014 Michael Zillgith * Copyright 2014-2018 Michael Zillgith
* *
* This file is part of libIEC61850. * This file is part of libIEC61850.
* *
@ -26,18 +26,18 @@
#ifndef CONVERSIONS_H_ #ifndef CONVERSIONS_H_
#define 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); Conversions_intToStringBuffer(int intValue, int numberOfDigits, uint8_t* buffer);
void LIB61850_INTERNAL void
Conversions_msTimeToGeneralizedTime(uint64_t msTime, uint8_t* buffer); Conversions_msTimeToGeneralizedTime(uint64_t msTime, uint8_t* buffer);
uint64_t LIB61850_INTERNAL uint64_t
Conversions_generalizedTimeToMsTime(const char* gtString); Conversions_generalizedTimeToMsTime(const char* gtString);
void LIB61850_INTERNAL void
memcpyReverseByteOrder(uint8_t* dst, const uint8_t* src, int size); memcpyReverseByteOrder(uint8_t* dst, const uint8_t* src, int size);
#endif /* CONVERSIONS_H_ */ #endif /* CONVERSIONS_H_ */

@ -1,5 +1,5 @@
/* /*
* libiec61850_common_api_includes.h * libiec61850_common_api.h
*/ */
#ifndef LIBIEC61850_COMMON_API_INCLUDES_H_ #ifndef LIBIEC61850_COMMON_API_INCLUDES_H_
@ -17,6 +17,32 @@
#define ATTRIBUTE_PACKED #define ATTRIBUTE_PACKED
#endif #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 "hal_time.h"
#include "mms_value.h" #include "mms_value.h"

@ -24,8 +24,7 @@
#ifndef LINKED_LIST_H_ #ifndef LINKED_LIST_H_
#define LINKED_LIST_H_ #define LINKED_LIST_H_
#include <stdint.h> #include "libiec61850_common_api.h"
#include <stdbool.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -57,7 +56,7 @@ typedef struct sLinkedList* LinkedList;
* *
* \return the newly created LinkedList instance * \return the newly created LinkedList instance
*/ */
LinkedList LIB61850_API LinkedList
LinkedList_create(void); LinkedList_create(void);
/** /**
@ -69,7 +68,7 @@ LinkedList_create(void);
* *
* \param self the LinkedList instance * \param self the LinkedList instance
*/ */
void LIB61850_API void
LinkedList_destroy(LinkedList self); 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 * \param valueDeleteFunction a function that is called for each data element of the LinkedList with the pointer
* to the linked list data element. * to the linked list data element.
*/ */
void LIB61850_API void
LinkedList_destroyDeep(LinkedList self, LinkedListValueDeleteFunction valueDeleteFunction); LinkedList_destroyDeep(LinkedList self, LinkedListValueDeleteFunction valueDeleteFunction);
/** /**
@ -97,7 +96,7 @@ LinkedList_destroyDeep(LinkedList self, LinkedListValueDeleteFunction valueDelet
* *
* \param self the LinkedList instance * \param self the LinkedList instance
*/ */
void LIB61850_API void
LinkedList_destroyStatic(LinkedList self); LinkedList_destroyStatic(LinkedList self);
/** /**
@ -109,7 +108,7 @@ LinkedList_destroyStatic(LinkedList self);
* \param self the LinkedList instance * \param self the LinkedList instance
* \param data data to append to the LinkedList instance * \param data data to append to the LinkedList instance
*/ */
void LIB61850_API void
LinkedList_add(LinkedList self, void* data); 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 * \return true if data is part of the list, false otherwise
*/ */
bool LIB61850_API bool
LinkedList_contains(LinkedList self, void* data); 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 * \return true if data has been removed from the list, false otherwise
*/ */
bool LIB61850_API bool
LinkedList_remove(LinkedList self, void* data); LinkedList_remove(LinkedList self, void* data);
/** /**
@ -140,7 +139,7 @@ LinkedList_remove(LinkedList self, void* data);
* \param self the LinkedList instance * \param self the LinkedList instance
* \param index index of the requested element. * \param index index of the requested element.
*/ */
LinkedList LIB61850_API LinkedList
LinkedList_get(LinkedList self, int index); LinkedList_get(LinkedList self, int index);
/** /**
@ -148,7 +147,7 @@ LinkedList_get(LinkedList self, int index);
* *
* \param self the LinkedList instance * \param self the LinkedList instance
*/ */
LinkedList LIB61850_API LinkedList
LinkedList_getNext(LinkedList self); LinkedList_getNext(LinkedList self);
/** /**
@ -156,7 +155,7 @@ LinkedList_getNext(LinkedList self);
* *
* \param listElement the LinkedList instance * \param listElement the LinkedList instance
*/ */
LinkedList LIB61850_API LinkedList
LinkedList_getLastElement(LinkedList self); LinkedList_getLastElement(LinkedList self);
/** /**
@ -164,7 +163,7 @@ LinkedList_getLastElement(LinkedList self);
* *
* \param listElement the LinkedList instance * \param listElement the LinkedList instance
*/ */
LinkedList LIB61850_API LinkedList
LinkedList_insertAfter(LinkedList listElement, void* data); 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 * \return number of data elements stored in the list
*/ */
int LIB61850_API int
LinkedList_size(LinkedList self); LinkedList_size(LinkedList self);
void* LIB61850_API void*
LinkedList_getData(LinkedList self); LinkedList_getData(LinkedList self);
void LIB61850_API void
LinkedList_printStringList(LinkedList self); LinkedList_printStringList(LinkedList self);
/**@}*/ /**@}*/

@ -1,7 +1,7 @@
/* /*
* map.h * map.h
* *
* Copyright 2013 Michael Zillgith * Copyright 2013-2018 Michael Zillgith
* *
* This file is part of libIEC61850. * This file is part of libIEC61850.
* *
@ -24,7 +24,7 @@
#ifndef MAP_H_ #ifndef MAP_H_
#define MAP_H_ #define MAP_H_
#include "libiec61850_platform_includes.h" #include "libiec61850_common_api.h"
#include "linked_list.h" #include "linked_list.h"
typedef struct sMap* Map; typedef struct sMap* Map;
@ -36,28 +36,28 @@ struct sMap {
int (*compareKeys)(void* key1, void* key2); int (*compareKeys)(void* key1, void* key2);
}; };
Map LIB61850_INTERNAL Map
Map_create(void); Map_create(void);
int LIB61850_INTERNAL int
Map_size(Map map); Map_size(Map map);
void* LIB61850_INTERNAL void*
Map_addEntry(Map map, void* key, void* value); Map_addEntry(Map map, void* key, void* value);
void* LIB61850_INTERNAL void*
Map_removeEntry(Map map, void* key, bool deleteKey); Map_removeEntry(Map map, void* key, bool deleteKey);
void* LIB61850_INTERNAL void*
Map_getEntry(Map map, void* key); Map_getEntry(Map map, void* key);
void LIB61850_INTERNAL void
Map_delete(Map map, bool deleteKey); Map_delete(Map map, bool deleteKey);
void LIB61850_INTERNAL void
Map_deleteStatic(Map map, bool deleteKey); Map_deleteStatic(Map map, bool deleteKey);
void LIB61850_INTERNAL void
Map_deleteDeep(Map map, bool deleteKey, void (*valueDeleteFunction) (void*)); Map_deleteDeep(Map map, bool deleteKey, void (*valueDeleteFunction) (void*));

@ -37,10 +37,10 @@ extern "C" {
typedef struct sMemAllocLinkedList* MemAllocLinkedList; typedef struct sMemAllocLinkedList* MemAllocLinkedList;
MemAllocLinkedList LIB61850_INTERNAL MemAllocLinkedList
MemAllocLinkedList_create(MemoryAllocator* ma); MemAllocLinkedList_create(MemoryAllocator* ma);
LinkedList LIB61850_INTERNAL LinkedList
MemAllocLinkedList_add(MemAllocLinkedList list, void* data); MemAllocLinkedList_add(MemAllocLinkedList list, void* data);
#endif /* MEM_ALLOC_LINKED_LIST_H_ */ #endif /* MEM_ALLOC_LINKED_LIST_H_ */

@ -1,7 +1,7 @@
/* /*
* simple_allocator.h * simple_allocator.h
* *
* Copyright 2013 Michael Zillgith * Copyright 2013-2018 Michael Zillgith
* *
* This file is part of libIEC61850. * This file is part of libIEC61850.
* *
@ -30,13 +30,13 @@ typedef struct {
int size; int size;
} MemoryAllocator; } MemoryAllocator;
void LIB61850_INTERNAL void
MemoryAllocator_init(MemoryAllocator* self, char* memoryBlock, int size); MemoryAllocator_init(MemoryAllocator* self, char* memoryBlock, int size);
int LIB61850_INTERNAL int
MemoryAllocator_getAlignedSize(int size); MemoryAllocator_getAlignedSize(int size);
char* LIB61850_INTERNAL char*
MemoryAllocator_allocate(MemoryAllocator* self, int size); MemoryAllocator_allocate(MemoryAllocator* self, int size);
#endif /* SIMPLE_ALLOCATOR_H_ */ #endif /* SIMPLE_ALLOCATOR_H_ */

@ -23,6 +23,6 @@
#include "map.h" #include "map.h"
Map LIB61850_INTERNAL Map
StringMap_create(void); StringMap_create(void);

@ -1,7 +1,7 @@
/* /*
* string_utilities.h * string_utilities.h
* *
* Copyright 2013 Michael Zillgith * Copyright 2013-2018 Michael Zillgith
* *
* This file is part of libIEC61850. * This file is part of libIEC61850.
* *
@ -24,64 +24,64 @@
#ifndef STRING_UTILITIES_H_ #ifndef STRING_UTILITIES_H_
#define STRING_UTILITIES_H_ #define STRING_UTILITIES_H_
#include "libiec61850_platform_includes.h" #include "libiec61850_common_api.h"
#include "linked_list.h" #include "linked_list.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
char* LIB61850_INTERNAL char*
StringUtils_copyString(const char* string); StringUtils_copyString(const char* string);
char* LIB61850_INTERNAL char*
StringUtils_copyStringToBuffer(const char* string, char* buffer); StringUtils_copyStringToBuffer(const char* string, char* buffer);
char* LIB61850_INTERNAL char*
StringUtils_copySubString(char* startPos, char* endPos); StringUtils_copySubString(char* startPos, char* endPos);
/** /**
* \brief Concatenate strings. count indicates the number of strings * \brief Concatenate strings. count indicates the number of strings
* to concatenate. * to concatenate.
*/ */
char* LIB61850_INTERNAL char*
StringUtils_createString(int count, ...); StringUtils_createString(int count, ...);
/** /**
* \brief Concatenate strings in user provided buffer. count indicates the number of strings * \brief Concatenate strings in user provided buffer. count indicates the number of strings
* to concatenate. * to concatenate.
*/ */
char* LIB61850_INTERNAL char*
StringUtils_createStringInBuffer(char* buffer, int count, ...); StringUtils_createStringInBuffer(char* buffer, int count, ...);
char* LIB61850_INTERNAL char*
StringUtils_createStringFromBuffer(const uint8_t* buf, int size); StringUtils_createStringFromBuffer(const uint8_t* buf, int size);
char* LIB61850_INTERNAL char*
StringUtils_createStringFromBufferInBuffer(char* newString, const uint8_t* buf, int size); StringUtils_createStringFromBufferInBuffer(char* newString, const uint8_t* buf, int size);
void LIB61850_INTERNAL void
StringUtils_replace(char* string, char oldChar, char newChar); StringUtils_replace(char* string, char oldChar, char newChar);
bool LIB61850_INTERNAL bool
StringUtils_isDigit(char character); StringUtils_isDigit(char character);
int LIB61850_INTERNAL int
StringUtils_digitToInt(char digit); StringUtils_digitToInt(char digit);
int LIB61850_INTERNAL int
StringUtils_digitsToInt(const char* digits, int count); StringUtils_digitsToInt(const char* digits, int count);
int LIB61850_INTERNAL int
StringUtils_createBufferFromHexString(char* hexString, uint8_t* buffer); StringUtils_createBufferFromHexString(char* hexString, uint8_t* buffer);
/** /**
* \brief test if string starts with prefix * \brief test if string starts with prefix
*/ */
bool LIB61850_INTERNAL bool
StringUtils_startsWith(char* string, char* prefix); StringUtils_startsWith(char* string, char* prefix);
bool LIB61850_INTERNAL bool
StringUtils_endsWith(const char* str, const char* suffix); 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 * \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); 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 * \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); 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 * \param list a list that contains string elements
*/ */
void LIB61850_INTERNAL void
StringUtils_sortList(LinkedList list); StringUtils_sortList(LinkedList list);
#ifdef __cplusplus #ifdef __cplusplus

@ -1,7 +1,7 @@
/* /*
* goose_publisher.h * goose_publisher.h
* *
* Copyright 2013 Michael Zillgith * Copyright 2013-2018 Michael Zillgith
* *
* This file is part of libIEC61850. * This file is part of libIEC61850.
* *
@ -24,6 +24,7 @@
#ifndef GOOSE_PUBLISHER_H_ #ifndef GOOSE_PUBLISHER_H_
#define GOOSE_PUBLISHER_H_ #define GOOSE_PUBLISHER_H_
#include "libiec61850_platform_includes.h"
#include "linked_list.h" #include "linked_list.h"
#include "mms_value.h" #include "mms_value.h"
@ -45,40 +46,40 @@ typedef struct sCommParameters {
typedef struct sGoosePublisher* GoosePublisher; typedef struct sGoosePublisher* GoosePublisher;
GoosePublisher LIB61850_API GoosePublisher
GoosePublisher_create(CommParameters* parameters, const char* interfaceID); GoosePublisher_create(CommParameters* parameters, const char* interfaceID);
void LIB61850_API void
GoosePublisher_destroy(GoosePublisher self); GoosePublisher_destroy(GoosePublisher self);
int LIB61850_API int
GoosePublisher_publish(GoosePublisher self, LinkedList dataSet); GoosePublisher_publish(GoosePublisher self, LinkedList dataSet);
void LIB61850_API void
GoosePublisher_setGoID(GoosePublisher self, char* goID); GoosePublisher_setGoID(GoosePublisher self, char* goID);
void LIB61850_API void
GoosePublisher_setGoCbRef(GoosePublisher self, char* goCbRef); GoosePublisher_setGoCbRef(GoosePublisher self, char* goCbRef);
void LIB61850_API void
GoosePublisher_setTimeAllowedToLive(GoosePublisher self, uint32_t timeAllowedToLive); GoosePublisher_setTimeAllowedToLive(GoosePublisher self, uint32_t timeAllowedToLive);
void LIB61850_API void
GoosePublisher_setDataSetRef(GoosePublisher self, char* dataSetRef); GoosePublisher_setDataSetRef(GoosePublisher self, char* dataSetRef);
void LIB61850_API void
GoosePublisher_setConfRev(GoosePublisher self, uint32_t confRev); GoosePublisher_setConfRev(GoosePublisher self, uint32_t confRev);
void LIB61850_API void
GoosePublisher_setSimulation(GoosePublisher self, bool simulation); GoosePublisher_setSimulation(GoosePublisher self, bool simulation);
void LIB61850_API void
GoosePublisher_setNeedsCommission(GoosePublisher self, bool ndsCom); GoosePublisher_setNeedsCommission(GoosePublisher self, bool ndsCom);
uint64_t LIB61850_API uint64_t
GoosePublisher_increaseStNum(GoosePublisher self); GoosePublisher_increaseStNum(GoosePublisher self);
void LIB61850_API void
GoosePublisher_reset(GoosePublisher self); GoosePublisher_reset(GoosePublisher self);
#ifdef __cplusplus #ifdef __cplusplus

@ -1,7 +1,7 @@
/* /*
* goose_receiver.h * goose_receiver.h
* *
* Copyright 2014 Michael Zillgith * Copyright 2014-2018 Michael Zillgith
* *
* This file is part of libIEC61850. * This file is part of libIEC61850.
* *
@ -48,7 +48,7 @@ typedef struct sGooseReceiver* GooseReceiver;
* *
* \return the new GooseReceiver instance * \return the new GooseReceiver instance
*/ */
GooseReceiver LIB61850_API GooseReceiver
GooseReceiver_create(void); GooseReceiver_create(void);
/** /**
@ -57,7 +57,7 @@ GooseReceiver_create(void);
* \param self the GooseReceiver instance * \param self the GooseReceiver instance
* \param interfaceId * \param interfaceId
*/ */
void LIB61850_API void
GooseReceiver_setInterfaceId(GooseReceiver self, const char* interfaceId); GooseReceiver_setInterfaceId(GooseReceiver self, const char* interfaceId);
/** /**
@ -69,7 +69,7 @@ GooseReceiver_setInterfaceId(GooseReceiver self, const char* interfaceId);
* \param self the GooseReceiver instance * \param self the GooseReceiver instance
* \param subscriber the GooseSubscriber instance to add * \param subscriber the GooseSubscriber instance to add
*/ */
void LIB61850_API void
GooseReceiver_addSubscriber(GooseReceiver self, GooseSubscriber subscriber); GooseReceiver_addSubscriber(GooseReceiver self, GooseSubscriber subscriber);
/** /**
@ -81,7 +81,7 @@ GooseReceiver_addSubscriber(GooseReceiver self, GooseSubscriber subscriber);
* \param self the GooseReceiver instance * \param self the GooseReceiver instance
* \param subscriber the GooseSubscriber instance to remove * \param subscriber the GooseSubscriber instance to remove
*/ */
void LIB61850_API void
GooseReceiver_removeSubscriber(GooseReceiver self, GooseSubscriber subscriber); GooseReceiver_removeSubscriber(GooseReceiver self, GooseSubscriber subscriber);
/** /**
@ -89,7 +89,7 @@ GooseReceiver_removeSubscriber(GooseReceiver self, GooseSubscriber subscriber);
* *
* \param self the GooseReceiver instance * \param self the GooseReceiver instance
*/ */
void LIB61850_API void
GooseReceiver_start(GooseReceiver self); GooseReceiver_start(GooseReceiver self);
/** /**
@ -99,7 +99,7 @@ GooseReceiver_start(GooseReceiver self);
* *
* \param self the GooseReceiver instance * \param self the GooseReceiver instance
*/ */
void LIB61850_API void
GooseReceiver_stop(GooseReceiver self); GooseReceiver_stop(GooseReceiver self);
/** /**
@ -111,7 +111,7 @@ GooseReceiver_stop(GooseReceiver self);
* *
* \return true if GOOSE receiver is running, false otherwise * \return true if GOOSE receiver is running, false otherwise
*/ */
bool LIB61850_API bool
GooseReceiver_isRunning(GooseReceiver self); GooseReceiver_isRunning(GooseReceiver self);
/** /**
@ -119,16 +119,16 @@ GooseReceiver_isRunning(GooseReceiver self);
* *
* \param self the GooseReceiver instance * \param self the GooseReceiver instance
*/ */
void LIB61850_API void
GooseReceiver_destroy(GooseReceiver self); GooseReceiver_destroy(GooseReceiver self);
/*************************************** /***************************************
* Functions for non-threaded operation * Functions for non-threaded operation
***************************************/ ***************************************/
EthernetSocket LIB61850_API EthernetSocket
GooseReceiver_startThreadless(GooseReceiver self); GooseReceiver_startThreadless(GooseReceiver self);
void LIB61850_API void
GooseReceiver_stopThreadless(GooseReceiver self); 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 * \return true if a message was available and has been parsed, false otherwise
*/ */
bool LIB61850_API bool
GooseReceiver_tick(GooseReceiver self); GooseReceiver_tick(GooseReceiver self);
/**@}*/ /**@}*/

@ -1,7 +1,7 @@
/* /*
* goose_subscriber.h * goose_subscriber.h
* *
* Copyright 2013, 2014 Michael Zillgith * Copyright 2013-2018 Michael Zillgith
* *
* This file is part of libIEC61850. * This file is part of libIEC61850.
* *
@ -67,7 +67,7 @@ typedef void (*GooseListener)(GooseSubscriber subscriber, void* parameter);
* GOOSE publisher uses. * GOOSE publisher uses.
* \param dataSetValues the MmsValue object where the data set values will be written or NULL. * \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); GooseSubscriber_create(char* goCbRef, MmsValue* dataSetValues);
//char* //char*
@ -81,7 +81,7 @@ GooseSubscriber_create(char* goCbRef, MmsValue* dataSetValues);
* \param self GooseSubscriber instance to operate on. * \param self GooseSubscriber instance to operate on.
* \param the APPID value the subscriber should use to filter messages * \param the APPID value the subscriber should use to filter messages
*/ */
void LIB61850_API void
GooseSubscriber_setAppId(GooseSubscriber self, uint16_t appId); 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. * message were received with correct state and sequence ID.
* *
*/ */
bool LIB61850_API bool
GooseSubscriber_isValid(GooseSubscriber self); GooseSubscriber_isValid(GooseSubscriber self);
void LIB61850_API void
GooseSubscriber_destroy(GooseSubscriber self); GooseSubscriber_destroy(GooseSubscriber self);
/** /**
@ -104,7 +104,7 @@ GooseSubscriber_destroy(GooseSubscriber self);
* \param listener user provided callback function * \param listener user provided callback function
* \param parameter a user provided parameter that will be passed to the 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); 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 * \return the state number of the last received GOOSE message
*/ */
uint32_t LIB61850_API uint32_t
GooseSubscriber_getStNum(GooseSubscriber self); GooseSubscriber_getStNum(GooseSubscriber self);
/** /**
@ -129,7 +129,7 @@ GooseSubscriber_getStNum(GooseSubscriber self);
* *
* \return the sequence number of the last received GOOSE message * \return the sequence number of the last received GOOSE message
*/ */
uint32_t LIB61850_API uint32_t
GooseSubscriber_getSqNum(GooseSubscriber self); 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. * \return the state of the test flag of the last received GOOSE message.
*/ */
bool LIB61850_API bool
GooseSubscriber_isTest(GooseSubscriber self); 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 * \return the confRev value of the last received GOOSE message. If the message does not contain such
* a value the result is always 0 * a value the result is always 0
*/ */
uint32_t LIB61850_API uint32_t
GooseSubscriber_getConfRev(GooseSubscriber self); 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. * \return the state of the ndsCom flag of the last received GOOSE message.
* *
*/ */
bool LIB61850_API bool
GooseSubscriber_needsCommission(GooseSubscriber self); GooseSubscriber_needsCommission(GooseSubscriber self);
/** /**
@ -175,7 +175,7 @@ GooseSubscriber_needsCommission(GooseSubscriber self);
* *
* \return the TimeAllowedToLive value of the last received GOOSE message in milliseconds. * \return the TimeAllowedToLive value of the last received GOOSE message in milliseconds.
*/ */
uint32_t LIB61850_API uint32_t
GooseSubscriber_getTimeAllowedToLive(GooseSubscriber self); 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). * \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); GooseSubscriber_getTimestamp(GooseSubscriber self);
/** /**
@ -199,7 +199,7 @@ GooseSubscriber_getTimestamp(GooseSubscriber self);
* *
* \return MmsValue instance of the report data set * \return MmsValue instance of the report data set
*/ */
MmsValue* LIB61850_API MmsValue*
GooseSubscriber_getDataSetValues(GooseSubscriber self); GooseSubscriber_getDataSetValues(GooseSubscriber self);
#ifdef __cplusplus #ifdef __cplusplus

@ -520,7 +520,7 @@ IedConnection_getRCBValues(IedConnection self, IedClientError* error, const char
} }
uint32_t 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) uint32_t parametersMask, bool singleRequest, IedConnection_WriteObjectHandler handler, void* parameter)
{ {
//TODO implement //TODO implement

@ -133,7 +133,7 @@ extern "C" {
* Constructed Attribute Classes (CAC) * Constructed Attribute Classes (CAC)
***************************************************/ ***************************************************/
DataAttribute* LIB61850_API DataAttribute*
CAC_AnalogueValue_create(const char* name, ModelNode* parent, FunctionalConstraint fc, uint8_t triggerOptions, CAC_AnalogueValue_create(const char* name, ModelNode* parent, FunctionalConstraint fc, uint8_t triggerOptions,
bool isIntegerNotFloat); bool isIntegerNotFloat);
@ -143,48 +143,48 @@ CAC_AnalogueValue_create(const char* name, ModelNode* parent, FunctionalConstrai
* *
* \param hasTransInd * \param hasTransInd
*/ */
DataAttribute* LIB61850_API DataAttribute*
CAC_ValWithTrans_create(const char* name, ModelNode* parent, FunctionalConstraint fc, uint8_t triggerOptions, bool hasTransientIndicator); CAC_ValWithTrans_create(const char* name, ModelNode* parent, FunctionalConstraint fc, uint8_t triggerOptions, bool hasTransientIndicator);
/** /**
* CDC_OPTION_AC_CLC_O * 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); 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); 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); CAC_ScaledValueConfig_create(const char* name, ModelNode* parent);
DataAttribute* LIB61850_API DataAttribute*
CAC_Unit_create(const char* name, ModelNode* parent, bool hasMagnitude); CAC_Unit_create(const char* name, ModelNode* parent, bool hasMagnitude);
DataAttribute* LIB61850_API DataAttribute*
CDA_OperBoolean(ModelNode* parent, bool isTImeActivated); CDA_OperBoolean(ModelNode* parent, bool isTImeActivated);
/**************************************************** /****************************************************
* Common Data Classes (CDC) * Common Data Classes (CDC)
***************************************************/ ***************************************************/
DataObject* LIB61850_API DataObject*
CDC_SPS_create(const char* dataObjectName, ModelNode* parent, uint32_t options); 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); 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); 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); 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); 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); 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 parent the parent of the new data object (either a LogicalNode or another DataObject)
* \param options bit mask to encode required optional elements * \param options bit mask to encode required optional elements
*/ */
DataObject* LIB61850_API DataObject*
CDC_SEC_create(const char* dataObjectName, ModelNode* parent, uint32_t options); 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 * \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_MV_create(const char* dataObjectName, ModelNode* parent, uint32_t options, bool isIntegerNotFloat);
/** /**
* CDC_OPTION_INST_MAG * CDC_OPTION_INST_MAG
* CDC_OPTION_RANGE * CDC_OPTION_RANGE
*/ */
DataObject* LIB61850_API DataObject*
CDC_CMV_create(const char* dataObjectName, ModelNode* parent, uint32_t options); 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 * \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); 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 * \return new DataObject instance
*/ */
DataObject* LIB61850_API DataObject*
CDC_LPL_create(const char* dataObjectName, ModelNode* parent, uint32_t options); 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 * \return new DataObject instance
*/ */
DataObject* LIB61850_API DataObject*
CDC_DPL_create(const char* dataObjectName, ModelNode* parent, uint32_t options); 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); 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 parent the parent of the new data object (either a LogicalNode or another DataObject)
* \param options bit mask to encode required optional elements * \param options bit mask to encode required optional elements
*/ */
DataObject* LIB61850_API DataObject*
CDC_ACD_create(const char* dataObjectName, ModelNode* parent, uint32_t options); CDC_ACD_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
/** /**
* \brief Protection activation information (ACT) * \brief Protection activation information (ACT)
*/ */
DataObject* LIB61850_API DataObject*
CDC_ACT_create(const char* dataObjectName, ModelNode* parent, uint32_t options); 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 parent the parent of the new data object (either a LogicalNode or another DataObject)
* \param options bit mask to encode required optional elements * \param options bit mask to encode required optional elements
*/ */
DataObject* LIB61850_API DataObject*
CDC_SPG_create(const char* dataObjectName, ModelNode* parent, uint32_t options); 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 parent the parent of the new data object (either a LogicalNode or another DataObject)
* \param options bit mask to encode required optional elements * \param options bit mask to encode required optional elements
*/ */
DataObject* LIB61850_API DataObject*
CDC_VSG_create(const char* dataObjectName, ModelNode* parent, uint32_t options); 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 parent the parent of the new data object (either a LogicalNode or another DataObject)
* \param options bit mask to encode required optional elements * \param options bit mask to encode required optional elements
*/ */
DataObject* LIB61850_API DataObject*
CDC_ENG_create(const char* dataObjectName, ModelNode* parent, uint32_t options); 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). * 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); 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). * 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); 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: * possible options:
* CDC_OPTION_ANGLE_REF * CDC_OPTION_ANGLE_REF
*/ */
DataObject* LIB61850_API DataObject*
CDC_WYE_create(const char* dataObjectName, ModelNode* parent, uint32_t options); 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: * possible options:
* CDC_OPTION_ANGLE_REF * CDC_OPTION_ANGLE_REF
*/ */
DataObject* LIB61850_API DataObject*
CDC_DEL_create(const char* dataObjectName, ModelNode* parent, uint32_t options); 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 * \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); 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. * \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); 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. * \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); 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. * \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); 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 * \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); 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 controlOptions specify which control model to set as default and other control specific options
* \param isIntegerNotFloat * \param isIntegerNotFloat
*/ */
DataObject* LIB61850_API DataObject*
CDC_APC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions, bool isIntegerNotFloat); CDC_APC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions, bool isIntegerNotFloat);
/** Minimum measured value */ /** Minimum measured value */
@ -559,21 +559,21 @@ CDC_APC_create(const char* dataObjectName, ModelNode* parent, uint32_t options,
/** All counting data */ /** 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) #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, CDC_SPV_create(const char* dataObjectName, ModelNode* parent,
uint32_t options, uint32_t options,
uint32_t controlOptions, uint32_t controlOptions,
uint32_t wpOptions, uint32_t wpOptions,
bool hasChaManRs); bool hasChaManRs);
DataObject* LIB61850_API DataObject*
CDC_STV_create(const char* dataObjectName, ModelNode* parent, CDC_STV_create(const char* dataObjectName, ModelNode* parent,
uint32_t options, uint32_t options,
uint32_t controlOptions, uint32_t controlOptions,
uint32_t wpOptions, uint32_t wpOptions,
bool hasOldStatus); bool hasOldStatus);
DataObject* LIB61850_API DataObject*
CDC_CMD_create(const char* dataObjectName, ModelNode* parent, CDC_CMD_create(const char* dataObjectName, ModelNode* parent,
uint32_t options, uint32_t options,
uint32_t controlOptions, uint32_t controlOptions,
@ -582,21 +582,21 @@ CDC_CMD_create(const char* dataObjectName, ModelNode* parent,
bool hasCmTm, bool hasCmTm,
bool hasCmCt); bool hasCmCt);
DataObject* LIB61850_API DataObject*
CDC_ALM_create(const char* dataObjectName, ModelNode* parent, CDC_ALM_create(const char* dataObjectName, ModelNode* parent,
uint32_t options, uint32_t options,
uint32_t controlOptions, uint32_t controlOptions,
uint32_t wpOptions, uint32_t wpOptions,
bool hasOldStatus); bool hasOldStatus);
DataObject* LIB61850_API DataObject*
CDC_CTE_create(const char* dataObjectName, ModelNode* parent, CDC_CTE_create(const char* dataObjectName, ModelNode* parent,
uint32_t options, uint32_t options,
uint32_t controlOptions, uint32_t controlOptions,
uint32_t wpOptions, uint32_t wpOptions,
bool hasHisRs); bool hasHisRs);
DataObject* LIB61850_API DataObject*
CDC_TMS_create(const char* dataObjectName, ModelNode* parent, CDC_TMS_create(const char* dataObjectName, ModelNode* parent,
uint32_t options, uint32_t options,
uint32_t controlOptions, uint32_t controlOptions,

File diff suppressed because it is too large Load Diff

@ -254,13 +254,13 @@ typedef enum eFunctionalConstraint {
/**extern "C" { /**extern "C" {
* \brief convert a function constraint to a static string * \brief convert a function constraint to a static string
*/ */
char* LIB61850_API char*
FunctionalConstraint_toString(FunctionalConstraint fc); FunctionalConstraint_toString(FunctionalConstraint fc);
/** /**
* \brief parse a string treated as a functional constraint representation * \brief parse a string treated as a functional constraint representation
*/ */
FunctionalConstraint LIB61850_API FunctionalConstraint
FunctionalConstraint_fromString(const char* fcString); FunctionalConstraint_fromString(const char* fcString);
/** @} */ /** @} */
@ -297,22 +297,22 @@ typedef uint16_t Validity;
#define QUALITY_DERIVED 8192 #define QUALITY_DERIVED 8192
Validity LIB61850_API Validity
Quality_getValidity(Quality* self); Quality_getValidity(Quality* self);
void LIB61850_API void
Quality_setValidity(Quality* self, Validity validity); Quality_setValidity(Quality* self, Validity validity);
void LIB61850_API void
Quality_setFlag(Quality* self, int flag); Quality_setFlag(Quality* self, int flag);
void LIB61850_API void
Quality_unsetFlag(Quality* self, int flag); Quality_unsetFlag(Quality* self, int flag);
bool LIB61850_API bool
Quality_isFlagSet(Quality* self, int flag); Quality_isFlagSet(Quality* self, int flag);
Quality LIB61850_API Quality
Quality_fromMmsValue(const MmsValue* mmsValue); Quality_fromMmsValue(const MmsValue* mmsValue);
/** @} */ /** @} */
@ -338,7 +338,7 @@ typedef enum {
* *
* \return the corresponding Dbpos value * \return the corresponding Dbpos value
*/ */
Dbpos LIB61850_API Dbpos
Dbpos_fromMmsValue(const MmsValue* mmsValue); Dbpos_fromMmsValue(const MmsValue* mmsValue);
/** /**
@ -349,7 +349,7 @@ Dbpos_fromMmsValue(const MmsValue* mmsValue);
* *
* \return the corresponding MmsValue instance * \return the corresponding MmsValue instance
*/ */
MmsValue* LIB61850_API MmsValue*
Dbpos_toMmsValue(MmsValue* mmsValue, Dbpos dbpos); Dbpos_toMmsValue(MmsValue* mmsValue, Dbpos dbpos);
/** @} */ /** @} */
@ -364,43 +364,43 @@ typedef union {
uint8_t val[8]; uint8_t val[8];
} Timestamp; } Timestamp;
Timestamp* LIB61850_API Timestamp*
Timestamp_create(void); Timestamp_create(void);
Timestamp* LIB61850_API Timestamp*
Timestamp_createFromByteArray(uint8_t* byteArray); Timestamp_createFromByteArray(uint8_t* byteArray);
void LIB61850_API void
Timestamp_destroy(Timestamp* self); Timestamp_destroy(Timestamp* self);
void LIB61850_API void
Timestamp_clearFlags(Timestamp* self); Timestamp_clearFlags(Timestamp* self);
uint32_t LIB61850_API uint32_t
Timestamp_getTimeInSeconds(Timestamp* self); Timestamp_getTimeInSeconds(Timestamp* self);
uint64_t LIB61850_API uint64_t
Timestamp_getTimeInMs(Timestamp* self); Timestamp_getTimeInMs(Timestamp* self);
bool LIB61850_API bool
Timestamp_isLeapSecondKnown(Timestamp* self); Timestamp_isLeapSecondKnown(Timestamp* self);
void LIB61850_API void
Timestamp_setLeapSecondKnown(Timestamp* self, bool value); Timestamp_setLeapSecondKnown(Timestamp* self, bool value);
bool LIB61850_API bool
Timestamp_hasClockFailure(Timestamp* self); Timestamp_hasClockFailure(Timestamp* self);
void LIB61850_API void
Timestamp_setClockFailure(Timestamp* self, bool value); Timestamp_setClockFailure(Timestamp* self, bool value);
bool LIB61850_API bool
Timestamp_isClockNotSynchronized(Timestamp* self); Timestamp_isClockNotSynchronized(Timestamp* self);
void LIB61850_API void
Timestamp_setClockNotSynchronized(Timestamp* self, bool value); Timestamp_setClockNotSynchronized(Timestamp* self, bool value);
int LIB61850_API int
Timestamp_getSubsecondPrecision(Timestamp* self); 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 * \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); Timestamp_setSubsecondPrecision(Timestamp* self, int subsecondPrecision);
void LIB61850_API void
Timestamp_setTimeInSeconds(Timestamp* self, uint32_t secondsSinceEpoch); Timestamp_setTimeInSeconds(Timestamp* self, uint32_t secondsSinceEpoch);
void LIB61850_API void
Timestamp_setTimeInMilliseconds(Timestamp* self, uint64_t millisSinceEpoch); Timestamp_setTimeInMilliseconds(Timestamp* self, uint64_t millisSinceEpoch);
void LIB61850_API void
Timestamp_setByMmsUtcTime(Timestamp* self, MmsValue* mmsValue); Timestamp_setByMmsUtcTime(Timestamp* self, MmsValue* mmsValue);
/** /**
@ -426,7 +426,7 @@ Timestamp_setByMmsUtcTime(Timestamp* self, MmsValue* mmsValue);
* \param self the Timestamp instance * \param self the Timestamp instance
* \param mmsValue the mmsValue instance, if NULL a new instance will be created * \param mmsValue the mmsValue instance, if NULL a new instance will be created
*/ */
MmsValue* LIB61850_API MmsValue*
Timestamp_toMmsValue(Timestamp* self, MmsValue* 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") * \return the version of the library (e.g. "1.2.2")
*/ */
char* LIB61850_API char*
LibIEC61850_getVersionString(void); LibIEC61850_getVersionString(void);
/** @} */ /** @} */

@ -40,7 +40,7 @@ extern "C" {
* @{ * @{
*/ */
IedModel* LIB61850_API IedModel*
ConfigFileParser_createModelFromConfigFile(FileHandle fileHandle); ConfigFileParser_createModelFromConfigFile(FileHandle fileHandle);
/**@}*/ /**@}*/

@ -52,7 +52,7 @@ extern "C" {
* *
* \return * \return
*/ */
IedModel* LIB61850_API IedModel*
IedModel_create(const char* name/*, MemoryAllocator allocator*/); IedModel_create(const char* name/*, MemoryAllocator allocator*/);
/** /**
@ -66,7 +66,7 @@ IedModel_create(const char* name/*, MemoryAllocator allocator*/);
* \param model the IedModel instance * \param model the IedModel instance
* \param the name of the configured IED * \param the name of the configured IED
*/ */
void LIB61850_API void
IedModel_setIedNameForDynamicModel(IedModel* self, const char* name); 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 * \param model the model instance to destroy
*/ */
void LIB61850_API void
IedModel_destroy(IedModel* model); IedModel_destroy(IedModel* model);
/** /**
@ -89,7 +89,7 @@ IedModel_destroy(IedModel* model);
* *
* \return the newly created LogicalDevice instance * \return the newly created LogicalDevice instance
*/ */
LogicalDevice* LIB61850_API LogicalDevice*
LogicalDevice_create(const char* name, IedModel* parent); LogicalDevice_create(const char* name, IedModel* parent);
@ -101,7 +101,7 @@ LogicalDevice_create(const char* name, IedModel* parent);
* *
* \return the newly created LogicalNode instance * \return the newly created LogicalNode instance
*/ */
LogicalNode* LIB61850_API LogicalNode*
LogicalNode_create(const char* name, LogicalDevice* parent); LogicalNode_create(const char* name, LogicalDevice* parent);
/** /**
@ -115,7 +115,7 @@ LogicalNode_create(const char* name, LogicalDevice* parent);
* *
* \return the newly create DataObject instance * \return the newly create DataObject instance
*/ */
DataObject* LIB61850_API DataObject*
DataObject_create(const char* name, ModelNode* parent, int arrayElements); 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 * \return the newly create DataAttribute instance
*/ */
DataAttribute* LIB61850_API DataAttribute*
DataAttribute_create(const char* name, ModelNode* parent, DataAttributeType type, FunctionalConstraint fc, DataAttribute_create(const char* name, ModelNode* parent, DataAttributeType type, FunctionalConstraint fc,
uint8_t triggerOptions, int arrayElements, uint32_t sAddr); 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. * \return the new RCB instance.
*/ */
ReportControlBlock* LIB61850_API ReportControlBlock*
ReportControlBlock_create(const char* name, LogicalNode* parent, char* rptId, bool isBuffered, char* 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); 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 * \return the new LCB instance
*/ */
LogControlBlock* LIB61850_API LogControlBlock*
LogControlBlock_create(const char* name, LogicalNode* parent, char* dataSetName, char* logRef, uint8_t trgOps, LogControlBlock_create(const char* name, LogicalNode* parent, char* dataSetName, char* logRef, uint8_t trgOps,
uint32_t intgPd, bool logEna, bool reasonCode); 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 * \return the new LOG instance
*/ */
Log* LIB61850_API Log*
Log_create(const char* name, LogicalNode* parent); Log_create(const char* name, LogicalNode* parent);
/** /**
@ -203,7 +203,7 @@ Log_create(const char* name, LogicalNode* parent);
* *
* \return the new SGCB instance * \return the new SGCB instance
*/ */
SettingGroupControlBlock* LIB61850_API SettingGroupControlBlock*
SettingGroupControlBlock_create(LogicalNode* parent, uint8_t actSG, uint8_t numOfSGs); 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 * \return the new GoCB instance
*/ */
GSEControlBlock* LIB61850_API GSEControlBlock*
GSEControlBlock_create(const char* name, LogicalNode* parent, char* appId, char* dataSet, uint32_t confRev, GSEControlBlock_create(const char* name, LogicalNode* parent, char* appId, char* dataSet, uint32_t confRev,
bool fixedOffs, int minTime, int maxTime); 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 * \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, 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); uint16_t smpRate, uint8_t optFlds, bool isUnicast);
void LIB61850_API void
SVControlBlock_addPhyComAddress(SVControlBlock* self, PhyComAddress* phyComAddress); SVControlBlock_addPhyComAddress(SVControlBlock* self, PhyComAddress* phyComAddress);
void LIB61850_API void
GSEControlBlock_addPhyComAddress(GSEControlBlock* self, PhyComAddress* phyComAddress); GSEControlBlock_addPhyComAddress(GSEControlBlock* self, PhyComAddress* phyComAddress);
/** /**
@ -264,7 +264,7 @@ GSEControlBlock_addPhyComAddress(GSEControlBlock* self, PhyComAddress* phyComAdd
* *
* \return the new PhyComAddress object * \return the new PhyComAddress object
*/ */
PhyComAddress* LIB61850_API PhyComAddress*
PhyComAddress_create(uint8_t vlanPriority, uint16_t vlanId, uint16_t appId, uint8_t dstAddress[]); 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 * \return the new data set instance
*/ */
DataSet* LIB61850_API DataSet*
DataSet_create(const char* name, LogicalNode* parent); 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 * \returns the number of data set elements
*/ */
int LIB61850_API int
DataSet_getSize(DataSet* self); DataSet_getSize(DataSet* self);
DataSetEntry* LIB61850_API DataSetEntry*
DataSet_getFirstEntry(DataSet* self); DataSet_getFirstEntry(DataSet* self);
DataSetEntry* LIB61850_API DataSetEntry*
DataSetEntry_getNext(DataSetEntry* self); DataSetEntry_getNext(DataSetEntry* self);
/** /**
@ -314,7 +314,7 @@ DataSetEntry_getNext(DataSetEntry* self);
* *
* \return the new data set entry instance * \return the new data set entry instance
*/ */
DataSetEntry* LIB61850_API DataSetEntry*
DataSetEntry_create(DataSet* dataSet, const char* variable, int index, const char* component); DataSetEntry_create(DataSet* dataSet, const char* variable, int index, const char* component);
/**@}*/ /**@}*/

@ -350,7 +350,7 @@ struct sSVControlBlock {
* \return the number of children of the model node * \return the number of children of the model node
* ¸ * ¸
*/ */
int LIB61850_API int
ModelNode_getChildCount(ModelNode* self); 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. * \return the model node instance or NULL if model node does not exist.
*/ */
ModelNode* LIB61850_API ModelNode*
ModelNode_getChild(ModelNode* self, const char* name); 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. * \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); 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 * \return the object reference string
*/ */
char* LIB61850_API char*
ModelNode_getObjectReference(ModelNode* self, char* objectReference); 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) * \return the type of the ModelNode (one of LD, LN, DO, DA)
*/ */
ModelNodeType LIB61850_API ModelNodeType
ModelNode_getType(ModelNode* self); ModelNode_getType(ModelNode* self);
/** /**
@ -411,7 +411,7 @@ ModelNode_getType(ModelNode* self);
* \param model the IedModel instance * \param model the IedModel instance
* \param the name of the configured IED * \param the name of the configured IED
*/ */
void LIB61850_API void
IedModel_setIedName(IedModel* self, const char* iedName); 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. * \return the model node instance or NULL if model node does not exist.
*/ */
ModelNode* LIB61850_API ModelNode*
IedModel_getModelNodeByObjectReference(IedModel* self, const char* objectReference); IedModel_getModelNodeByObjectReference(IedModel* self, const char* objectReference);
SVControlBlock* LIB61850_API SVControlBlock*
IedModel_getSVControlBlock(IedModel* self, LogicalNode* parentLN, const char* svcbName); 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. * \return the model node instance or NULL if model node does not exist.
*/ */
ModelNode* LIB61850_API ModelNode*
IedModel_getModelNodeByShortObjectReference(IedModel* self, const char* objectReference); 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. * \return the model node instance or NULL if model node does not exist.
*/ */
ModelNode* LIB61850_API ModelNode*
IedModel_getModelNodeByShortAddress(IedModel* self, uint32_t shortAddress); IedModel_getModelNodeByShortAddress(IedModel* self, uint32_t shortAddress);
/** /**
@ -469,7 +469,7 @@ IedModel_getModelNodeByShortAddress(IedModel* self, uint32_t shortAddress);
* *
* \return The matching LogicalDevice instance * \return The matching LogicalDevice instance
*/ */
LogicalDevice* LIB61850_API LogicalDevice*
IedModel_getDeviceByInst(IedModel* self, const char* ldInst); 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 * \return the corresponding LogicalDevice* object or NULL if the index is out of range
*/ */
LogicalDevice* LIB61850_API LogicalDevice*
IedModel_getDeviceByIndex(IedModel* self, int index); 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 * \return the logical device instance or NULL if it does not exist
*/ */
LogicalNode* LIB61850_API LogicalNode*
LogicalDevice_getLogicalNode(LogicalDevice* self, const char* lnName); 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 * \return the SGCB instance or NULL if no SGCB is available
*/ */
SettingGroupControlBlock* LIB61850_API SettingGroupControlBlock*
LogicalDevice_getSettingGroupControlBlock(LogicalDevice* self); LogicalDevice_getSettingGroupControlBlock(LogicalDevice* self);
/**@}*/ /**@}*/
@ -515,7 +515,7 @@ LogicalDevice_getSettingGroupControlBlock(LogicalDevice* self);
* *
* \param self the IedModel instance that holds the model node * \param self the IedModel instance that holds the model node
*/ */
void LIB61850_API void
IedModel_setAttributeValuesToNull(IedModel* self); IedModel_setAttributeValuesToNull(IedModel* self);
/** /**
@ -526,7 +526,7 @@ IedModel_setAttributeValuesToNull(IedModel* self);
* *
* \return The matching LogicalDevice instance * \return The matching LogicalDevice instance
*/ */
LogicalDevice* LIB61850_API LogicalDevice*
IedModel_getDevice(IedModel* self, const char* ldName); IedModel_getDevice(IedModel* self, const char* ldName);
/** /**
@ -537,7 +537,7 @@ IedModel_getDevice(IedModel* self, const char* ldName);
* *
* \return The matching DataSet instance * \return The matching DataSet instance
*/ */
DataSet* LIB61850_API DataSet*
IedModel_lookupDataSet(IedModel* self, const char* dataSetReference); IedModel_lookupDataSet(IedModel* self, const char* dataSetReference);
/** /**
@ -548,7 +548,7 @@ IedModel_lookupDataSet(IedModel* self, const char* dataSetReference);
* *
* \return the matching DataAttribute instance * \return the matching DataAttribute instance
*/ */
DataAttribute* LIB61850_API DataAttribute*
IedModel_lookupDataAttributeByMmsValue(IedModel* self, MmsValue* value); IedModel_lookupDataAttributeByMmsValue(IedModel* self, MmsValue* value);
@ -559,22 +559,22 @@ IedModel_lookupDataAttributeByMmsValue(IedModel* self, MmsValue* value);
* *
* \return the number of logical devices * \return the number of logical devices
*/ */
int LIB61850_API int
IedModel_getLogicalDeviceCount(IedModel* self); IedModel_getLogicalDeviceCount(IedModel* self);
int LIB61850_API int
LogicalDevice_getLogicalNodeCount(LogicalDevice* self); LogicalDevice_getLogicalNodeCount(LogicalDevice* self);
ModelNode* LIB61850_API ModelNode*
LogicalDevice_getChildByMmsVariableName(LogicalDevice* self, const char* mmsVariableName); LogicalDevice_getChildByMmsVariableName(LogicalDevice* self, const char* mmsVariableName);
bool LIB61850_API bool
LogicalNode_hasFCData(LogicalNode* self, FunctionalConstraint fc); LogicalNode_hasFCData(LogicalNode* self, FunctionalConstraint fc);
bool LIB61850_API bool
LogicalNode_hasBufferedReports(LogicalNode* self); LogicalNode_hasBufferedReports(LogicalNode* self);
bool LIB61850_API bool
LogicalNode_hasUnbufferedReports(LogicalNode* self); 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 * \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); LogicalNode_getDataSet(LogicalNode* self, const char* dataSetName);
bool LIB61850_API bool
DataObject_hasFCData(DataObject* self, FunctionalConstraint fc); DataObject_hasFCData(DataObject* self, FunctionalConstraint fc);

@ -31,7 +31,7 @@
extern "C" { extern "C" {
#endif #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 * \return a new configuration object with default configuration values
*/ */
IedServerConfig LIB61850_API IedServerConfig
IedServerConfig_create(void); IedServerConfig_create(void);
/** /**
* \brief Destroy the configuration object * \brief Destroy the configuration object
*/ */
void LIB61850_API void
IedServerConfig_destroy(IedServerConfig self); 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 * \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); 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 * \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); IedServerConfig_getEdition(IedServerConfig self);
/** /**
@ -114,7 +114,7 @@ IedServerConfig_getEdition(IedServerConfig self);
* *
* \param reportBufferSize the buffer size for each buffered report control block * \param reportBufferSize the buffer size for each buffered report control block
*/ */
void LIB61850_API void
IedServerConfig_setReportBufferSize(IedServerConfig self, int reportBufferSize); 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 * \return the buffer size for each buffered report control block
*/ */
int LIB61850_API int
IedServerConfig_getReportBufferSize(IedServerConfig self); IedServerConfig_getReportBufferSize(IedServerConfig self);
/** /**
@ -133,7 +133,7 @@ IedServerConfig_getReportBufferSize(IedServerConfig self);
* *
* \param maxConnection maximum number of TCP connections * \param maxConnection maximum number of TCP connections
*/ */
void LIB61850_API void
IedServerConfig_setMaxMmsConnections(IedServerConfig self, int maxConnections); IedServerConfig_setMaxMmsConnections(IedServerConfig self, int maxConnections);
/** /**
@ -141,7 +141,7 @@ IedServerConfig_setMaxMmsConnections(IedServerConfig self, int maxConnections);
* *
* \return maximum number of TCP connections * \return maximum number of TCP connections
*/ */
int LIB61850_API int
IedServerConfig_getMaxMmsConnections(IedServerConfig self); IedServerConfig_getMaxMmsConnections(IedServerConfig self);
/** /**
@ -151,13 +151,13 @@ IedServerConfig_getMaxMmsConnections(IedServerConfig self);
* *
* \param basepath new file service base path * \param basepath new file service base path
*/ */
void LIB61850_API void
IedServerConfig_setFileServiceBasePath(IedServerConfig self, const char* basepath); IedServerConfig_setFileServiceBasePath(IedServerConfig self, const char* basepath);
/** /**
* \brief Get the basepath of the file services * \brief Get the basepath of the file services
*/ */
const char* LIB61850_API const char*
IedServerConfig_getFileServiceBasePath(IedServerConfig self); IedServerConfig_getFileServiceBasePath(IedServerConfig self);
/** /**
@ -165,7 +165,7 @@ IedServerConfig_getFileServiceBasePath(IedServerConfig self);
* *
* \param[in] enable set true to enable the file services, otherwise false * \param[in] enable set true to enable the file services, otherwise false
*/ */
void LIB61850_API void
IedServerConfig_enableFileService(IedServerConfig self, bool enable); IedServerConfig_enableFileService(IedServerConfig self, bool enable);
/** /**
@ -173,7 +173,7 @@ IedServerConfig_enableFileService(IedServerConfig self, bool enable);
* *
* \return true if enabled, false otherwise * \return true if enabled, false otherwise
*/ */
bool LIB61850_API bool
IedServerConfig_isFileServiceEnabled(IedServerConfig self); 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 * \param[in] enable set true to enable dynamic data set service, otherwise false
*/ */
void LIB61850_API void
IedServerConfig_enableDynamicDataSetService(IedServerConfig self, bool enable); IedServerConfig_enableDynamicDataSetService(IedServerConfig self, bool enable);
/** /**
@ -189,7 +189,7 @@ IedServerConfig_enableDynamicDataSetService(IedServerConfig self, bool enable);
* *
* \return true if enabled, false otherwise * \return true if enabled, false otherwise
*/ */
bool LIB61850_API bool
IedServerConfig_isDynamicDataSetServiceEnabled(IedServerConfig self); IedServerConfig_isDynamicDataSetServiceEnabled(IedServerConfig self);
/** /**
@ -200,7 +200,7 @@ IedServerConfig_isDynamicDataSetServiceEnabled(IedServerConfig self);
* *
* \param maxDataSets maximum number of allowed data sets. * \param maxDataSets maximum number of allowed data sets.
*/ */
void LIB61850_API void
IedServerConfig_setMaxAssociationSpecificDataSets(IedServerConfig self, int maxDataSets); IedServerConfig_setMaxAssociationSpecificDataSets(IedServerConfig self, int maxDataSets);
/** /**
@ -208,7 +208,7 @@ IedServerConfig_setMaxAssociationSpecificDataSets(IedServerConfig self, int maxD
* *
* \return maximum number of allowed data sets. * \return maximum number of allowed data sets.
*/ */
int LIB61850_API int
IedServerConfig_getMaxAssociationSpecificDataSets(IedServerConfig self); IedServerConfig_getMaxAssociationSpecificDataSets(IedServerConfig self);
/** /**
@ -216,7 +216,7 @@ IedServerConfig_getMaxAssociationSpecificDataSets(IedServerConfig self);
* *
* \param maxDataSets maximum number of allowed data sets. * \param maxDataSets maximum number of allowed data sets.
*/ */
void LIB61850_API void
IedServerConfig_setMaxDomainSpecificDataSets(IedServerConfig self, int maxDataSets); IedServerConfig_setMaxDomainSpecificDataSets(IedServerConfig self, int maxDataSets);
/** /**
@ -224,7 +224,7 @@ IedServerConfig_setMaxDomainSpecificDataSets(IedServerConfig self, int maxDataSe
* *
* \return maximum number of allowed data sets. * \return maximum number of allowed data sets.
*/ */
int LIB61850_API int
IedServerConfig_getMaxDomainSpecificDataSets(IedServerConfig self); IedServerConfig_getMaxDomainSpecificDataSets(IedServerConfig self);
/** /**
@ -236,7 +236,7 @@ IedServerConfig_getMaxDomainSpecificDataSets(IedServerConfig self);
* *
* \param maxDataSetEntries the maximum number of entries allowed in a data set * \param maxDataSetEntries the maximum number of entries allowed in a data set
*/ */
void LIB61850_API void
IedServerConfig_setMaxDataSetEntries(IedServerConfig self, int maxDataSetEntries); 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 * \return the maximum number of entries allowed in a data sets
*/ */
int LIB61850_API int
IedServerConfig_getMaxDatasSetEntries(IedServerConfig self); 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 * \param[in] enable set true to enable dynamic data set service, otherwise false
*/ */
void LIB61850_API void
IedServerConfig_enableLogService(IedServerConfig self, bool enable); IedServerConfig_enableLogService(IedServerConfig self, bool enable);
/** /**
@ -260,7 +260,7 @@ IedServerConfig_enableLogService(IedServerConfig self, bool enable);
* *
* \return true if enabled, false otherwise * \return true if enabled, false otherwise
*/ */
bool LIB61850_API bool
IedServerConfig_isLogServiceEnabled(IedServerConfig self); IedServerConfig_isLogServiceEnabled(IedServerConfig self);
/** /**
@ -287,7 +287,7 @@ typedef struct sClientConnection* ClientConnection;
* *
* \return the new IedServer instance * \return the new IedServer instance
*/ */
IedServer LIB61850_API IedServer
IedServer_create(IedModel* dataModel); IedServer_create(IedModel* dataModel);
/** /**
@ -298,7 +298,7 @@ IedServer_create(IedModel* dataModel);
* *
* \return the new IedServer instance * \return the new IedServer instance
*/ */
IedServer LIB61850_API IedServer
IedServer_createWithTlsSupport(IedModel* dataModel, TLSConfiguration tlsConfiguration); 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 tlsConfiguration TLS configuration object, or NULL to not use TLS
* \param serverConfiguration IED server configuration object for advanced server configuration * \param serverConfiguration IED server configuration object for advanced server configuration
*/ */
IedServer LIB61850_API IedServer
IedServer_createWithConfig(IedModel* dataModel, TLSConfiguration tlsConfiguration, IedServerConfig serverConfiguration); 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. * \param self the instance of IedServer to operate on.
*/ */
void LIB61850_API void
IedServer_destroy(IedServer self); IedServer_destroy(IedServer self);
/** /**
@ -325,7 +325,7 @@ IedServer_destroy(IedServer self);
* \param self the IedServer instance * \param self the IedServer instance
* \param localIpAddress the local IP address as C string (an internal copy will be created) * \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); IedServer_setLocalIpAddress(IedServer self, const char* localIpAddress);
/** /**
@ -338,7 +338,7 @@ IedServer_setLocalIpAddress(IedServer self, const char* localIpAddress);
* \param self the IedServer instance * \param self the IedServer instance
* \param basepath the new virtual filestore basepath * \param basepath the new virtual filestore basepath
*/ */
void LIB61850_API void
IedServer_setFilestoreBasepath(IedServer self, const char* basepath); 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 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) * \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); 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. * \param self the instance of IedServer to operate on.
*/ */
void LIB61850_API void
IedServer_stop(IedServer self); IedServer_stop(IedServer self);
/** /**
@ -368,7 +368,7 @@ IedServer_stop(IedServer self);
* \param self the instance of IedServer to operate on. * \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) * \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); 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 * \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); 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. * \param self the instance of IedServer to operate on.
*/ */
void LIB61850_API void
IedServer_processIncomingData(IedServer self); IedServer_processIncomingData(IedServer self);
/** /**
@ -407,7 +407,7 @@ IedServer_processIncomingData(IedServer self);
* *
* \param self the instance of IedServer to operate on. * \param self the instance of IedServer to operate on.
*/ */
void LIB61850_API void
IedServer_performPeriodicTasks(IedServer self); IedServer_performPeriodicTasks(IedServer self);
/** /**
@ -415,7 +415,7 @@ IedServer_performPeriodicTasks(IedServer self);
* *
* \param self the instance of IedServer to operate on. * \param self the instance of IedServer to operate on.
*/ */
void LIB61850_API void
IedServer_stopThreadless(IedServer self); IedServer_stopThreadless(IedServer self);
/** /**
@ -425,7 +425,7 @@ IedServer_stopThreadless(IedServer self);
* *
* \return the IedModel* instance of the server * \return the IedModel* instance of the server
*/ */
IedModel* LIB61850_API IedModel*
IedServer_getDataModel(IedServer self); IedServer_getDataModel(IedServer self);
/** /**
@ -435,7 +435,7 @@ IedServer_getDataModel(IedServer self);
* *
* \return true if IedServer instance is listening for client connections * \return true if IedServer instance is listening for client connections
*/ */
bool LIB61850_API bool
IedServer_isRunning(IedServer self); IedServer_isRunning(IedServer self);
/** /**
@ -448,7 +448,7 @@ IedServer_isRunning(IedServer self);
* *
* \return MmsServer instance that is used by the IedServer * \return MmsServer instance that is used by the IedServer
*/ */
MmsServer LIB61850_API MmsServer
IedServer_getMmsServer(IedServer self); IedServer_getMmsServer(IedServer self);
/** /**
@ -461,7 +461,7 @@ IedServer_getMmsServer(IedServer self);
* *
* \param self the instance of IedServer to operate on. * \param self the instance of IedServer to operate on.
*/ */
void LIB61850_API void
IedServer_enableGoosePublishing(IedServer self); IedServer_enableGoosePublishing(IedServer self);
/** /**
@ -472,7 +472,7 @@ IedServer_enableGoosePublishing(IedServer self);
* *
* \param self the instance of IedServer to operate on. * \param self the instance of IedServer to operate on.
*/ */
void LIB61850_API void
IedServer_disableGoosePublishing(IedServer self); IedServer_disableGoosePublishing(IedServer self);
/** /**
@ -485,7 +485,7 @@ IedServer_disableGoosePublishing(IedServer self);
* \param self the instance of IedServer to operate on. * \param self the instance of IedServer to operate on.
* \param interfaceId the ID of the ethernet interface to be used for GOOSE publishing * \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); 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 authenticator the user provided authenticator callback
* \param authenticatorParameter user provided parameter that is passed to the authenticator * \param authenticatorParameter user provided parameter that is passed to the authenticator
*/ */
void LIB61850_API void
IedServer_setAuthenticator(IedServer self, AcseAuthenticator authenticator, void* authenticatorParameter); IedServer_setAuthenticator(IedServer self, AcseAuthenticator authenticator, void* authenticatorParameter);
@ -522,7 +522,7 @@ IedServer_setAuthenticator(IedServer self, AcseAuthenticator authenticator, void
* \param self the ClientConnection instance * \param self the ClientConnection instance
* \return peer address as C string. * \return peer address as C string.
*/ */
const char* LIB61850_API const char*
ClientConnection_getPeerAddress(ClientConnection self); ClientConnection_getPeerAddress(ClientConnection self);
/** /**
@ -535,7 +535,7 @@ ClientConnection_getPeerAddress(ClientConnection self);
* *
* \return the security token or NULL * \return the security token or NULL
*/ */
void* LIB61850_API void*
ClientConnection_getSecurityToken(ClientConnection self); ClientConnection_getSecurityToken(ClientConnection self);
/** /**
@ -556,7 +556,7 @@ typedef void (*IedConnectionIndicationHandler) (IedServer self, ClientConnection
* \param handler the user provided callback function * \param handler the user provided callback function
* \param parameter a user provided parameter that is passed to the 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); 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. * \param self the instance of IedServer to operate on.
*/ */
void LIB61850_API void
IedServer_lockDataModel(IedServer self); IedServer_lockDataModel(IedServer self);
/** /**
@ -593,7 +593,7 @@ IedServer_lockDataModel(IedServer self);
* *
* \param self the instance of IedServer to operate on. * \param self the instance of IedServer to operate on.
*/ */
void LIB61850_API void
IedServer_unlockDataModel(IedServer self); 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. * \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); IedServer_getAttributeValue(IedServer self, DataAttribute* dataAttribute);
/** /**
@ -622,7 +622,7 @@ IedServer_getAttributeValue(IedServer self, DataAttribute* dataAttribute);
* *
* \return true or false * \return true or false
*/ */
bool LIB61850_API bool
IedServer_getBooleanAttributeValue(IedServer self, const DataAttribute* dataAttribute); 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 * \return the value as 32 bit integer
*/ */
int32_t LIB61850_API int32_t
IedServer_getInt32AttributeValue(IedServer self, const DataAttribute* dataAttribute); 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 * \return the value as 64 bit integer
*/ */
int64_t LIB61850_API int64_t
IedServer_getInt64AttributeValue(IedServer self, const DataAttribute* dataAttribute); 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 * \return the value as 32 bit unsigned integer
*/ */
uint32_t LIB61850_API uint32_t
IedServer_getUInt32AttributeValue(IedServer self, const DataAttribute* dataAttribute); 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 * \return the value as 32 bit float
*/ */
float LIB61850_API float
IedServer_getFloatAttributeValue(IedServer self, const DataAttribute* dataAttribute); 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 * \return the value as 32 bit float
*/ */
uint64_t LIB61850_API uint64_t
IedServer_getUTCTimeAttributeValue(IedServer self, const DataAttribute* dataAttribute); 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. * \return the value a 32 bit integer.
*/ */
uint32_t LIB61850_API uint32_t
IedServer_getBitStringAttributeValue(IedServer self, const DataAttribute* dataAttribute); 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) * \return the value as a C string (null terminated string)
*/ */
const char* LIB61850_API const char*
IedServer_getStringAttributeValue(IedServer self, const DataAttribute* dataAttribute); 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. * \return MmsValue object cached by the server.
*/ */
MmsValue* LIB61850_API MmsValue*
IedServer_getFunctionalConstrainedData(IedServer self, DataObject* dataObject, FunctionalConstraint fc); 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 dataAttribute the data attribute handle
* \param value MmsValue object used to update the value cached by the server. * \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); 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 dataAttribute the data attribute handle
* \param value the new float value of the data attribute. * \param value the new float value of the data attribute.
*/ */
void LIB61850_API void
IedServer_updateFloatAttributeValue(IedServer self, DataAttribute* dataAttribute, float value); 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 dataAttribute the data attribute handle
* \param value the new integer value of the data attribute. * \param value the new integer value of the data attribute.
*/ */
void LIB61850_API void
IedServer_updateInt32AttributeValue(IedServer self, DataAttribute* dataAttribute, int32_t value); 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 dataAttribute the data attribute handle
* \param value the new Dbpos value of the data attribute. * \param value the new Dbpos value of the data attribute.
*/ */
void LIB61850_API void
IedServer_udpateDbposValue(IedServer self, DataAttribute* dataAttribute, Dbpos value); 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 dataAttribute the data attribute handle
* \param value the new 64 bit integer value of the data attribute. * \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); 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 dataAttribute the data attribute handle
* \param value the new unsigned integer value of the data attribute. * \param value the new unsigned integer value of the data attribute.
*/ */
void LIB61850_API void
IedServer_updateUnsignedAttributeValue(IedServer self, DataAttribute* dataAttribute, uint32_t value); 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 dataAttribute the data attribute handle
* \param value the new bit string integer value of the data attribute. * \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); 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 dataAttribute the data attribute handle
* \param value the new boolean value of the data attribute. * \param value the new boolean value of the data attribute.
*/ */
void LIB61850_API void
IedServer_updateBooleanAttributeValue(IedServer self, DataAttribute* dataAttribute, bool value); 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 dataAttribute the data attribute handle
* \param value the new visible string value of the data attribute. * \param value the new visible string value of the data attribute.
*/ */
void LIB61850_API void
IedServer_updateVisibleStringAttributeValue(IedServer self, DataAttribute* dataAttribute, char *value); 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 dataAttribute the data attribute handle
* \param value the new UTC time value of the data attribute as a ms timestamp * \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); 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 dataAttribute the data attribute handle
* \param value the new UTC time value of the data attribute as a Timestamp * \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); IedServer_updateTimestampAttributeValue(IedServer self, DataAttribute* dataAttribute, Timestamp* timestamp);
/** /**
@ -929,13 +929,13 @@ IedServer_updateTimestampAttributeValue(IedServer self, DataAttribute* dataAttri
* \param quality the new quality value * \param quality the new quality value
* *
*/ */
void LIB61850_API void
IedServer_updateQuality(IedServer self, DataAttribute* dataAttribute, Quality quality); IedServer_updateQuality(IedServer self, DataAttribute* dataAttribute, Quality quality);
/**@}*/ /**@}*/
void LIB61850_API void
IedServer_setLogStorage(IedServer self, const char* logRef, LogStorage logStorage); 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 sgcb the handle of the setting group control block of the setting group
* \param newActiveSg the number of the new active 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); 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 * \return the number of the active setting group
*/ */
uint8_t LIB61850_API uint8_t
IedServer_getActiveSettingGroup(IedServer self, SettingGroupControlBlock* sgcb); IedServer_getActiveSettingGroup(IedServer self, SettingGroupControlBlock* sgcb);
/** /**
@ -994,7 +994,7 @@ typedef bool (*ActiveSettingGroupChangedHandler) (void* parameter, SettingGroupC
* \param handler the user provided callback handler. * \param handler the user provided callback handler.
* \param parameter a user provided parameter that is passed to the control handler. * \param parameter a user provided parameter that is passed to the control handler.
*/ */
void LIB61850_API void
IedServer_setActiveSettingGroupChangedHandler(IedServer self, SettingGroupControlBlock* sgcb, IedServer_setActiveSettingGroupChangedHandler(IedServer self, SettingGroupControlBlock* sgcb,
ActiveSettingGroupChangedHandler handler, void* parameter); ActiveSettingGroupChangedHandler handler, void* parameter);
@ -1026,7 +1026,7 @@ typedef bool (*EditSettingGroupChangedHandler) (void* parameter, SettingGroupCon
* \param handler the user provided callback handler. * \param handler the user provided callback handler.
* \param parameter a user provided parameter that is passed to the control handler. * \param parameter a user provided parameter that is passed to the control handler.
*/ */
void LIB61850_API void
IedServer_setEditSettingGroupChangedHandler(IedServer self, SettingGroupControlBlock* sgcb, IedServer_setEditSettingGroupChangedHandler(IedServer self, SettingGroupControlBlock* sgcb,
EditSettingGroupChangedHandler handler, void* parameter); EditSettingGroupChangedHandler handler, void* parameter);
@ -1050,7 +1050,7 @@ typedef void (*EditSettingGroupConfirmationHandler) (void* parameter, SettingGro
* \param handler the user provided callback handler. * \param handler the user provided callback handler.
* \param parameter a user provided parameter that is passed to the control handler. * \param parameter a user provided parameter that is passed to the control handler.
*/ */
void LIB61850_API void
IedServer_setEditSettingGroupConfirmationHandler(IedServer self, SettingGroupControlBlock* sgcb, IedServer_setEditSettingGroupConfirmationHandler(IedServer self, SettingGroupControlBlock* sgcb,
EditSettingGroupConfirmationHandler handler, void* parameter); EditSettingGroupConfirmationHandler handler, void* parameter);
@ -1157,7 +1157,7 @@ typedef ControlHandlerResult (*ControlHandler) (void* parameter, MmsValue* ctlVa
* \param handler a callback function of type ControlHandler * \param handler a callback function of type ControlHandler
* \param parameter a user provided parameter that is passed to the control handler. * \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); 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. * \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); 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. * \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); 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 handler the event handler to be used
* \param parameter a user provided parameter that is passed to the handler. * \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); IedServer_setSVCBHandler(IedServer self, SVControlBlock* svcb, SVCBEventHandler handler, void* parameter);
/**@}*/ /**@}*/
@ -1277,7 +1277,7 @@ typedef MmsDataAccessError
* the monitored data attribute. * the monitored data attribute.
* \param parameter a user provided parameter that is passed to the WriteAccessHandler when called. * \param parameter a user provided parameter that is passed to the WriteAccessHandler when called.
*/ */
void LIB61850_API void
IedServer_handleWriteAccess(IedServer self, DataAttribute* dataAttribute, IedServer_handleWriteAccess(IedServer self, DataAttribute* dataAttribute,
WriteAccessHandler handler, void* parameter); WriteAccessHandler handler, void* parameter);
@ -1294,7 +1294,7 @@ typedef enum {
* \param policy the new policy to apply. * \param policy the new policy to apply.
* *
*/ */
void LIB61850_API void
IedServer_setWriteAccessPolicy(IedServer self, FunctionalConstraint fc, AccessPolicy policy); 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 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. * \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); IedServer_setReadAccessHandler(IedServer self, ReadAccessHandler handler, void* parameter);
/**@}*/ /**@}*/

@ -1,7 +1,7 @@
/* /*
* control.h * control.h
* *
* Copyright 2013 Michael Zillgith * Copyright 2013-2018 Michael Zillgith
* *
* This file is part of libIEC61850. * This file is part of libIEC61850.
* *
@ -103,49 +103,49 @@ struct sControlObject
void* waitForExecutionHandlerParameter; void* waitForExecutionHandlerParameter;
}; };
ControlObject* LIB61850_INTERNAL ControlObject*
ControlObject_create(IedServer iedServer, MmsDomain* domain, char* lnName, char* name, MmsVariableSpecification* operSpec); ControlObject_create(IedServer iedServer, MmsDomain* domain, char* lnName, char* name, MmsVariableSpecification* operSpec);
void LIB61850_INTERNAL void
ControlObject_initialize(ControlObject* self); ControlObject_initialize(ControlObject* self);
void LIB61850_INTERNAL void
ControlObject_destroy(ControlObject* self); ControlObject_destroy(ControlObject* self);
void LIB61850_INTERNAL void
ControlObject_setMmsValue(ControlObject* self, MmsValue* value); ControlObject_setMmsValue(ControlObject* self, MmsValue* value);
MmsValue* LIB61850_INTERNAL MmsValue*
ControlObject_getMmsValue(ControlObject* self); ControlObject_getMmsValue(ControlObject* self);
void LIB61850_INTERNAL void
ControlObject_setTypeSpec(ControlObject* self, MmsVariableSpecification* typeSpec); ControlObject_setTypeSpec(ControlObject* self, MmsVariableSpecification* typeSpec);
MmsVariableSpecification* LIB61850_INTERNAL MmsVariableSpecification*
ControlObject_getTypeSpec(ControlObject* self); ControlObject_getTypeSpec(ControlObject* self);
char* LIB61850_INTERNAL char*
ControlObject_getName(ControlObject* self); ControlObject_getName(ControlObject* self);
char* LIB61850_INTERNAL char*
ControlObject_getLNName(ControlObject* self); ControlObject_getLNName(ControlObject* self);
MmsDomain* LIB61850_INTERNAL MmsDomain*
ControlObject_getDomain(ControlObject* self); ControlObject_getDomain(ControlObject* self);
bool LIB61850_INTERNAL bool
ControlObject_select(ControlObject* self, MmsServerConnection connection); ControlObject_select(ControlObject* self, MmsServerConnection connection);
bool LIB61850_INTERNAL bool
ControlObject_unselect(ControlObject* self, MmsServerConnection connection); ControlObject_unselect(ControlObject* self, MmsServerConnection connection);
void LIB61850_INTERNAL void
ControlObject_installListener(ControlObject* self, ControlHandler listener, void* parameter); ControlObject_installListener(ControlObject* self, ControlHandler listener, void* parameter);
void LIB61850_INTERNAL void
ControlObject_installCheckHandler(ControlObject* self, ControlPerformCheckHandler handler, void* parameter); ControlObject_installCheckHandler(ControlObject* self, ControlPerformCheckHandler handler, void* parameter);
void LIB61850_INTERNAL void
ControlObject_installWaitForExecutionHandler(ControlObject* self, ControlWaitForExecutionHandler handler, void* parameter); ControlObject_installWaitForExecutionHandler(ControlObject* self, ControlWaitForExecutionHandler handler, void* parameter);
#endif /* CONTROL_H_ */ #endif /* CONTROL_H_ */

@ -1,7 +1,7 @@
/* /*
* ied_connection_private.h * ied_connection_private.h
* *
* Copyright 2013 Michael Zillgith * Copyright 2013-2018 Michael Zillgith
* *
* This file is part of libIEC61850. * This file is part of libIEC61850.
* *
@ -81,52 +81,52 @@ struct sClientReportControlBlock {
MmsValue* owner; MmsValue* owner;
}; };
IedClientError LIB61850_INTERNAL IedClientError
private_IedConnection_mapMmsErrorToIedError(MmsError mmsError); private_IedConnection_mapMmsErrorToIedError(MmsError mmsError);
bool LIB61850_INTERNAL bool
private_IedConnection_doesControlObjectMatch(const char* objRef, const char* cntrlObj); private_IedConnection_doesControlObjectMatch(const char* objRef, const char* cntrlObj);
void LIB61850_INTERNAL void
private_IedConnection_addControlClient(IedConnection self, ControlObjectClient control); private_IedConnection_addControlClient(IedConnection self, ControlObjectClient control);
void LIB61850_INTERNAL void
private_IedConnection_removeControlClient(IedConnection self, ControlObjectClient control); private_IedConnection_removeControlClient(IedConnection self, ControlObjectClient control);
bool LIB61850_INTERNAL bool
private_ClientReportControlBlock_updateValues(ClientReportControlBlock self, MmsValue* values); private_ClientReportControlBlock_updateValues(ClientReportControlBlock self, MmsValue* values);
void LIB61850_INTERNAL void
private_IedConnection_handleReport(IedConnection self, MmsValue* value); private_IedConnection_handleReport(IedConnection self, MmsValue* value);
IedClientError LIB61850_INTERNAL IedClientError
iedConnection_mapMmsErrorToIedError(MmsError mmsError); iedConnection_mapMmsErrorToIedError(MmsError mmsError);
IedClientError LIB61850_INTERNAL IedClientError
iedConnection_mapDataAccessErrorToIedError(MmsDataAccessError mmsError); iedConnection_mapDataAccessErrorToIedError(MmsDataAccessError mmsError);
ClientReport LIB61850_INTERNAL ClientReport
ClientReport_create(void); ClientReport_create(void);
void LIB61850_INTERNAL void
ClientReport_destroy(ClientReport self); ClientReport_destroy(ClientReport self);
void LIB61850_INTERNAL void
private_ControlObjectClient_invokeCommandTerminationHandler(ControlObjectClient self); private_ControlObjectClient_invokeCommandTerminationHandler(ControlObjectClient self);
/* some declarations that are shared with server side ! */ /* some declarations that are shared with server side ! */
char* LIB61850_INTERNAL char*
MmsMapping_getMmsDomainFromObjectReference(const char* objectReference, char* buffer); MmsMapping_getMmsDomainFromObjectReference(const char* objectReference, char* buffer);
char* LIB61850_INTERNAL char*
MmsMapping_createMmsVariableNameFromObjectReference(const char* objectReference, FunctionalConstraint fc, char* buffer); MmsMapping_createMmsVariableNameFromObjectReference(const char* objectReference, FunctionalConstraint fc, char* buffer);
char* LIB61850_INTERNAL char*
MmsMapping_varAccessSpecToObjectReference(MmsVariableAccessSpecification* varAccessSpec); MmsMapping_varAccessSpecToObjectReference(MmsVariableAccessSpecification* varAccessSpec);
MmsVariableAccessSpecification* LIB61850_INTERNAL MmsVariableAccessSpecification*
MmsMapping_ObjectReferenceToVariableAccessSpec(char* objectReference); MmsMapping_ObjectReferenceToVariableAccessSpec(char* objectReference);
#endif /* IED_CONNECTION_PRIVATE_H_ */ #endif /* IED_CONNECTION_PRIVATE_H_ */

@ -61,31 +61,31 @@ struct sIedServer
}; };
ClientConnection LIB61850_INTERNAL ClientConnection
private_IedServer_getClientConnectionByHandle(IedServer self, void* serverConnectionHandle); private_IedServer_getClientConnectionByHandle(IedServer self, void* serverConnectionHandle);
ClientConnection LIB61850_INTERNAL ClientConnection
private_ClientConnection_create(void* serverConnectionHandle); private_ClientConnection_create(void* serverConnectionHandle);
void LIB61850_INTERNAL void
private_ClientConnection_destroy(ClientConnection self); private_ClientConnection_destroy(ClientConnection self);
int LIB61850_INTERNAL int
private_ClientConnection_getTasksCount(ClientConnection self); private_ClientConnection_getTasksCount(ClientConnection self);
void LIB61850_INTERNAL void
private_ClientConnection_increaseTasksCount(ClientConnection self); private_ClientConnection_increaseTasksCount(ClientConnection self);
void LIB61850_INTERNAL void
private_ClientConnection_decreaseTasksCount(ClientConnection self); private_ClientConnection_decreaseTasksCount(ClientConnection self);
void* LIB61850_INTERNAL void*
private_ClientConnection_getServerConnectionHandle(ClientConnection self); private_ClientConnection_getServerConnectionHandle(ClientConnection self);
void LIB61850_INTERNAL void
private_IedServer_addNewClientConnection(IedServer self, ClientConnection newClientConnection); private_IedServer_addNewClientConnection(IedServer self, ClientConnection newClientConnection);
void LIB61850_INTERNAL void
private_IedServer_removeClientConnection(IedServer self, ClientConnection clientConnection); private_IedServer_removeClientConnection(IedServer self, ClientConnection clientConnection);
#endif /* IED_SERVER_PRIVATE_H_ */ #endif /* IED_SERVER_PRIVATE_H_ */

@ -73,50 +73,50 @@ typedef struct {
} LogControl; } LogControl;
LogInstance* LIB61850_INTERNAL LogInstance*
LogInstance_create(LogicalNode* parentLN, const char* name); LogInstance_create(LogicalNode* parentLN, const char* name);
void LIB61850_INTERNAL void
LogInstance_setLogStorage(LogInstance* self, LogStorage logStorage); LogInstance_setLogStorage(LogInstance* self, LogStorage logStorage);
void LIB61850_INTERNAL void
LogInstance_logSingleData(LogInstance* self, const char* dataRef, MmsValue* value, uint8_t flag); LogInstance_logSingleData(LogInstance* self, const char* dataRef, MmsValue* value, uint8_t flag);
uint64_t LIB61850_INTERNAL uint64_t
LogInstance_logEntryStart(LogInstance* self); LogInstance_logEntryStart(LogInstance* self);
void LIB61850_INTERNAL void
LogInstance_logEntryData(LogInstance* self, uint64_t entryID, const char* dataRef, MmsValue* value, uint8_t flag); 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); LogInstance_logEntryFinished(LogInstance* self, uint64_t entryID);
void LIB61850_INTERNAL void
LogInstance_destroy(LogInstance* self); LogInstance_destroy(LogInstance* self);
LogControl* LIB61850_INTERNAL LogControl*
LogControl_create(LogicalNode* parentLN, MmsMapping* mmsMapping); LogControl_create(LogicalNode* parentLN, MmsMapping* mmsMapping);
void LIB61850_INTERNAL void
LogControl_setLog(LogControl* self, LogInstance* logInstance); LogControl_setLog(LogControl* self, LogInstance* logInstance);
void LIB61850_INTERNAL void
LogControl_destroy(LogControl* self); LogControl_destroy(LogControl* self);
void LIB61850_INTERNAL void
LogControl_setLogStorage(LogControl* self, LogStorage logStorage); LogControl_setLogStorage(LogControl* self, LogStorage logStorage);
MmsVariableSpecification* LIB61850_INTERNAL MmsVariableSpecification*
Logging_createLCBs(MmsMapping* self, MmsDomain* domain, LogicalNode* logicalNode, Logging_createLCBs(MmsMapping* self, MmsDomain* domain, LogicalNode* logicalNode,
int lcbCount); int lcbCount);
void LIB61850_INTERNAL void
Logging_processIntegrityLogs(MmsMapping* self, uint64_t currentTimeInMs); Logging_processIntegrityLogs(MmsMapping* self, uint64_t currentTimeInMs);
MmsValue* LIB61850_INTERNAL MmsValue*
LIBIEC61850_LOG_SVC_readAccessControlBlock(MmsMapping* self, MmsDomain* domain, char* variableIdOrig); LIBIEC61850_LOG_SVC_readAccessControlBlock(MmsMapping* self, MmsDomain* domain, char* variableIdOrig);
MmsDataAccessError LIB61850_INTERNAL MmsDataAccessError
LIBIEC61850_LOG_SVC_writeAccessLogControlBlock(MmsMapping* self, MmsDomain* domain, char* variableIdOrig, LIBIEC61850_LOG_SVC_writeAccessLogControlBlock(MmsMapping* self, MmsDomain* domain, char* variableIdOrig,
MmsValue* value, MmsServerConnection connection); MmsValue* value, MmsServerConnection connection);

@ -1,7 +1,7 @@
/* /*
* mms_goose.h * mms_goose.h
* *
* Copyright 2013 Michael Zillgith * Copyright 2013-2018 Michael Zillgith
* *
* This file is part of libIEC61850. * This file is part of libIEC61850.
* *
@ -26,49 +26,49 @@
typedef struct sMmsGooseControlBlock* MmsGooseControlBlock; typedef struct sMmsGooseControlBlock* MmsGooseControlBlock;
MmsGooseControlBlock LIB61850_INTERNAL MmsGooseControlBlock
MmsGooseControlBlock_create(void); MmsGooseControlBlock_create(void);
void LIB61850_INTERNAL void
MmsGooseControlBlock_destroy(MmsGooseControlBlock self); MmsGooseControlBlock_destroy(MmsGooseControlBlock self);
MmsDomain* LIB61850_INTERNAL MmsDomain*
MmsGooseControlBlock_getDomain(MmsGooseControlBlock self); MmsGooseControlBlock_getDomain(MmsGooseControlBlock self);
char* LIB61850_INTERNAL char*
MmsGooseControlBlock_getLogicalNodeName(MmsGooseControlBlock self); MmsGooseControlBlock_getLogicalNodeName(MmsGooseControlBlock self);
char* LIB61850_INTERNAL char*
MmsGooseControlBlock_getName(MmsGooseControlBlock self); MmsGooseControlBlock_getName(MmsGooseControlBlock self);
MmsValue* LIB61850_INTERNAL MmsValue*
MmsGooseControlBlock_getGCBValue(MmsGooseControlBlock self, char* elementName); MmsGooseControlBlock_getGCBValue(MmsGooseControlBlock self, char* elementName);
MmsValue* LIB61850_INTERNAL MmsValue*
MmsGooseControlBlock_getMmsValues(MmsGooseControlBlock self); MmsGooseControlBlock_getMmsValues(MmsGooseControlBlock self);
MmsVariableSpecification* LIB61850_INTERNAL MmsVariableSpecification*
MmsGooseControlBlock_getVariableSpecification(MmsGooseControlBlock self); MmsGooseControlBlock_getVariableSpecification(MmsGooseControlBlock self);
DataSet* LIB61850_INTERNAL DataSet*
MmsGooseControlBlock_getDataSet(MmsGooseControlBlock self); MmsGooseControlBlock_getDataSet(MmsGooseControlBlock self);
bool LIB61850_INTERNAL bool
MmsGooseControlBlock_isEnabled(MmsGooseControlBlock self); MmsGooseControlBlock_isEnabled(MmsGooseControlBlock self);
void LIB61850_INTERNAL void
MmsGooseControlBlock_checkAndPublish(MmsGooseControlBlock self, uint64_t currentTime); MmsGooseControlBlock_checkAndPublish(MmsGooseControlBlock self, uint64_t currentTime);
void LIB61850_INTERNAL void
MmsGooseControlBlock_observedObjectChanged(MmsGooseControlBlock self); MmsGooseControlBlock_observedObjectChanged(MmsGooseControlBlock self);
void LIB61850_INTERNAL void
MmsGooseControlBlock_enable(MmsGooseControlBlock self); MmsGooseControlBlock_enable(MmsGooseControlBlock self);
void LIB61850_INTERNAL void
MmsGooseControlBlock_disable(MmsGooseControlBlock self); MmsGooseControlBlock_disable(MmsGooseControlBlock self);
MmsVariableSpecification* LIB61850_INTERNAL MmsVariableSpecification*
GOOSE_createGOOSEControlBlocks(MmsMapping* self, MmsDomain* domain, GOOSE_createGOOSEControlBlocks(MmsMapping* self, MmsDomain* domain,
LogicalNode* logicalNode, int gseCount); LogicalNode* logicalNode, int gseCount);

@ -43,122 +43,122 @@ typedef enum {
typedef struct sMmsMapping MmsMapping; typedef struct sMmsMapping MmsMapping;
MmsMapping* LIB61850_INTERNAL MmsMapping*
MmsMapping_create(IedModel* model, IedServer iedServer); MmsMapping_create(IedModel* model, IedServer iedServer);
MmsDevice* LIB61850_INTERNAL MmsDevice*
MmsMapping_getMmsDeviceModel(MmsMapping* mapping); MmsMapping_getMmsDeviceModel(MmsMapping* mapping);
void LIB61850_INTERNAL void
MmsMapping_initializeControlObjects(MmsMapping* self); MmsMapping_initializeControlObjects(MmsMapping* self);
void LIB61850_INTERNAL void
MmsMapping_configureSettingGroups(MmsMapping* self); MmsMapping_configureSettingGroups(MmsMapping* self);
void LIB61850_INTERNAL void
MmsMapping_checkForSettingGroupReservationTimeouts(MmsMapping* self, uint64_t currentTime); MmsMapping_checkForSettingGroupReservationTimeouts(MmsMapping* self, uint64_t currentTime);
void LIB61850_INTERNAL void
MmsMapping_setSgChangedHandler(MmsMapping* self, SettingGroupControlBlock* sgcb, MmsMapping_setSgChangedHandler(MmsMapping* self, SettingGroupControlBlock* sgcb,
ActiveSettingGroupChangedHandler handler, void* parameter); ActiveSettingGroupChangedHandler handler, void* parameter);
void LIB61850_INTERNAL void
MmsMapping_setEditSgChangedHandler(MmsMapping* self, SettingGroupControlBlock* sgcb, MmsMapping_setEditSgChangedHandler(MmsMapping* self, SettingGroupControlBlock* sgcb,
EditSettingGroupChangedHandler handler, void* parameter); EditSettingGroupChangedHandler handler, void* parameter);
void LIB61850_INTERNAL void
MmsMapping_setConfirmEditSgHandler(MmsMapping* self, SettingGroupControlBlock* sgcb, MmsMapping_setConfirmEditSgHandler(MmsMapping* self, SettingGroupControlBlock* sgcb,
EditSettingGroupConfirmationHandler handler, void* parameter); EditSettingGroupConfirmationHandler handler, void* parameter);
void LIB61850_INTERNAL void
MmsMapping_changeActiveSettingGroup(MmsMapping* self, SettingGroupControlBlock* sgcb, uint8_t newActiveSg); MmsMapping_changeActiveSettingGroup(MmsMapping* self, SettingGroupControlBlock* sgcb, uint8_t newActiveSg);
void LIB61850_INTERNAL void
MmsMapping_setMmsServer(MmsMapping* self, MmsServer server); MmsMapping_setMmsServer(MmsMapping* self, MmsServer server);
void LIB61850_INTERNAL void
MmsMapping_installHandlers(MmsMapping* self); MmsMapping_installHandlers(MmsMapping* self);
void LIB61850_INTERNAL void
MmsMapping_destroy(MmsMapping* mapping); MmsMapping_destroy(MmsMapping* mapping);
void LIB61850_INTERNAL void
MmsMapping_startEventWorkerThread(MmsMapping* self); MmsMapping_startEventWorkerThread(MmsMapping* self);
void LIB61850_INTERNAL void
MmsMapping_stopEventWorkerThread(MmsMapping* self); MmsMapping_stopEventWorkerThread(MmsMapping* self);
DataSet* LIB61850_INTERNAL DataSet*
MmsMapping_createDataSetByNamedVariableList(MmsMapping* self, MmsNamedVariableList variableList); MmsMapping_createDataSetByNamedVariableList(MmsMapping* self, MmsNamedVariableList variableList);
void LIB61850_INTERNAL void
MmsMapping_triggerReportObservers(MmsMapping* self, MmsValue* value, int flag); MmsMapping_triggerReportObservers(MmsMapping* self, MmsValue* value, int flag);
void LIB61850_INTERNAL void
MmsMapping_triggerLogging(MmsMapping* self, MmsValue* value, LogInclusionFlag flag); MmsMapping_triggerLogging(MmsMapping* self, MmsValue* value, LogInclusionFlag flag);
void LIB61850_INTERNAL void
MmsMapping_triggerGooseObservers(MmsMapping* self, MmsValue* value); MmsMapping_triggerGooseObservers(MmsMapping* self, MmsValue* value);
void LIB61850_INTERNAL void
MmsMapping_enableGoosePublishing(MmsMapping* self); MmsMapping_enableGoosePublishing(MmsMapping* self);
void LIB61850_INTERNAL void
MmsMapping_disableGoosePublishing(MmsMapping* self); MmsMapping_disableGoosePublishing(MmsMapping* self);
char* LIB61850_INTERNAL char*
MmsMapping_getMmsDomainFromObjectReference(const char* objectReference, char* buffer); MmsMapping_getMmsDomainFromObjectReference(const char* objectReference, char* buffer);
void LIB61850_INTERNAL void
MmsMapping_addControlObject(MmsMapping* self, ControlObject* controlObject); MmsMapping_addControlObject(MmsMapping* self, ControlObject* controlObject);
char* LIB61850_INTERNAL char*
MmsMapping_createMmsVariableNameFromObjectReference(const char* objectReference, FunctionalConstraint fc, char* buffer); MmsMapping_createMmsVariableNameFromObjectReference(const char* objectReference, FunctionalConstraint fc, char* buffer);
char* LIB61850_INTERNAL char*
MmsMapping_getNextNameElement(char* name); MmsMapping_getNextNameElement(char* name);
void /* Create PHYCOMADDR ACSI type instance */ LIB61850_INTERNAL void /* Create PHYCOMADDR ACSI type instance */
MmsMapping_createPhyComAddrStructure(MmsVariableSpecification* namedVariable); MmsMapping_createPhyComAddrStructure(MmsVariableSpecification* namedVariable);
ControlObject* LIB61850_INTERNAL ControlObject*
MmsMapping_getControlObject(MmsMapping* self, MmsDomain* domain, char* lnName, char* coName); MmsMapping_getControlObject(MmsMapping* self, MmsDomain* domain, char* lnName, char* coName);
MmsNamedVariableList LIB61850_INTERNAL MmsNamedVariableList
MmsMapping_getDomainSpecificVariableList(MmsMapping* self, const char* variableListReference); MmsMapping_getDomainSpecificVariableList(MmsMapping* self, const char* variableListReference);
DataSet* LIB61850_INTERNAL DataSet*
MmsMapping_getDomainSpecificDataSet(MmsMapping* self, const char* dataSetName); MmsMapping_getDomainSpecificDataSet(MmsMapping* self, const char* dataSetName);
void LIB61850_INTERNAL void
MmsMapping_freeDynamicallyCreatedDataSet(DataSet* dataSet); MmsMapping_freeDynamicallyCreatedDataSet(DataSet* dataSet);
MmsVariableAccessSpecification* LIB61850_INTERNAL MmsVariableAccessSpecification*
MmsMapping_ObjectReferenceToVariableAccessSpec(char* objectReference); MmsMapping_ObjectReferenceToVariableAccessSpec(char* objectReference);
char* LIB61850_INTERNAL char*
MmsMapping_varAccessSpecToObjectReference(MmsVariableAccessSpecification* varAccessSpec); MmsMapping_varAccessSpecToObjectReference(MmsVariableAccessSpecification* varAccessSpec);
void LIB61850_INTERNAL void
MmsMapping_setConnectionIndicationHandler(MmsMapping* self, IedConnectionIndicationHandler handler, void* parameter); MmsMapping_setConnectionIndicationHandler(MmsMapping* self, IedConnectionIndicationHandler handler, void* parameter);
void LIB61850_INTERNAL void
MmsMapping_setLogStorage(MmsMapping* self, const char* logRef, LogStorage logStorage); MmsMapping_setLogStorage(MmsMapping* self, const char* logRef, LogStorage logStorage);
void LIB61850_INTERNAL void
MmsMapping_installWriteAccessHandler(MmsMapping* self, DataAttribute* dataAttribute, WriteAccessHandler handler, void* parameter); MmsMapping_installWriteAccessHandler(MmsMapping* self, DataAttribute* dataAttribute, WriteAccessHandler handler, void* parameter);
void LIB61850_INTERNAL void
MmsMapping_installReadAccessHandler(MmsMapping* self, ReadAccessHandler handler, void* paramter); MmsMapping_installReadAccessHandler(MmsMapping* self, ReadAccessHandler handler, void* paramter);
MmsDataAccessError LIB61850_INTERNAL MmsDataAccessError
Control_writeAccessControlObject(MmsMapping* self, MmsDomain* domain, char* variableIdOrig, Control_writeAccessControlObject(MmsMapping* self, MmsDomain* domain, char* variableIdOrig,
MmsValue* value, MmsServerConnection connection); MmsValue* value, MmsServerConnection connection);
ControlObject* LIB61850_INTERNAL ControlObject*
Control_lookupControlObject(MmsMapping* self, MmsDomain* domain, char* lnName, char* objectName); Control_lookupControlObject(MmsMapping* self, MmsDomain* domain, char* lnName, char* objectName);
void LIB61850_INTERNAL void
Control_processControlActions(MmsMapping* self, uint64_t currentTimeInMs); Control_processControlActions(MmsMapping* self, uint64_t currentTimeInMs);
#endif /* MMS_MAPPING_H_ */ #endif /* MMS_MAPPING_H_ */

@ -27,24 +27,24 @@
typedef struct sMmsSampledValueControlBlock* MmsSampledValueControlBlock; typedef struct sMmsSampledValueControlBlock* MmsSampledValueControlBlock;
MmsSampledValueControlBlock LIB61850_INTERNAL MmsSampledValueControlBlock
MmsSampledValueControlBlock_create(void); MmsSampledValueControlBlock_create(void);
void LIB61850_INTERNAL void
MmsSampledValueControlBlock_destroy(MmsSampledValueControlBlock self); MmsSampledValueControlBlock_destroy(MmsSampledValueControlBlock self);
MmsVariableSpecification* LIB61850_INTERNAL MmsVariableSpecification*
LIBIEC61850_SV_createSVControlBlocks(MmsMapping* self, MmsDomain* domain, LIBIEC61850_SV_createSVControlBlocks(MmsMapping* self, MmsDomain* domain,
LogicalNode* logicalNode, int svCount, bool unicast); LogicalNode* logicalNode, int svCount, bool unicast);
MmsValue* LIB61850_INTERNAL MmsValue*
LIBIEC61850_SV_readAccessSampledValueControlBlock(MmsMapping* self, MmsDomain* domain, char* variableIdOrig); LIBIEC61850_SV_readAccessSampledValueControlBlock(MmsMapping* self, MmsDomain* domain, char* variableIdOrig);
MmsDataAccessError LIB61850_INTERNAL MmsDataAccessError
LIBIEC61850_SV_writeAccessSVControlBlock(MmsMapping* self, MmsDomain* domain, char* variableIdOrig, LIBIEC61850_SV_writeAccessSVControlBlock(MmsMapping* self, MmsDomain* domain, char* variableIdOrig,
MmsValue* value, MmsServerConnection connection); MmsValue* value, MmsServerConnection connection);
void LIB61850_INTERNAL void
LIBIEC61850_SV_setSVCBHandler(MmsMapping* self, SVControlBlock* svcb, SVCBEventHandler handler, void* parameter); LIBIEC61850_SV_setSVCBHandler(MmsMapping* self, SVControlBlock* svcb, SVCBEventHandler handler, void* parameter);
#endif /* LIBIEC61850_SRC_IEC61850_INC_PRIVATE_MMS_SV_H_ */ #endif /* LIBIEC61850_SRC_IEC61850_INC_PRIVATE_MMS_SV_H_ */

@ -98,42 +98,42 @@ typedef struct {
IedServer server; IedServer server;
} ReportControl; } ReportControl;
ReportControl* LIB61850_INTERNAL ReportControl*
ReportControl_create(bool buffered, LogicalNode* parentLN, int reportBufferSize, IedServer server); ReportControl_create(bool buffered, LogicalNode* parentLN, int reportBufferSize, IedServer server);
void LIB61850_INTERNAL void
ReportControl_destroy(ReportControl* self); ReportControl_destroy(ReportControl* self);
void LIB61850_INTERNAL void
ReportControl_valueUpdated(ReportControl* self, int dataSetEntryIndex, int flag, bool modelLocked); ReportControl_valueUpdated(ReportControl* self, int dataSetEntryIndex, int flag, bool modelLocked);
MmsValue* LIB61850_INTERNAL MmsValue*
ReportControl_getRCBValue(ReportControl* rc, char* elementName); ReportControl_getRCBValue(ReportControl* rc, char* elementName);
MmsVariableSpecification* LIB61850_INTERNAL MmsVariableSpecification*
Reporting_createMmsBufferedRCBs(MmsMapping* self, MmsDomain* domain, Reporting_createMmsBufferedRCBs(MmsMapping* self, MmsDomain* domain,
LogicalNode* logicalNode, int reportsCount); LogicalNode* logicalNode, int reportsCount);
MmsVariableSpecification* LIB61850_INTERNAL MmsVariableSpecification*
Reporting_createMmsUnbufferedRCBs(MmsMapping* self, MmsDomain* domain, Reporting_createMmsUnbufferedRCBs(MmsMapping* self, MmsDomain* domain,
LogicalNode* logicalNode, int reportsCount); LogicalNode* logicalNode, int reportsCount);
MmsDataAccessError LIB61850_INTERNAL MmsDataAccessError
Reporting_RCBWriteAccessHandler(MmsMapping* self, ReportControl* rc, char* elementName, MmsValue* value, Reporting_RCBWriteAccessHandler(MmsMapping* self, ReportControl* rc, char* elementName, MmsValue* value,
MmsServerConnection connection); MmsServerConnection connection);
void LIB61850_INTERNAL void
Reporting_activateBufferedReports(MmsMapping* self); Reporting_activateBufferedReports(MmsMapping* self);
/* periodic check if reports have to be sent */ /* periodic check if reports have to be sent */
void LIB61850_INTERNAL void
Reporting_processReportEvents(MmsMapping* self, uint64_t currentTimeInMs); Reporting_processReportEvents(MmsMapping* self, uint64_t currentTimeInMs);
/* check if report have to be sent after data model update */ /* check if report have to be sent after data model update */
void LIB61850_INTERNAL void
Reporting_processReportEventsAfterUnlock(MmsMapping* self); Reporting_processReportEventsAfterUnlock(MmsMapping* self);
void LIB61850_INTERNAL void
Reporting_deactivateReportsForConnection(MmsMapping* self, MmsServerConnection connection); Reporting_deactivateReportsForConnection(MmsMapping* self, MmsServerConnection connection);
#endif /* REPORTING_H_ */ #endif /* REPORTING_H_ */

@ -28,8 +28,7 @@
extern "C" { extern "C" {
#endif #endif
#include <stdint.h> #include "libiec61850_common_api.h"
#include <stdbool.h>
/** \addtogroup server_api_group /** \addtogroup server_api_group
@ -105,7 +104,7 @@ struct sLogStorage {
* \param self the pointer of the LogStorage instance * \param self the pointer of the LogStorage instance
* \param maxEntries the maximum number of log entries * \param maxEntries the maximum number of log entries
*/ */
void LIB61850_API void
LogStorage_setMaxLogEntries(LogStorage self, int maxEntries); LogStorage_setMaxLogEntries(LogStorage self, int maxEntries);
/** /**
@ -116,7 +115,7 @@ LogStorage_setMaxLogEntries(LogStorage self, int maxEntries);
* *
* \return the entryID of the new entry * \return the entryID of the new entry
*/ */
uint64_t LIB61850_API uint64_t
LogStorage_addEntry(LogStorage self, uint64_t timestamp); 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 * \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); 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 * \return true if the request has been successful, false otherwise
*/ */
bool LIB61850_API bool
LogStorage_getEntries(LogStorage self, uint64_t startingTime, uint64_t endingTime, LogStorage_getEntries(LogStorage self, uint64_t startingTime, uint64_t endingTime,
LogEntryCallback entryCallback, LogEntryDataCallback entryDataCallback, void* parameter); 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 * \return true if the request has been successful, false otherwise
*/ */
bool LIB61850_API bool
LogStorage_getEntriesAfter(LogStorage self, uint64_t startingTime, uint64_t entryID, LogStorage_getEntriesAfter(LogStorage self, uint64_t startingTime, uint64_t entryID,
LogEntryCallback entryCallback, LogEntryDataCallback entryDataCallback, void* parameter); 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 * \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, LogStorage_getOldestAndNewestEntries(LogStorage self, uint64_t* newEntry, uint64_t* newEntryTime,
uint64_t* oldEntry, uint64_t* oldEntryTime); 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 * \param self the pointer of the LogStorage instance
*/ */
void LIB61850_API void
LogStorage_destroy(LogStorage self); LogStorage_destroy(LogStorage self);
/**@}*/ /**@}*/

@ -78,16 +78,16 @@ struct sAcseAuthenticationParameter
} value; } value;
}; };
AcseAuthenticationParameter LIB61850_API AcseAuthenticationParameter
AcseAuthenticationParameter_create(void); AcseAuthenticationParameter_create(void);
void LIB61850_API void
AcseAuthenticationParameter_destroy(AcseAuthenticationParameter self); AcseAuthenticationParameter_destroy(AcseAuthenticationParameter self);
void LIB61850_API void
AcseAuthenticationParameter_setAuthMechanism(AcseAuthenticationParameter self, AcseAuthenticationMechanism mechanism); AcseAuthenticationParameter_setAuthMechanism(AcseAuthenticationParameter self, AcseAuthenticationMechanism mechanism);
void LIB61850_API void
AcseAuthenticationParameter_setPassword(AcseAuthenticationParameter self, char* password); AcseAuthenticationParameter_setPassword(AcseAuthenticationParameter self, char* password);
@ -156,7 +156,7 @@ typedef struct sIsoConnectionParameters* IsoConnectionParameters;
* *
* \return new IsoConnectionParameters * \return new IsoConnectionParameters
*/ */
IsoConnectionParameters LIB61850_API IsoConnectionParameters
IsoConnectionParameters_create(void); IsoConnectionParameters_create(void);
/** /**
@ -167,11 +167,11 @@ IsoConnectionParameters_create(void);
* *
* \param self the IsoConnectionParameters instance * \param self the IsoConnectionParameters instance
*/ */
void LIB61850_API void
IsoConnectionParameters_destroy(IsoConnectionParameters self); IsoConnectionParameters_destroy(IsoConnectionParameters self);
void LIB61850_API void
IsoConnectionParameters_setTlsConfiguration(IsoConnectionParameters self, TLSConfiguration tlsConfig); IsoConnectionParameters_setTlsConfiguration(IsoConnectionParameters self, TLSConfiguration tlsConfig);
/** /**
@ -182,7 +182,7 @@ IsoConnectionParameters_setTlsConfiguration(IsoConnectionParameters self, TLSCon
* \param self the IsoConnectionParameters instance * \param self the IsoConnectionParameters instance
* \param acseAuthParameter * \param acseAuthParameter
*/ */
void LIB61850_API void
IsoConnectionParameters_setAcseAuthenticationParameter(IsoConnectionParameters self, IsoConnectionParameters_setAcseAuthenticationParameter(IsoConnectionParameters self,
AcseAuthenticationParameter acseAuthParameter); AcseAuthenticationParameter acseAuthParameter);
@ -196,7 +196,7 @@ IsoConnectionParameters_setAcseAuthenticationParameter(IsoConnectionParameters s
* \param hostname the hostname of IP address if the server * \param hostname the hostname of IP address if the server
* \param tcpPort the TCP port number of the server * \param tcpPort the TCP port number of the server
*/ */
void LIB61850_API void
IsoConnectionParameters_setTcpParameters(IsoConnectionParameters self, const char* hostname, int tcpPort); 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 apTitle the AP-Title OID as string.
* \param aeQualifier the AP-qualifier * \param aeQualifier the AP-qualifier
*/ */
void LIB61850_API void
IsoConnectionParameters_setRemoteApTitle(IsoConnectionParameters self, const char* apTitle, int aeQualifier); 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 sSelector the S-Selector (session layer address)
* \param tSelector the T-Selector (ISO transport 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); 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 apTitle the AP-Title OID as string.
* \param aeQualifier the AP-qualifier * \param aeQualifier the AP-qualifier
*/ */
void LIB61850_API void
IsoConnectionParameters_setLocalApTitle(IsoConnectionParameters self, const char* apTitle, int aeQualifier); 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 sSelector the S-Selector (session layer address)
* \param tSelector the T-Selector (ISO transport 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); IsoConnectionParameters_setLocalAddresses(IsoConnectionParameters self, uint32_t pSelector, SSelector sSelector, TSelector tSelector);
/**@}*/ /**@}*/

@ -84,7 +84,7 @@ typedef struct sMmsConnection* MmsConnection;
* *
* \return the newly created instance. * \return the newly created instance.
*/ */
MmsConnection LIB61850_API MmsConnection
MmsConnection_create(void); MmsConnection_create(void);
/** /**
@ -94,7 +94,7 @@ MmsConnection_create(void);
* *
* \return the newly created instance. * \return the newly created instance.
*/ */
MmsConnection LIB61850_API MmsConnection
MmsConnection_createSecure(TLSConfiguration tlsConfig); MmsConnection_createSecure(TLSConfiguration tlsConfig);
/** /**
@ -108,7 +108,7 @@ MmsConnection_createSecure(TLSConfiguration tlsConfig);
* *
* \return the newly created instance. * \return the newly created instance.
*/ */
MmsConnection LIB61850_API MmsConnection
MmsConnection_createNonThreaded(TLSConfiguration tlsConfig); 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 handler the connection specific callback function
* \param a user provided parameter passed to the callback function (use NULL if not required). * \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); MmsConnection_setRawMessageHandler(MmsConnection self, MmsRawMessageHandler handler, void* parameter);
/** /**
@ -148,7 +148,7 @@ MmsConnection_setRawMessageHandler(MmsConnection self, MmsRawMessageHandler hand
* \param self the MmsServer instance * \param self the MmsServer instance
* \param basepath the new virtual filestore basepath * \param basepath the new virtual filestore basepath
*/ */
void LIB61850_API void
MmsConnection_setFilestoreBasepath(MmsConnection self, const char* basepath); 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 self MmsConnection instance to operate on
* \param timeoutInMs request timeout in milliseconds * \param timeoutInMs request timeout in milliseconds
*/ */
void LIB61850_API void
MmsConnection_setRequestTimeout(MmsConnection self, uint32_t timeoutInMs); 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 self MmsConnection instance to operate on
* \param timeoutInMs connect timeout in milliseconds * \param timeoutInMs connect timeout in milliseconds
*/ */
void LIB61850_API void
MmsConnection_setConnectTimeout(MmsConnection self, uint32_t timeoutInMs); 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 * \param parameter a user specified parameter that will be passed to the handler function on each
* invocation. * invocation.
*/ */
void LIB61850_API void
MmsConnection_setInformationReportHandler(MmsConnection self, MmsInformationReportHandler handler, MmsConnection_setInformationReportHandler(MmsConnection self, MmsInformationReportHandler handler,
void* parameter); void* parameter);
@ -190,7 +190,7 @@ MmsConnection_setInformationReportHandler(MmsConnection self, MmsInformationRepo
* \param self MmsConnection instance to operate on * \param self MmsConnection instance to operate on
* \return params the to be used by this connection * \return params the to be used by this connection
*/ */
IsoConnectionParameters LIB61850_API IsoConnectionParameters
MmsConnection_getIsoConnectionParameters(MmsConnection self); MmsConnection_getIsoConnectionParameters(MmsConnection self);
/** /**
@ -199,12 +199,12 @@ MmsConnection_getIsoConnectionParameters(MmsConnection self);
* \param self MmsConnection instance to operate on * \param self MmsConnection instance to operate on
* \return params the to be used by this connection * \return params the to be used by this connection
*/ */
MmsConnectionParameters LIB61850_API MmsConnectionParameters
MmsConnection_getMmsConnectionParameters(MmsConnection self); MmsConnection_getMmsConnectionParameters(MmsConnection self);
typedef void (*MmsConnectionStateChangedHandler) (MmsConnection connection, void* parameter, MmsConnectionState newState); typedef void (*MmsConnectionStateChangedHandler) (MmsConnection connection, void* parameter, MmsConnectionState newState);
void LIB61850_API void
MmsConnection_setConnectionStateChangedHandler(MmsConnection self, MmsConnectionStateChangedHandler handler, void* parameter); 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 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. * \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); 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 self MmsConnection instance to operate on
* \param params the ISO client parameters to use * \param params the ISO client parameters to use
*/ */
void LIB61850_API void
MmsConnection_setIsoConnectionParameters(MmsConnection self, IsoConnectionParameters* params); MmsConnection_setIsoConnectionParameters(MmsConnection self, IsoConnectionParameters* params);
/** /**
@ -238,7 +238,7 @@ MmsConnection_setIsoConnectionParameters(MmsConnection self, IsoConnectionParame
* *
* \param self MmsConnection instance to operate on * \param self MmsConnection instance to operate on
*/ */
void LIB61850_API void
MmsConnection_destroy(MmsConnection self); MmsConnection_destroy(MmsConnection self);
/******************************************************************************* /*******************************************************************************
@ -258,10 +258,10 @@ MmsConnection_destroy(MmsConnection self);
* *
* \return true on success. false if the connection attempt failed. * \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); 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); 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 * \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. * connection is busy and the tick function should be called again as soon as possible.
*/ */
bool LIB61850_API bool
MmsConnection_tick(MmsConnection self); MmsConnection_tick(MmsConnection self);
/** /**
@ -286,7 +286,7 @@ MmsConnection_tick(MmsConnection self);
* *
* \param self MmsConnection instance to operate on * \param self MmsConnection instance to operate on
*/ */
void LIB61850_API void
MmsConnection_close(MmsConnection self); MmsConnection_close(MmsConnection self);
typedef void typedef void
@ -303,10 +303,10 @@ typedef void
* \param self MmsConnection instance to operate on * \param self MmsConnection instance to operate on
* \param mmsError user provided variable to store error code * \param mmsError user provided variable to store error code
*/ */
void LIB61850_API void
MmsConnection_abort(MmsConnection self, MmsError* mmsError); MmsConnection_abort(MmsConnection self, MmsError* mmsError);
void LIB61850_API void
MmsConnection_abortAsync(MmsConnection self, MmsError* mmsError); MmsConnection_abortAsync(MmsConnection self, MmsError* mmsError);
/** /**
@ -320,10 +320,10 @@ MmsConnection_abortAsync(MmsConnection self, MmsError* mmsError);
* \param self MmsConnection instance to operate on * \param self MmsConnection instance to operate on
* \param mmsError user provided variable to store error code * \param mmsError user provided variable to store error code
*/ */
void LIB61850_API void
MmsConnection_conclude(MmsConnection self, MmsError* mmsError); MmsConnection_conclude(MmsConnection self, MmsError* mmsError);
void LIB61850_API void
MmsConnection_concludeAsync(MmsConnection self, MmsError* mmsError, MmsConnection_ConcludeAbortHandler handler, void* parameter); MmsConnection_concludeAsync(MmsConnection self, MmsError* mmsError, MmsConnection_ConcludeAbortHandler handler, void* parameter);
typedef void typedef void
@ -342,10 +342,10 @@ typedef void
* *
* \return the of VMD specific variable names or NULL if the request failed. * \return the of VMD specific variable names or NULL if the request failed.
*/ */
LinkedList /* <char*> */ LIB61850_API LinkedList /* <char*> */
MmsConnection_getVMDVariableNames(MmsConnection self, MmsError* mmsError); MmsConnection_getVMDVariableNames(MmsConnection self, MmsError* mmsError);
uint32_t LIB61850_API uint32_t
MmsConnection_getVMDVariableNamesAsync(MmsConnection self, MmsError* mmsError, const char* continueAfter, MmsConnection_getVMDVariableNamesAsync(MmsConnection self, MmsError* mmsError, const char* continueAfter,
MmsConnection_GetNameListHandler handler, void* parameter); 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. * \return the list of domain names or NULL if the request failed.
* *
*/ */
LinkedList /* <char*> */ LIB61850_API LinkedList /* <char*> */
MmsConnection_getDomainNames(MmsConnection self, MmsError* mmsError); MmsConnection_getDomainNames(MmsConnection self, MmsError* mmsError);
uint32_t LIB61850_API uint32_t
MmsConnection_getDomainNamesAsync(MmsConnection self, MmsError* mmsError, const char* continueAfter, MmsConnection_getDomainNamesAsync(MmsConnection self, MmsError* mmsError, const char* continueAfter,
MmsConnection_GetNameListHandler handler, void* parameter); 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. * \return the of domain specific variable names or NULL if the request failed.
*/ */
LinkedList /* <char*> */ LIB61850_API LinkedList /* <char*> */
MmsConnection_getDomainVariableNames(MmsConnection self, MmsError* mmsError, const char* domainId); MmsConnection_getDomainVariableNames(MmsConnection self, MmsError* mmsError, const char* domainId);
uint32_t LIB61850_API uint32_t
MmsConnection_getDomainVariableNamesAsync(MmsConnection self, MmsError* mmsError, const char* domainId, MmsConnection_getDomainVariableNamesAsync(MmsConnection self, MmsError* mmsError, const char* domainId,
const char* continueAfter, MmsConnection_GetNameListHandler handler, void* parameter); 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. * \return the domain specific named variable list names or NULL if the request failed.
*/ */
LinkedList /* <char*> */ LIB61850_API LinkedList /* <char*> */
MmsConnection_getDomainVariableListNames(MmsConnection self, MmsError* mmsError, const char* domainId); MmsConnection_getDomainVariableListNames(MmsConnection self, MmsError* mmsError, const char* domainId);
uint32_t LIB61850_API uint32_t
MmsConnection_getDomainVariableListNamesAsync(MmsConnection self, MmsError* mmsError, const char* domainId, MmsConnection_getDomainVariableListNamesAsync(MmsConnection self, MmsError* mmsError, const char* domainId,
const char* continueAfter, MmsConnection_GetNameListHandler handler, void* parameter); 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. * \return the domain specific journal names or NULL if the request failed.
*/ */
LinkedList /* <char*> */ LIB61850_API LinkedList /* <char*> */
MmsConnection_getDomainJournals(MmsConnection self, MmsError* mmsError, const char* domainId); MmsConnection_getDomainJournals(MmsConnection self, MmsError* mmsError, const char* domainId);
uint32_t LIB61850_API uint32_t
MmsConnection_getDomainJournalsAsync(MmsConnection self, MmsError* mmsError, const char* domainId, MmsConnection_getDomainJournalsAsync(MmsConnection self, MmsError* mmsError, const char* domainId,
const char* continueAfter, MmsConnection_GetNameListHandler handler, void* parameter); 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. * \return the association specific named variable list names or NULL if the request failed.
*/ */
LinkedList /* <char*> */ LIB61850_API LinkedList /* <char*> */
MmsConnection_getVariableListNamesAssociationSpecific(MmsConnection self, MmsError* mmsError); MmsConnection_getVariableListNamesAssociationSpecific(MmsConnection self, MmsError* mmsError);
uint32_t LIB61850_API uint32_t
MmsConnection_getVariableListNamesAssociationSpecificAsync(MmsConnection self, MmsError* mmsError, MmsConnection_getVariableListNamesAssociationSpecificAsync(MmsConnection self, MmsError* mmsError,
const char* continueAfter, MmsConnection_GetNameListHandler handler, void* parameter); 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 * 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. * 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); 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 * \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_readVariableAsync(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId,
MmsConnection_ReadVariableHandler handler, void* parameter); 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 * a simple or complex type if numberOfElements is 0, or an array containing the selected
* array elements of numberOfElements > 0. * array elements of numberOfElements > 0.
*/ */
MmsValue* LIB61850_API MmsValue*
MmsConnection_readArrayElements(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId, MmsConnection_readArrayElements(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId,
uint32_t startIndex, uint32_t numberOfElements); 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 * \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, MmsConnection_readArrayElementsAsync(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId,
uint32_t startIndex, uint32_t numberOfElements, uint32_t startIndex, uint32_t numberOfElements,
MmsConnection_ReadVariableHandler handler, void* parameter); 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. * \return Returns a MmsValue object or NULL if the request failed.
*/ */
MmsValue* LIB61850_API MmsValue*
MmsConnection_readSingleArrayElementWithComponent(MmsConnection self, MmsError* mmsError, MmsConnection_readSingleArrayElementWithComponent(MmsConnection self, MmsError* mmsError,
const char* domainId, const char* itemId, uint32_t index, const char* componentId); const char* domainId, const char* itemId, uint32_t index, const char* componentId);
uint32_t LIB61850_API uint32_t
MmsConnection_readSingleArrayElementWithComponentAsync(MmsConnection self, MmsError* mmsError, MmsConnection_readSingleArrayElementWithComponentAsync(MmsConnection self, MmsError* mmsError,
const char* domainId, const char* itemId, const char* domainId, const char* itemId,
uint32_t index, const char* componentId, 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 * 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. * in the order as they appeared in the item ID list.
*/ */
MmsValue* LIB61850_API MmsValue*
MmsConnection_readMultipleVariables(MmsConnection self, MmsError* mmsError, const char* domainId, MmsConnection_readMultipleVariables(MmsConnection self, MmsError* mmsError, const char* domainId,
LinkedList /*<char*>*/ items); LinkedList /*<char*>*/ items);
uint32_t LIB61850_API uint32_t
MmsConnection_readMultipleVariablesAsync(MmsConnection self, MmsError* mmsError, MmsConnection_readMultipleVariablesAsync(MmsConnection self, MmsError* mmsError,
const char* domainId, LinkedList /*<char*>*/items, const char* domainId, LinkedList /*<char*>*/items,
MmsConnection_ReadVariableHandler handler, void* parameter); 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 * \return when successful, the data access error value returned by the server
*/ */
MmsDataAccessError LIB61850_API MmsDataAccessError
MmsConnection_writeVariable(MmsConnection self, MmsError* mmsError, MmsConnection_writeVariable(MmsConnection self, MmsError* mmsError,
const char* domainId, const char* itemId, MmsValue* value); const char* domainId, const char* itemId, MmsValue* value);
typedef void typedef void
(*MmsConnection_WriteVariableHandler) (int invokeId, void* parameter, MmsError mmsError, MmsDataAccessError accessError); (*MmsConnection_WriteVariableHandler) (int invokeId, void* parameter, MmsError mmsError, MmsDataAccessError accessError);
uint32_t LIB61850_API uint32_t
MmsConnection_writeVariableAsync(MmsConnection self, MmsError* mmsError, MmsConnection_writeVariableAsync(MmsConnection self, MmsError* mmsError,
const char* domainId, const char* itemId, MmsValue* value, const char* domainId, const char* itemId, MmsValue* value,
MmsConnection_WriteVariableHandler handler, void* parameter); 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 * \return when successful, the data access error value returned by the server
*/ */
MmsDataAccessError LIB61850_API MmsDataAccessError
MmsConnection_writeSingleArrayElementWithComponent(MmsConnection self, MmsError* mmsError, MmsConnection_writeSingleArrayElementWithComponent(MmsConnection self, MmsError* mmsError,
const char* domainId, const char* itemId, const char* domainId, const char* itemId,
uint32_t arrayIndex, const char* componentId, MmsValue* value); uint32_t arrayIndex, const char* componentId, MmsValue* value);
uint32_t LIB61850_API uint32_t
MmsConnection_writeSingleArrayElementWithComponentAsync(MmsConnection self, MmsError* mmsError, MmsConnection_writeSingleArrayElementWithComponentAsync(MmsConnection self, MmsError* mmsError,
const char* domainId, const char* itemId, const char* domainId, const char* itemId,
uint32_t arrayIndex, const char* componentId, MmsValue* value, 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 * \return when successful, the data access error value returned by the server
*/ */
MmsDataAccessError LIB61850_API MmsDataAccessError
MmsConnection_writeArrayElements(MmsConnection self, MmsError* mmsError, MmsConnection_writeArrayElements(MmsConnection self, MmsError* mmsError,
const char* domainId, const char* itemId, int index, int numberOfElements, const char* domainId, const char* itemId, int index, int numberOfElements,
MmsValue* value); MmsValue* value);
uint32_t LIB61850_API uint32_t
MmsConnection_writeArrayElementsAsync(MmsConnection self, MmsError* mmsError, MmsConnection_writeArrayElementsAsync(MmsConnection self, MmsError* mmsError,
const char* domainId, const char* itemId, int index, int numberOfElements, const char* domainId, const char* itemId, int index, int numberOfElements,
MmsValue* value, 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 * \param[out] the MmsValue objects of type MMS_DATA_ACCESS_ERROR representing the write success of a single variable
* write. * write.
*/ */
void LIB61850_API void
MmsConnection_writeMultipleVariables(MmsConnection self, MmsError* mmsError, const char* domainId, MmsConnection_writeMultipleVariables(MmsConnection self, MmsError* mmsError, const char* domainId,
LinkedList /*<char*>*/ items, LinkedList /* <MmsValue*> */ values, LinkedList /*<char*>*/ items, LinkedList /* <MmsValue*> */ values,
LinkedList* /* <MmsValue*> */ accessResults); LinkedList* /* <MmsValue*> */ accessResults);
uint32_t LIB61850_API uint32_t
MmsConnection_writeMultipleVariablesAsync(MmsConnection self, MmsError* mmsError, const char* domainId, MmsConnection_writeMultipleVariablesAsync(MmsConnection self, MmsError* mmsError, const char* domainId,
LinkedList /*<char*>*/ items, LinkedList /* <MmsValue*> */ values, LinkedList /*<char*>*/ items, LinkedList /* <MmsValue*> */ values,
MmsConnection_WriteMultipleVariablesHandler handler, void* parameter); 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 * \param[out] the MmsValue objects of type MMS_DATA_ACCESS_ERROR representing the write success of a single variable
* write. * write.
*/ */
void LIB61850_API void
MmsConnection_writeNamedVariableList(MmsConnection self, MmsError* mmsError, bool isAssociationSpecific, MmsConnection_writeNamedVariableList(MmsConnection self, MmsError* mmsError, bool isAssociationSpecific,
const char* domainId, const char* itemId, LinkedList /* <MmsValue*> */values, const char* domainId, const char* itemId, LinkedList /* <MmsValue*> */values,
LinkedList* /* <MmsValue*> */accessResults); LinkedList* /* <MmsValue*> */accessResults);
uint32_t LIB61850_API uint32_t
MmsConnection_writeNamedVariableListAsync(MmsConnection self, MmsError* mmsError, bool isAssociationSpecific, MmsConnection_writeNamedVariableListAsync(MmsConnection self, MmsError* mmsError, bool isAssociationSpecific,
const char* domainId, const char* itemId, LinkedList /* <MmsValue*> */values, const char* domainId, const char* itemId, LinkedList /* <MmsValue*> */values,
MmsConnection_WriteMultipleVariablesHandler handler, void* parameter); 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. * \return Returns a MmsTypeSpecification object or NULL if the request failed.
*/ */
MmsVariableSpecification* LIB61850_API MmsVariableSpecification*
MmsConnection_getVariableAccessAttributes(MmsConnection self, MmsError* mmsError, MmsConnection_getVariableAccessAttributes(MmsConnection self, MmsError* mmsError,
const char* domainId, const char* itemId); const char* domainId, const char* itemId);
@ -710,7 +710,7 @@ typedef void
(*MmsConnection_GetVariableAccessAttributesHandler) (int invokeId, void* parameter, MmsError mmsError, MmsVariableSpecification* spec); (*MmsConnection_GetVariableAccessAttributesHandler) (int invokeId, void* parameter, MmsError mmsError, MmsVariableSpecification* spec);
uint32_t LIB61850_API uint32_t
MmsConnection_getVariableAccessAttributesAsync(MmsConnection self, MmsError* mmsError, MmsConnection_getVariableAccessAttributesAsync(MmsConnection self, MmsError* mmsError,
const char* domainId, const char* itemId, const char* domainId, const char* itemId,
MmsConnection_GetVariableAccessAttributesHandler, void* parameter); 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 * 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. * in the order as they appeared in named variable list definition.
*/ */
MmsValue* LIB61850_API MmsValue*
MmsConnection_readNamedVariableListValues(MmsConnection self, MmsError* mmsError, const char* domainId, MmsConnection_readNamedVariableListValues(MmsConnection self, MmsError* mmsError, const char* domainId,
const char* listName, bool specWithResult); const char* listName, bool specWithResult);
uint32_t LIB61850_API uint32_t
MmsConnection_readNamedVariableListValuesAsync(MmsConnection self, MmsError* mmsError, MmsConnection_readNamedVariableListValuesAsync(MmsConnection self, MmsError* mmsError,
const char* domainId, const char* listName, bool specWithResult, const char* domainId, const char* listName, bool specWithResult,
MmsConnection_ReadVariableHandler handler, void* parameter); 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 * 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. * in the order as they appeared in named variable list definition.
*/ */
MmsValue* LIB61850_API MmsValue*
MmsConnection_readNamedVariableListValuesAssociationSpecific(MmsConnection self, MmsError* mmsError, MmsConnection_readNamedVariableListValuesAssociationSpecific(MmsConnection self, MmsError* mmsError,
const char* listName, bool specWithResult); const char* listName, bool specWithResult);
uint32_t LIB61850_API uint32_t
MmsConnection_readNamedVariableListValuesAssociationSpecificAsync(MmsConnection self, MmsError* mmsError, MmsConnection_readNamedVariableListValuesAssociationSpecificAsync(MmsConnection self, MmsError* mmsError,
const char* listName, bool specWithResult, const char* listName, bool specWithResult,
MmsConnection_ReadVariableHandler handler, void* parameter); 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 * \param variableSpecs a list of variable specifications for the new variable list. The list
* elements have to be of type MmsVariableAccessSpecification*. * elements have to be of type MmsVariableAccessSpecification*.
*/ */
void LIB61850_API void
MmsConnection_defineNamedVariableList(MmsConnection self, MmsError* mmsError, const char* domainId, MmsConnection_defineNamedVariableList(MmsConnection self, MmsError* mmsError, const char* domainId,
const char* listName, LinkedList variableSpecs); const char* listName, LinkedList variableSpecs);
uint32_t LIB61850_API uint32_t
MmsConnection_defineNamedVariableListAsync(MmsConnection self, MmsError* mmsError, const char* domainId, MmsConnection_defineNamedVariableListAsync(MmsConnection self, MmsError* mmsError, const char* domainId,
const char* listName, LinkedList variableSpecs, const char* listName, LinkedList variableSpecs,
MmsConnection_GenericServiceHandler handler, void* parameter); 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 * \param variableSpecs list of variable specifications for the new variable list.The list
* elements have to be of type MmsVariableAccessSpecification*. * elements have to be of type MmsVariableAccessSpecification*.
*/ */
void LIB61850_API void
MmsConnection_defineNamedVariableListAssociationSpecific(MmsConnection self, MmsError* mmsError, MmsConnection_defineNamedVariableListAssociationSpecific(MmsConnection self, MmsError* mmsError,
const char* listName, LinkedList variableSpecs); const char* listName, LinkedList variableSpecs);
uint32_t LIB61850_API uint32_t
MmsConnection_defineNamedVariableListAssociationSpecificAsync(MmsConnection self, MmsError* mmsError, MmsConnection_defineNamedVariableListAssociationSpecificAsync(MmsConnection self, MmsError* mmsError,
const char* listName, LinkedList variableSpecs, const char* listName, LinkedList variableSpecs,
MmsConnection_GenericServiceHandler handler, void* parameter); 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 * \return List of names of the variable list entries or NULL if the request failed
*/ */
LinkedList /* <MmsVariableAccessSpecification*> */ LIB61850_API LinkedList /* <MmsVariableAccessSpecification*> */
MmsConnection_readNamedVariableListDirectory(MmsConnection self, MmsError* mmsError, MmsConnection_readNamedVariableListDirectory(MmsConnection self, MmsError* mmsError,
const char* domainId, const char* listName, bool* deletable); const char* domainId, const char* listName, bool* deletable);
@ -828,7 +828,7 @@ typedef void
(*MmsConnection_ReadNVLDirectoryHandler) (int invokeId, void* parameter, MmsError mmsError, LinkedList /* <MmsVariableAccessSpecification*> */ specs, bool deletable); (*MmsConnection_ReadNVLDirectoryHandler) (int invokeId, void* parameter, MmsError mmsError, LinkedList /* <MmsVariableAccessSpecification*> */ specs, bool deletable);
uint32_t LIB61850_API uint32_t
MmsConnection_readNamedVariableListDirectoryAsync(MmsConnection self, MmsError* mmsError, MmsConnection_readNamedVariableListDirectoryAsync(MmsConnection self, MmsError* mmsError,
const char* domainId, const char* listName, const char* domainId, const char* listName,
MmsConnection_ReadNVLDirectoryHandler handler, void* parameter); 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 * \return List of names of the variable list entries or NULL if the request failed
*/ */
LinkedList /* <MmsVariableAccessSpecification*> */ LIB61850_API LinkedList /* <MmsVariableAccessSpecification*> */
MmsConnection_readNamedVariableListDirectoryAssociationSpecific(MmsConnection self, MmsError* mmsError, MmsConnection_readNamedVariableListDirectoryAssociationSpecific(MmsConnection self, MmsError* mmsError,
const char* listName, bool* deletable); const char* listName, bool* deletable);
uint32_t LIB61850_API uint32_t
MmsConnection_readNamedVariableListDirectoryAssociationSpecificAsync(MmsConnection self, MmsError* mmsError, MmsConnection_readNamedVariableListDirectoryAssociationSpecificAsync(MmsConnection self, MmsError* mmsError,
const char* listName, const char* listName,
MmsConnection_ReadNVLDirectoryHandler handler, void* parameter); MmsConnection_ReadNVLDirectoryHandler handler, void* parameter);
@ -865,11 +865,11 @@ MmsConnection_readNamedVariableListDirectoryAssociationSpecificAsync(MmsConnecti
* *
* \return true if named variable list has been deleted, false otherwise * \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); 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_deleteNamedVariableListAsync(MmsConnection self, MmsError* mmsError, const char* domainId, const char* listName,
MmsConnection_GenericServiceHandler handler, void* parameter); 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 * \return true if named variable list has been deleted, false otherwise
*/ */
bool LIB61850_API bool
MmsConnection_deleteAssociationSpecificNamedVariableList(MmsConnection self, MmsError* mmsError, MmsConnection_deleteAssociationSpecificNamedVariableList(MmsConnection self, MmsError* mmsError,
const char* listName); const char* listName);
uint32_t LIB61850_API uint32_t
MmsConnection_deleteAssociationSpecificNamedVariableListAsync(MmsConnection self, MmsError* mmsError, const char* listName, MmsConnection_deleteAssociationSpecificNamedVariableListAsync(MmsConnection self, MmsError* mmsError, const char* listName,
MmsConnection_GenericServiceHandler handler, void* parameter); MmsConnection_GenericServiceHandler handler, void* parameter);
@ -902,7 +902,7 @@ MmsConnection_deleteAssociationSpecificNamedVariableListAsync(MmsConnection self
* *
* \return reference to the new MmsVariableSpecfication object * \return reference to the new MmsVariableSpecfication object
*/ */
MmsVariableAccessSpecification* LIB61850_API MmsVariableAccessSpecification*
MmsVariableAccessSpecification_create(char* domainId, char* itemId); MmsVariableAccessSpecification_create(char* domainId, char* itemId);
/** /**
@ -921,7 +921,7 @@ MmsVariableAccessSpecification_create(char* domainId, char* itemId);
* *
* \return reference to the new MmsVariableSpecfication object * \return reference to the new MmsVariableSpecfication object
*/ */
MmsVariableAccessSpecification* LIB61850_API MmsVariableAccessSpecification*
MmsVariableAccessSpecification_createAlternateAccess(char* domainId, char* itemId, int32_t index, MmsVariableAccessSpecification_createAlternateAccess(char* domainId, char* itemId, int32_t index,
char* componentName); char* componentName);
@ -930,7 +930,7 @@ MmsVariableAccessSpecification_createAlternateAccess(char* domainId, char* itemI
* *
* \param self the instance to delete * \param self the instance to delete
*/ */
void LIB61850_API void
MmsVariableAccessSpecification_destroy(MmsVariableAccessSpecification* self); MmsVariableAccessSpecification_destroy(MmsVariableAccessSpecification* self);
/** /**
@ -942,10 +942,10 @@ MmsVariableAccessSpecification_destroy(MmsVariableAccessSpecification* self);
* \param self MmsConnection instance to operate on * \param self MmsConnection instance to operate on
* \param localDetail the maximum size of the MMS PDU that will be accepted. * \param localDetail the maximum size of the MMS PDU that will be accepted.
*/ */
void LIB61850_API void
MmsConnection_setLocalDetail(MmsConnection self, int32_t localDetail); MmsConnection_setLocalDetail(MmsConnection self, int32_t localDetail);
int32_t LIB61850_API int32_t
MmsConnection_getLocalDetail(MmsConnection self); MmsConnection_getLocalDetail(MmsConnection self);
/** /**
@ -957,18 +957,18 @@ MmsConnection_getLocalDetail(MmsConnection self);
* \param self MmsConnection instance to operate on * \param self MmsConnection instance to operate on
* \param mmsError user provided variable to store error code * \param mmsError user provided variable to store error code
*/ */
MmsServerIdentity* LIB61850_API MmsServerIdentity*
MmsConnection_identify(MmsConnection self, MmsError* mmsError); MmsConnection_identify(MmsConnection self, MmsError* mmsError);
typedef void typedef void
(*MmsConnection_IdentifyHandler) (int invokeId, void* parameter, MmsError mmsError, (*MmsConnection_IdentifyHandler) (int invokeId, void* parameter, MmsError mmsError,
char* vendorName, char* modelName, char* revision); char* vendorName, char* modelName, char* revision);
uint32_t LIB61850_API uint32_t
MmsConnection_identifyAsync(MmsConnection self, MmsError* mmsError, MmsConnection_identifyAsync(MmsConnection self, MmsError* mmsError,
MmsConnection_IdentifyHandler handler, void* parameter); MmsConnection_IdentifyHandler handler, void* parameter);
void LIB61850_API void
MmsServerIdentity_destroy(MmsServerIdentity* self); 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[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 * \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, MmsConnection_getServerStatus(MmsConnection self, MmsError* mmsError, int* vmdLogicalStatus, int* vmdPhysicalStatus,
bool extendedDerivation); bool extendedDerivation);
typedef void typedef void
(*MmsConnection_GetServerStatusHandler) (int invokeId, void* parameter, MmsError mmsError, int vmdLogicalStatus, int vmdPhysicalStatus); (*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_getServerStatusAsync(MmsConnection self, MmsError* mmsError, bool extendedDerivation,
MmsConnection_GetServerStatusHandler handler, void* parameter); MmsConnection_GetServerStatusHandler handler, void* parameter);
@ -1028,14 +1028,14 @@ typedef void
* *
* \return the FRSM ID (file read state machine) handle of the opened file * \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, MmsConnection_fileOpen(MmsConnection self, MmsError* mmsError, const char* filename, uint32_t initialPosition,
uint32_t* fileSize, uint64_t* lastModified); uint32_t* fileSize, uint64_t* lastModified);
typedef void typedef void
(*MmsConnection_FileOpenHandler) (int invokeId, void* parameter, MmsError mmsError, int32_t frsmId, uint32_t fileSize, uint64_t lastModified); (*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, MmsConnection_fileOpenAsync(MmsConnection self, MmsError* mmsError, const char* filename, uint32_t initialPosition, MmsConnection_FileOpenHandler handler,
void* parameter); 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. * \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); 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); 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 mmsError user provided variable to store error code
* \param frsmId id of the file to close * \param frsmId id of the file to close
*/ */
void LIB61850_API void
MmsConnection_fileClose(MmsConnection self, MmsError* mmsError, int32_t frsmId); 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); 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 mmsError user provided variable to store error code
* \param fileName name of the file to delete * \param fileName name of the file to delete
*/ */
void LIB61850_API void
MmsConnection_fileDelete(MmsConnection self, MmsError* mmsError, const char* fileName); 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_fileDeleteAsync(MmsConnection self, MmsError* mmsError, const char* fileName,
MmsConnection_GenericServiceHandler handler, void* parameter); 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 currentFileName name of the file to rename
* \param newFileName new name of the file * \param newFileName new name of the file
*/ */
void LIB61850_API void
MmsConnection_fileRename(MmsConnection self, MmsError* mmsError, const char* currentFileName, const char* newFileName); 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_fileRenameAsync(MmsConnection self, MmsError* mmsError, const char* currentFileName, const char* newFileName,
MmsConnection_GenericServiceHandler handler, void* parameter); 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 sourceFile the name of the source file (client side name)
* \param destinationFile the name of the destination file (server 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); 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_obtainFileAsync(MmsConnection self, MmsError* mmsError, const char* sourceFile, const char* destinationFile,
MmsConnection_GenericServiceHandler handler, void* parameter); 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 * \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, MmsConnection_getFileDirectory(MmsConnection self, MmsError* mmsError, const char* fileSpecification, const char* continueAfter,
MmsFileDirectoryHandler handler, void* handlerParameter); MmsFileDirectoryHandler handler, void* handlerParameter);
uint32_t LIB61850_API uint32_t
MmsConnection_getFileDirectoryAsync(MmsConnection self, MmsError* mmsError, const char* fileSpecification, const char* continueAfter, MmsConnection_getFileDirectoryAsync(MmsConnection self, MmsError* mmsError, const char* fileSpecification, const char* continueAfter,
MmsConnection_FileDirectoryHandler handler, void* parameter); MmsConnection_FileDirectoryHandler handler, void* parameter);
@ -1166,41 +1166,41 @@ struct sMmsJournalVariable {
* *
* \param self the MmsJournalEntry instance to destroy * \param self the MmsJournalEntry instance to destroy
*/ */
void LIB61850_API void
MmsJournalEntry_destroy(MmsJournalEntry self); MmsJournalEntry_destroy(MmsJournalEntry self);
const MmsValue* LIB61850_API const MmsValue*
MmsJournalEntry_getEntryID(MmsJournalEntry self); MmsJournalEntry_getEntryID(MmsJournalEntry self);
const MmsValue* LIB61850_API const MmsValue*
MmsJournalEntry_getOccurenceTime(MmsJournalEntry self); MmsJournalEntry_getOccurenceTime(MmsJournalEntry self);
const LinkedList /* <MmsJournalVariable> */ LIB61850_API const LinkedList /* <MmsJournalVariable> */
MmsJournalEntry_getJournalVariables(MmsJournalEntry self); MmsJournalEntry_getJournalVariables(MmsJournalEntry self);
const char* LIB61850_API const char*
MmsJournalVariable_getTag(MmsJournalVariable self); MmsJournalVariable_getTag(MmsJournalVariable self);
const MmsValue* LIB61850_API const MmsValue*
MmsJournalVariable_getValue(MmsJournalVariable self); MmsJournalVariable_getValue(MmsJournalVariable self);
typedef void typedef void
(*MmsConnection_ReadJournalHandler) (int invokeId, void* parameter, MmsError mmsError, LinkedList /* <MmsJournalEntry> */ journalEntries, bool moreFollows); (*MmsConnection_ReadJournalHandler) (int invokeId, void* parameter, MmsError mmsError, LinkedList /* <MmsJournalEntry> */ journalEntries, bool moreFollows);
LinkedList /* <MmsJournalEntry> */ LIB61850_API LinkedList /* <MmsJournalEntry> */
MmsConnection_readJournalTimeRange(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId, MmsConnection_readJournalTimeRange(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId,
MmsValue* startTime, MmsValue* endTime, bool* moreFollows); MmsValue* startTime, MmsValue* endTime, bool* moreFollows);
uint32_t LIB61850_API uint32_t
MmsConnection_readJournalTimeRangeAsync(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId, MmsConnection_readJournalTimeRangeAsync(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId,
MmsValue* startTime, MmsValue* endTime, MmsConnection_ReadJournalHandler handler, void* parameter); MmsValue* startTime, MmsValue* endTime, MmsConnection_ReadJournalHandler handler, void* parameter);
LinkedList /* <MmsJournalEntry> */ LIB61850_API LinkedList /* <MmsJournalEntry> */
MmsConnection_readJournalStartAfter(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId, MmsConnection_readJournalStartAfter(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId,
MmsValue* timeSpecification, MmsValue* entrySpecification, bool* moreFollows); MmsValue* timeSpecification, MmsValue* entrySpecification, bool* moreFollows);
uint32_t LIB61850_API uint32_t
MmsConnection_readJournalStartAfterAsync(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId, MmsConnection_readJournalStartAfterAsync(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId,
MmsValue* timeSpecification, MmsValue* entrySpecification, MmsConnection_ReadJournalHandler handler, void* parameter); 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 * \param self the object to destroy
*/ */
void LIB61850_API void
MmsServerIdentity_destroy(MmsServerIdentity* self); MmsServerIdentity_destroy(MmsServerIdentity* self);
/**@}*/ /**@}*/

@ -1,7 +1,7 @@
/* /*
* mms_common.h * mms_common.h
* *
* Copyright 2013, 2014 Michael Zillgith * Copyright 2013-2018 Michael Zillgith
* *
* This file is part of libIEC61850. * This file is part of libIEC61850.
* *

@ -1,7 +1,7 @@
/* /*
* mms_value.h * mms_value.h
* *
* Copyright 2013 Michael Zillgith * Copyright 2013-2018 Michael Zillgith
* *
* This file is part of libIEC61850. * This file is part of libIEC61850.
* *
@ -31,7 +31,6 @@ extern "C" {
#include "libiec61850_common_api.h" #include "libiec61850_common_api.h"
#include "mms_common.h" #include "mms_common.h"
#include "mms_types.h" #include "mms_types.h"
#include "ber_integer.h"
/** /**
* \defgroup common_api_group libIEC61850 API common parts * \defgroup common_api_group libIEC61850 API common parts
@ -79,7 +78,7 @@ typedef struct sMmsValue MmsValue;
* *
* \return a newly created array instance * \return a newly created array instance
*/ */
MmsValue* LIB61850_API MmsValue*
MmsValue_createArray(MmsVariableSpecification* elementType, int size); MmsValue_createArray(MmsVariableSpecification* elementType, int size);
/** /**
@ -89,7 +88,7 @@ MmsValue_createArray(MmsVariableSpecification* elementType, int size);
* *
* \return the size of the array * \return the size of the array
*/ */
uint32_t LIB61850_API uint32_t
MmsValue_getArraySize(const MmsValue* self); MmsValue_getArraySize(const MmsValue* self);
/** /**
@ -100,7 +99,7 @@ MmsValue_getArraySize(const MmsValue* self);
* *
* \return the element object * \return the element object
*/ */
MmsValue* LIB61850_API MmsValue*
MmsValue_getElement(const MmsValue* array, int index); 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 * \return a newly created empty array instance
*/ */
MmsValue* LIB61850_API MmsValue*
MmsValue_createEmptyArray(int size); MmsValue_createEmptyArray(int size);
/** /**
@ -123,7 +122,7 @@ MmsValue_createEmptyArray(int size);
* \param the index of the element to set/replace * \param the index of the element to set/replace
* \param elementValue the (new) value of the element * \param elementValue the (new) value of the element
*/ */
void LIB61850_API void
MmsValue_setElement(MmsValue* complexValue, int index, MmsValue* elementValue); MmsValue_setElement(MmsValue* complexValue, int index, MmsValue* elementValue);
@ -131,7 +130,7 @@ MmsValue_setElement(MmsValue* complexValue, int index, MmsValue* elementValue);
* Basic type functions * Basic type functions
*************************************************************************************/ *************************************************************************************/
MmsDataAccessError LIB61850_API MmsDataAccessError
MmsValue_getDataAccessError(const MmsValue* self); MmsValue_getDataAccessError(const MmsValue* self);
/** /**
@ -141,7 +140,7 @@ MmsValue_getDataAccessError(const MmsValue* self);
* *
* \return signed 64 bit integer * \return signed 64 bit integer
*/ */
int64_t LIB61850_API int64_t
MmsValue_toInt64(const MmsValue* self); MmsValue_toInt64(const MmsValue* self);
/** /**
@ -151,7 +150,7 @@ MmsValue_toInt64(const MmsValue* self);
* *
* \return signed 32 bit integer * \return signed 32 bit integer
*/ */
int32_t LIB61850_API int32_t
MmsValue_toInt32(const MmsValue* value); MmsValue_toInt32(const MmsValue* value);
/** /**
@ -161,7 +160,7 @@ MmsValue_toInt32(const MmsValue* value);
* *
* \return unsigned 32 bit integer * \return unsigned 32 bit integer
*/ */
uint32_t LIB61850_API uint32_t
MmsValue_toUint32(const MmsValue* value); MmsValue_toUint32(const MmsValue* value);
/** /**
@ -171,7 +170,7 @@ MmsValue_toUint32(const MmsValue* value);
* *
* \return 64 bit floating point value * \return 64 bit floating point value
*/ */
double LIB61850_API double
MmsValue_toDouble(const MmsValue* self); MmsValue_toDouble(const MmsValue* self);
/** /**
@ -181,7 +180,7 @@ MmsValue_toDouble(const MmsValue* self);
* *
* \return 32 bit floating point value * \return 32 bit floating point value
*/ */
float LIB61850_API float
MmsValue_toFloat(const MmsValue* self); MmsValue_toFloat(const MmsValue* self);
/** /**
@ -191,7 +190,7 @@ MmsValue_toFloat(const MmsValue* self);
* *
* \return unix timestamp of the MMS_UTCTIME variable. * \return unix timestamp of the MMS_UTCTIME variable.
*/ */
uint32_t LIB61850_API uint32_t
MmsValue_toUnixTimestamp(const MmsValue* self); 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. * \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); 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. * \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); 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 self MmsValue instance to operate on. Has to be of a type MMS_INTEGER.
* \param integer the new value to set * \param integer the new value to set
*/ */
void LIB61850_API void
MmsValue_setInt8(MmsValue* value, int8_t integer); 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 self MmsValue instance to operate on. Has to be of a type MMS_INTEGER.
* \param integer the new value to set * \param integer the new value to set
*/ */
void LIB61850_API void
MmsValue_setInt16(MmsValue* value, int16_t integer); 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 self MmsValue instance to operate on. Has to be of a type MMS_INTEGER.
* \param integer the new value to set * \param integer the new value to set
*/ */
void LIB61850_API void
MmsValue_setInt32(MmsValue* self, int32_t integer); 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 self MmsValue instance to operate on. Has to be of a type MMS_INTEGER.
* \param integer the new value to set * \param integer the new value to set
*/ */
void LIB61850_API void
MmsValue_setInt64(MmsValue* value, int64_t integer); 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 self MmsValue instance to operate on. Has to be of a type MMS_UNSIGNED.
* \param integer the new value to set * \param integer the new value to set
*/ */
void LIB61850_API void
MmsValue_setUint8(MmsValue* value, uint8_t integer); 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 self MmsValue instance to operate on. Has to be of a type MMS_UNSIGNED.
* \param integer the new value to set * \param integer the new value to set
*/ */
void LIB61850_API void
MmsValue_setUint16(MmsValue* value, uint16_t integer); 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 self MmsValue instance to operate on. Has to be of a type MMS_UNSIGNED.
* \param integer the new value to set * \param integer the new value to set
*/ */
void LIB61850_API void
MmsValue_setUint32(MmsValue* value, uint32_t integer); 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 self MmsValue instance to operate on. Has to be of a type MMS_BOOLEAN.
* \param boolValue a bool value * \param boolValue a bool value
*/ */
void LIB61850_API void
MmsValue_setBoolean(MmsValue* value, bool boolValue); 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. * \param self MmsValue instance to operate on. Has to be of a type MMS_BOOLEAN.
* \return the MmsValue value as bool value * \return the MmsValue value as bool value
*/ */
bool LIB61850_API bool
MmsValue_getBoolean(const MmsValue* value); MmsValue_getBoolean(const MmsValue* value);
/** /**
@ -299,7 +298,7 @@ MmsValue_getBoolean(const MmsValue* value);
* *
* \returns the string value as 0 terminated C string * \returns the string value as 0 terminated C string
*/ */
const char* LIB61850_API const char*
MmsValue_toString(MmsValue* self); 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. * \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); MmsValue_getStringSize(MmsValue* self);
void LIB61850_API void
MmsValue_setVisibleString(MmsValue* self, const char* string); 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. * 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) * \param value the new value of the bit (true = 1 / false = 0)
*/ */
void LIB61850_API void
MmsValue_setBitStringBit(MmsValue* self, int bitPos, bool value); 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. * with position 0 is the first bit if the MmsValue instance is serialized.
* \return the value of the bit (true = 1 / false = 0) * \return the value of the bit (true = 1 / false = 0)
*/ */
bool LIB61850_API bool
MmsValue_getBitStringBit(const MmsValue* self, int bitPos); 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. * \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING.
*/ */
void LIB61850_API void
MmsValue_deleteAllBitStringBits(MmsValue* self); 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. * \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING.
*/ */
int LIB61850_API int
MmsValue_getBitStringSize(const MmsValue* self); 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. * \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING.
*/ */
int LIB61850_API int
MmsValue_getBitStringByteSize(const MmsValue* self); 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. * \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING.
*/ */
int LIB61850_API int
MmsValue_getNumberOfSetBits(const MmsValue* self); 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. * \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING.
*/ */
void LIB61850_API void
MmsValue_setAllBitStringBits(MmsValue* self); 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. * \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); 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 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 * \param intValue the integer value that is used to set the bit string
*/ */
void LIB61850_API void
MmsValue_setBitStringFromInteger(MmsValue* self, uint32_t intValue); 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. * \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); 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 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 * \param intValue the integer value that is used to set the bit string
*/ */
void LIB61850_API void
MmsValue_setBitStringFromIntegerBigEndian(MmsValue* self, uint32_t intValue); 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 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) * \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); 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 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) * \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); 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 self MmsValue instance to operate on. Has to be of a type MMS_UTCTIME.
* \param buffer buffer containing the encoded UTCTime. * \param buffer buffer containing the encoded UTCTime.
*/ */
void LIB61850_API void
MmsValue_setUtcTimeByBuffer(MmsValue* self, const uint8_t* buffer); 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 * \return the buffer containing the raw data
*/ */
uint8_t* LIB61850_API uint8_t*
MmsValue_getUtcTimeBuffer(MmsValue* self); 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) * \return the value in milliseconds since epoch (1970/01/01 00:00 UTC)
*/ */
uint64_t LIB61850_API uint64_t
MmsValue_getUtcTimeInMs(const MmsValue* value); 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) * \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); 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 * \param timeQuality the byte representing the time quality
*/ */
void LIB61850_API void
MmsValue_setUtcTimeQuality(MmsValue* self, uint8_t timeQuality); 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 * \return the byte representing the time quality
*/ */
uint8_t LIB61850_API uint8_t
MmsValue_getUtcTimeQuality(const MmsValue* self); 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 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) * \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); 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) * \return the value in milliseconds since epoch (1970/01/01 00:00 UTC)
*/ */
uint64_t LIB61850_API uint64_t
MmsValue_getBinaryTimeAsUtcMs(const MmsValue* self); MmsValue_getBinaryTimeAsUtcMs(const MmsValue* self);
/** /**
@ -551,7 +550,7 @@ MmsValue_getBinaryTimeAsUtcMs(const MmsValue* self);
* \param buf the buffer that contains the new value * \param buf the buffer that contains the new value
* \param size the size of 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); 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 * \return size in bytes
*/ */
uint16_t LIB61850_API uint16_t
MmsValue_getOctetStringSize(const MmsValue* self); MmsValue_getOctetStringSize(const MmsValue* self);
/** /**
@ -574,7 +573,7 @@ MmsValue_getOctetStringSize(const MmsValue* self);
* *
* \return maximum size in bytes * \return maximum size in bytes
*/ */
uint16_t LIB61850_API uint16_t
MmsValue_getOctetStringMaxSize(MmsValue* self); MmsValue_getOctetStringMaxSize(MmsValue* self);
/** /**
@ -584,7 +583,7 @@ MmsValue_getOctetStringMaxSize(MmsValue* self);
* *
* \return reference to the buffer * \return reference to the buffer
*/ */
uint8_t* LIB61850_API uint8_t*
MmsValue_getOctetStringBuffer(MmsValue* self); MmsValue_getOctetStringBuffer(MmsValue* self);
/** /**
@ -598,7 +597,7 @@ MmsValue_getOctetStringBuffer(MmsValue* self);
* *
* \return indicates if the update has been successful (false if not) * \return indicates if the update has been successful (false if not)
*/ */
bool LIB61850_API bool
MmsValue_update(MmsValue* self, const MmsValue* source); 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 * \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); 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. * \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); 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_newDataAccessError(MmsDataAccessError accessError);
MmsValue* LIB61850_API MmsValue*
MmsValue_newIntegerFromBerInteger(Asn1PrimitiveValue* berInteger);
MmsValue*
MmsValue_newUnsignedFromBerInteger(Asn1PrimitiveValue* berInteger);
MmsValue*
MmsValue_newInteger(int size); MmsValue_newInteger(int size);
MmsValue* LIB61850_API MmsValue*
MmsValue_newUnsigned(int size); MmsValue_newUnsigned(int size);
MmsValue* LIB61850_API MmsValue*
MmsValue_newBoolean(bool boolean); MmsValue_newBoolean(bool boolean);
/** /**
@ -660,40 +653,40 @@ MmsValue_newBoolean(bool boolean);
* *
* \return new MmsValue instance of type MMS_BITSTRING * \return new MmsValue instance of type MMS_BITSTRING
*/ */
MmsValue* LIB61850_API MmsValue*
MmsValue_newBitString(int bitSize); MmsValue_newBitString(int bitSize);
MmsValue* LIB61850_API MmsValue*
MmsValue_newOctetString(int size, int maxSize); MmsValue_newOctetString(int size, int maxSize);
MmsValue* LIB61850_API MmsValue*
MmsValue_newStructure(const MmsVariableSpecification* typeSpec); MmsValue_newStructure(const MmsVariableSpecification* typeSpec);
MmsValue* LIB61850_API MmsValue*
MmsValue_createEmptyStructure(int size); MmsValue_createEmptyStructure(int size);
MmsValue* LIB61850_API MmsValue*
MmsValue_newDefaultValue(const MmsVariableSpecification* typeSpec); MmsValue_newDefaultValue(const MmsVariableSpecification* typeSpec);
MmsValue* LIB61850_API MmsValue*
MmsValue_newIntegerFromInt8(int8_t integer); MmsValue_newIntegerFromInt8(int8_t integer);
MmsValue* LIB61850_API MmsValue*
MmsValue_newIntegerFromInt16(int16_t integer); MmsValue_newIntegerFromInt16(int16_t integer);
MmsValue* LIB61850_API MmsValue*
MmsValue_newIntegerFromInt32(int32_t integer); MmsValue_newIntegerFromInt32(int32_t integer);
MmsValue* LIB61850_API MmsValue*
MmsValue_newIntegerFromInt64(int64_t integer); MmsValue_newIntegerFromInt64(int64_t integer);
MmsValue* LIB61850_API MmsValue*
MmsValue_newUnsignedFromUint32(uint32_t integer); MmsValue_newUnsignedFromUint32(uint32_t integer);
MmsValue* LIB61850_API MmsValue*
MmsValue_newFloat(float variable); MmsValue_newFloat(float variable);
MmsValue* LIB61850_API MmsValue*
MmsValue_newDouble(double variable); 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. * \return an MmsValue instance that is an exact copy of the given instance.
*/ */
MmsValue* LIB61850_API MmsValue*
MmsValue_clone(const MmsValue* self); 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. * \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); 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 * \return the number of bytes required by a clone
*/ */
int LIB61850_API int
MmsValue_getSizeInMemory(const MmsValue* self); MmsValue_getSizeInMemory(const MmsValue* self);
/** /**
@ -744,7 +737,7 @@ MmsValue_getSizeInMemory(const MmsValue* self);
* *
* \param self the MmsValue instance to be deleted. * \param self the MmsValue instance to be deleted.
*/ */
void LIB61850_API void
MmsValue_delete(MmsValue* self); MmsValue_delete(MmsValue* self);
/** /**
@ -759,7 +752,7 @@ MmsValue_delete(MmsValue* self);
* *
* \param self the MmsValue instance to be deleted. * \param self the MmsValue instance to be deleted.
*/ */
void LIB61850_API void
MmsValue_deleteConditional(MmsValue* value); MmsValue_deleteConditional(MmsValue* value);
/** /**
@ -771,7 +764,7 @@ MmsValue_deleteConditional(MmsValue* value);
* *
* \param self the MmsValue instance to be deleted. * \param self the MmsValue instance to be deleted.
*/ */
void LIB61850_API void
MmsValue_deleteIfNotNull(MmsValue* value); MmsValue_deleteIfNotNull(MmsValue* value);
/** /**
@ -784,7 +777,7 @@ MmsValue_deleteIfNotNull(MmsValue* value);
* *
* \return new MmsValue instance of type MMS_VISIBLE_STRING * \return new MmsValue instance of type MMS_VISIBLE_STRING
*/ */
MmsValue* LIB61850_API MmsValue*
MmsValue_newVisibleString(const char* string); MmsValue_newVisibleString(const char* string);
/** /**
@ -798,7 +791,7 @@ MmsValue_newVisibleString(const char* string);
* *
* \return new MmsValue instance of type MMS_VISIBLE_STRING * \return new MmsValue instance of type MMS_VISIBLE_STRING
*/ */
MmsValue* LIB61850_API MmsValue*
MmsValue_newVisibleStringWithSize(int size); MmsValue_newVisibleStringWithSize(int size);
/** /**
@ -812,7 +805,7 @@ MmsValue_newVisibleStringWithSize(int size);
* *
* \return new MmsValue instance of type MMS_STRING * \return new MmsValue instance of type MMS_STRING
*/ */
MmsValue* LIB61850_API MmsValue*
MmsValue_newMmsStringWithSize(int size); MmsValue_newMmsStringWithSize(int size);
/** /**
@ -826,7 +819,7 @@ MmsValue_newMmsStringWithSize(int size);
* *
* \return new MmsValue instance of type MMS_BINARYTIME * \return new MmsValue instance of type MMS_BINARYTIME
*/ */
MmsValue* LIB61850_API MmsValue*
MmsValue_newBinaryTime(bool timeOfDay); MmsValue_newBinaryTime(bool timeOfDay);
/** /**
@ -837,7 +830,7 @@ MmsValue_newBinaryTime(bool timeOfDay);
* *
* \return new MmsValue instance of type MMS_VISIBLE_STRING * \return new MmsValue instance of type MMS_VISIBLE_STRING
*/ */
MmsValue* LIB61850_API MmsValue*
MmsValue_newVisibleStringFromByteArray(uint8_t* byteArray, int size); 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 * \return new MmsValue instance of type MMS_STRING
*/ */
MmsValue* LIB61850_API MmsValue*
MmsValue_newMmsStringFromByteArray(uint8_t* byteArray, int size); 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 * \return new MmsValue instance of type MMS_STRING
*/ */
MmsValue* LIB61850_API MmsValue*
MmsValue_newMmsString(char* string); 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); 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 * \return new MmsValue instance of type MMS_UTCTIME
*/ */
MmsValue* LIB61850_API MmsValue*
MmsValue_newUtcTime(uint32_t timeval); MmsValue_newUtcTime(uint32_t timeval);
/** /**
@ -881,14 +879,14 @@ MmsValue_newUtcTime(uint32_t timeval);
* *
* \return new MmsValue instance of type MMS_UTCTIME * \return new MmsValue instance of type MMS_UTCTIME
*/ */
MmsValue* LIB61850_API MmsValue*
MmsValue_newUtcTimeByMsTime(uint64_t timeval); MmsValue_newUtcTimeByMsTime(uint64_t timeval);
void LIB61850_API void
MmsValue_setDeletable(MmsValue* self); MmsValue_setDeletable(MmsValue* self);
void LIB61850_API void
MmsValue_setDeletableRecursive(MmsValue* value); MmsValue_setDeletableRecursive(MmsValue* value);
/** /**
@ -902,7 +900,7 @@ MmsValue_setDeletableRecursive(MmsValue* value);
* *
* \return 1 if deletable flag is set, otherwise 0 * \return 1 if deletable flag is set, otherwise 0
*/ */
int LIB61850_API int
MmsValue_isDeletable(MmsValue* self); MmsValue_isDeletable(MmsValue* self);
/** /**
@ -910,7 +908,7 @@ MmsValue_isDeletable(MmsValue* self);
* *
* \param self the MmsValue instance * \param self the MmsValue instance
*/ */
MmsType LIB61850_API MmsType
MmsValue_getType(const MmsValue* self); 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 * \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); 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 * \return the value type as a human readable string
*/ */
char* LIB61850_API char*
MmsValue_getTypeString(MmsValue* self); MmsValue_getTypeString(MmsValue* self);
/** /**
@ -947,7 +945,7 @@ MmsValue_getTypeString(MmsValue* self);
* *
* \return a pointer to the start of the buffer * \return a pointer to the start of the buffer
*/ */
const char* LIB61850_API const char*
MmsValue_printToBuffer(const MmsValue* self, char* buffer, int bufferSize); 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 * \return the MmsValue instance created from the buffer
*/ */
MmsValue* LIB61850_API MmsValue*
MmsValue_decodeMmsData(uint8_t* buffer, int bufPos, int bufferLength, int* endBufPos); 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 * \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); MmsValue_encodeMmsData(MmsValue* self, uint8_t* buffer, int bufPos, bool encode);
/**@}*/ /**@}*/

@ -68,19 +68,19 @@ typedef struct sAcseConnection
#define ACSE_RESULT_REJECT_PERMANENT 1 #define ACSE_RESULT_REJECT_PERMANENT 1
#define ACSE_RESULT_REJECT_TRANSIENT 2 #define ACSE_RESULT_REJECT_TRANSIENT 2
void LIB61850_INTERNAL void
AcseConnection_init(AcseConnection* self, AcseAuthenticator authenticator, void* parameter, TLSSocket tlsSocket); AcseConnection_init(AcseConnection* self, AcseAuthenticator authenticator, void* parameter, TLSSocket tlsSocket);
void LIB61850_INTERNAL void
AcseConnection_destroy(AcseConnection* self); AcseConnection_destroy(AcseConnection* self);
AcseIndication LIB61850_INTERNAL AcseIndication
AcseConnection_parseMessage(AcseConnection* self, ByteBuffer* message); AcseConnection_parseMessage(AcseConnection* self, ByteBuffer* message);
void LIB61850_INTERNAL void
AcseConnection_createAssociateFailedMessage(AcseConnection* connection, BufferChain writeBuffer); AcseConnection_createAssociateFailedMessage(AcseConnection* connection, BufferChain writeBuffer);
void LIB61850_INTERNAL void
AcseConnection_createAssociateResponseMessage( AcseConnection_createAssociateResponseMessage(
AcseConnection* self, AcseConnection* self,
uint8_t resultCode, uint8_t resultCode,
@ -88,20 +88,20 @@ AcseConnection_createAssociateResponseMessage(
BufferChain payloadBuffer BufferChain payloadBuffer
); );
void LIB61850_INTERNAL void
AcseConnection_createAssociateRequestMessage(AcseConnection* self, AcseConnection_createAssociateRequestMessage(AcseConnection* self,
IsoConnectionParameters isoParameters, IsoConnectionParameters isoParameters,
BufferChain writeBuffer, BufferChain writeBuffer,
BufferChain payload, BufferChain payload,
AcseAuthenticationParameter authParameter); AcseAuthenticationParameter authParameter);
void LIB61850_INTERNAL void
AcseConnection_createAbortMessage(AcseConnection* self, BufferChain writeBuffer, bool isProvider); AcseConnection_createAbortMessage(AcseConnection* self, BufferChain writeBuffer, bool isProvider);
void LIB61850_INTERNAL void
AcseConnection_createReleaseRequestMessage(AcseConnection* self, BufferChain writeBuffer); AcseConnection_createReleaseRequestMessage(AcseConnection* self, BufferChain writeBuffer);
void LIB61850_INTERNAL void
AcseConnection_createReleaseResponseMessage(AcseConnection* self, BufferChain writeBuffer); AcseConnection_createReleaseResponseMessage(AcseConnection* self, BufferChain writeBuffer);
#endif /* ACSE_H_ */ #endif /* ACSE_H_ */

@ -1,7 +1,7 @@
/* /*
* asn1_ber_primitive_value.h * asn1_ber_primitive_value.h
* *
* Copyright 2013 Michael Zillgith * Copyright 2013-2018 Michael Zillgith
* *
* This file is part of libIEC61850. * This file is part of libIEC61850.
* *
@ -37,22 +37,22 @@ typedef struct ATTRIBUTE_PACKED {
uint8_t* octets; uint8_t* octets;
} Asn1PrimitiveValue; } Asn1PrimitiveValue;
Asn1PrimitiveValue* LIB61850_INTERNAL Asn1PrimitiveValue*
Asn1PrimitiveValue_create(int size); Asn1PrimitiveValue_create(int size);
int LIB61850_INTERNAL int
Asn1PrimitiveValue_getSize(Asn1PrimitiveValue* self); Asn1PrimitiveValue_getSize(Asn1PrimitiveValue* self);
int LIB61850_INTERNAL int
Asn1PrimitiveValue_getMaxSize(Asn1PrimitiveValue* self); Asn1PrimitiveValue_getMaxSize(Asn1PrimitiveValue* self);
Asn1PrimitiveValue* LIB61850_INTERNAL Asn1PrimitiveValue*
Asn1PrimitiveValue_clone(Asn1PrimitiveValue* self); Asn1PrimitiveValue_clone(Asn1PrimitiveValue* self);
bool LIB61850_INTERNAL bool
Asn1PrimitivaValue_compare(Asn1PrimitiveValue* self, Asn1PrimitiveValue* otherValue); Asn1PrimitivaValue_compare(Asn1PrimitiveValue* self, Asn1PrimitiveValue* otherValue);
void LIB61850_INTERNAL void
Asn1PrimitiveValue_destroy(Asn1PrimitiveValue* self); Asn1PrimitiveValue_destroy(Asn1PrimitiveValue* self);
#ifdef __cplusplus #ifdef __cplusplus

@ -1,7 +1,7 @@
/* /*
* ber_decode.h * ber_decode.h
* *
* Copyright 2013 Michael Zillgith * Copyright 2013-2018 Michael Zillgith
* *
* This file is part of libIEC61850. * This file is part of libIEC61850.
* *
@ -26,27 +26,28 @@
#include "libiec61850_platform_includes.h" #include "libiec61850_platform_includes.h"
int LIB61850_INTERNAL int
BerDecoder_decodeLength(uint8_t* buffer, int* length, int bufPos, int maxBufPos); 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); 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); BerDecoder_decodeUint32(uint8_t* buffer, int intlen, int bufPos);
int32_t LIB61850_INTERNAL int32_t
BerDecoder_decodeInt32(uint8_t* buffer, int intlen, int bufPos); BerDecoder_decodeInt32(uint8_t* buffer, int intlen, int bufPos);
float LIB61850_INTERNAL float
BerDecoder_decodeFloat(uint8_t* buffer, int bufPos); BerDecoder_decodeFloat(uint8_t* buffer, int bufPos);
double LIB61850_INTERNAL double
BerDecoder_decodeDouble(uint8_t* buffer, int bufPos); BerDecoder_decodeDouble(uint8_t* buffer, int bufPos);
bool LIB61850_INTERNAL bool
BerDecoder_decodeBoolean(uint8_t* buffer, int bufPos); BerDecoder_decodeBoolean(uint8_t* buffer, int bufPos);
void LIB61850_INTERNAL void
BerDecoder_decodeOID(uint8_t* buffer, int bufPos, int length, ItuObjectIdentifier* oid); BerDecoder_decodeOID(uint8_t* buffer, int bufPos, int length, ItuObjectIdentifier* oid);
#endif /* BER_DECODER_H_ */ #endif /* BER_DECODER_H_ */

@ -1,7 +1,7 @@
/* /*
* ber_encoder.h * ber_encoder.h
* *
* Copyright 2013 Michael Zillgith * Copyright 2013-2018 Michael Zillgith
* *
* This file is part of libIEC61850. * This file is part of libIEC61850.
* *
@ -34,40 +34,40 @@
* of the next entity to encode. * of the next entity to encode.
*/ */
int LIB61850_INTERNAL int
BerEncoder_encodeLength(uint32_t length, uint8_t* buffer, int bufPos); 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); 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); 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); 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); 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); 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); BerEncoder_encodeUInt32(uint32_t value, uint8_t* buffer, int bufPos);
int LIB61850_INTERNAL int
BerEncoder_encodeInt32(int32_t value, uint8_t* buffer, int bufPos); 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); 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); BerEncoder_encodeBitString(uint8_t tag, int bitStringSize, uint8_t* bitString, uint8_t* buffer, int bufPos);
int LIB61850_INTERNAL int
BerEncoder_determineEncodedBitStringSize(int bitStringSize); BerEncoder_determineEncodedBitStringSize(int bitStringSize);
int LIB61850_INTERNAL int
BerEncoder_encodeFloat(uint8_t* floatValue, uint8_t formatWidth, uint8_t exponentWidth, BerEncoder_encodeFloat(uint8_t* floatValue, uint8_t formatWidth, uint8_t exponentWidth,
uint8_t* buffer, int bufPos); 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. * functions to determine size of encoded entities.
*/ */
int LIB61850_INTERNAL int
BerEncoder_UInt32determineEncodedSize(uint32_t value); BerEncoder_UInt32determineEncodedSize(uint32_t value);
int LIB61850_INTERNAL int
BerEncoder_determineLengthSize(uint32_t length); BerEncoder_determineLengthSize(uint32_t length);
int LIB61850_INTERNAL int
BerEncoder_determineEncodedStringSize(const char* string); BerEncoder_determineEncodedStringSize(const char* string);
int LIB61850_INTERNAL int
BerEncoder_determineEncodedBitStringSize(int bitStringSize); BerEncoder_determineEncodedBitStringSize(int bitStringSize);
/* /*
* helper functions * helper functions
*/ */
int LIB61850_INTERNAL int
BerEncoder_encodeOIDToBuffer(const char* oidString, uint8_t* buffer, int maxBufLen); BerEncoder_encodeOIDToBuffer(const char* oidString, uint8_t* buffer, int maxBufLen);
void LIB61850_INTERNAL void
BerEncoder_revertByteOrder(uint8_t* octets, const int size); BerEncoder_revertByteOrder(uint8_t* octets, const int size);
int LIB61850_INTERNAL int
BerEncoder_compressInteger(uint8_t* integer, int originalSize); BerEncoder_compressInteger(uint8_t* integer, int originalSize);
#endif /* BER_ENCODER_H_ */ #endif /* BER_ENCODER_H_ */

@ -1,7 +1,7 @@
/* /*
* ber_integer.h * ber_integer.h
* *
* Copyright 2013 Michael Zillgith * Copyright 2013-2018 Michael Zillgith
* *
* This file is part of libIEC61850. * This file is part of libIEC61850.
* *
@ -30,49 +30,49 @@
extern "C" { extern "C" {
#endif #endif
Asn1PrimitiveValue* LIB61850_INTERNAL Asn1PrimitiveValue*
BerInteger_createFromBuffer(uint8_t* buf, int size); BerInteger_createFromBuffer(uint8_t* buf, int size);
Asn1PrimitiveValue* LIB61850_INTERNAL Asn1PrimitiveValue*
BerInteger_createInt32(void); BerInteger_createInt32(void);
int LIB61850_INTERNAL int
BerInteger_setFromBerInteger(Asn1PrimitiveValue* self, Asn1PrimitiveValue* value); BerInteger_setFromBerInteger(Asn1PrimitiveValue* self, Asn1PrimitiveValue* value);
int LIB61850_INTERNAL int
BerInteger_setInt32(Asn1PrimitiveValue* self, int32_t value); BerInteger_setInt32(Asn1PrimitiveValue* self, int32_t value);
Asn1PrimitiveValue* LIB61850_INTERNAL Asn1PrimitiveValue*
BerInteger_createFromInt32(int32_t value); BerInteger_createFromInt32(int32_t value);
int LIB61850_INTERNAL int
BerInteger_setUint8(Asn1PrimitiveValue* self, uint8_t value); BerInteger_setUint8(Asn1PrimitiveValue* self, uint8_t value);
int LIB61850_INTERNAL int
BerInteger_setUint16(Asn1PrimitiveValue* self, uint16_t value); BerInteger_setUint16(Asn1PrimitiveValue* self, uint16_t value);
int LIB61850_INTERNAL int
BerInteger_setUint32(Asn1PrimitiveValue* self, uint32_t value); BerInteger_setUint32(Asn1PrimitiveValue* self, uint32_t value);
Asn1PrimitiveValue* LIB61850_INTERNAL Asn1PrimitiveValue*
BerInteger_createFromUint32(uint32_t value); BerInteger_createFromUint32(uint32_t value);
Asn1PrimitiveValue* LIB61850_INTERNAL Asn1PrimitiveValue*
BerInteger_createFromInt64(int64_t value); BerInteger_createFromInt64(int64_t value);
Asn1PrimitiveValue* LIB61850_INTERNAL Asn1PrimitiveValue*
BerInteger_createInt64(void); BerInteger_createInt64(void);
int LIB61850_INTERNAL int
BerInteger_setInt64(Asn1PrimitiveValue* self, int64_t value); 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); 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); 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); BerInteger_toInt64(Asn1PrimitiveValue* self, int64_t* nativeValue);
#ifdef __cplusplus #ifdef __cplusplus

@ -71,41 +71,41 @@ typedef enum {
TPKT_ERROR = 2 TPKT_ERROR = 2
} TpktState; } TpktState;
int /* in byte */ LIB61850_INTERNAL int /* in byte */
CotpConnection_getTpduSize(CotpConnection* self); CotpConnection_getTpduSize(CotpConnection* self);
void LIB61850_INTERNAL void
CotpConnection_setTpduSize(CotpConnection* self, int tpduSize /* in byte */); CotpConnection_setTpduSize(CotpConnection* self, int tpduSize /* in byte */);
void LIB61850_INTERNAL void
CotpConnection_init(CotpConnection* self, Socket socket, CotpConnection_init(CotpConnection* self, Socket socket,
ByteBuffer* payloadBuffer, ByteBuffer* readBuffer, ByteBuffer* writeBuffer); ByteBuffer* payloadBuffer, ByteBuffer* readBuffer, ByteBuffer* writeBuffer);
CotpIndication LIB61850_INTERNAL CotpIndication
CotpConnection_parseIncomingMessage(CotpConnection* self); CotpConnection_parseIncomingMessage(CotpConnection* self);
void LIB61850_INTERNAL void
CotpConnection_resetPayload(CotpConnection* self); CotpConnection_resetPayload(CotpConnection* self);
TpktState LIB61850_INTERNAL TpktState
CotpConnection_readToTpktBuffer(CotpConnection* self); CotpConnection_readToTpktBuffer(CotpConnection* self);
CotpIndication LIB61850_INTERNAL CotpIndication
CotpConnection_sendConnectionRequestMessage(CotpConnection* self, IsoConnectionParameters isoParameters); CotpConnection_sendConnectionRequestMessage(CotpConnection* self, IsoConnectionParameters isoParameters);
CotpIndication LIB61850_INTERNAL CotpIndication
CotpConnection_sendConnectionResponseMessage(CotpConnection* self); CotpConnection_sendConnectionResponseMessage(CotpConnection* self);
CotpIndication LIB61850_INTERNAL CotpIndication
CotpConnection_sendDataMessage(CotpConnection* self, BufferChain payload); CotpConnection_sendDataMessage(CotpConnection* self, BufferChain payload);
ByteBuffer* LIB61850_INTERNAL ByteBuffer*
CotpConnection_getPayload(CotpConnection* self); CotpConnection_getPayload(CotpConnection* self);
int LIB61850_INTERNAL int
CotpConnection_getRemoteRef(CotpConnection* self); CotpConnection_getRemoteRef(CotpConnection* self);
int LIB61850_INTERNAL int
CotpConnection_getLocalRef(CotpConnection* self); CotpConnection_getLocalRef(CotpConnection* self);
#endif /* COTP_H_ */ #endif /* COTP_H_ */

@ -52,13 +52,13 @@ typedef void*
*/ */
typedef struct sIsoClientConnection* IsoClientConnection; typedef struct sIsoClientConnection* IsoClientConnection;
IsoClientConnection LIB61850_INTERNAL IsoClientConnection
IsoClientConnection_create(IsoConnectionParameters parameters, IsoIndicationCallback callback, void* callbackParameter); IsoClientConnection_create(IsoConnectionParameters parameters, IsoIndicationCallback callback, void* callbackParameter);
void LIB61850_INTERNAL void
IsoClientConnection_destroy(IsoClientConnection self); IsoClientConnection_destroy(IsoClientConnection self);
bool LIB61850_INTERNAL bool
IsoClientConnection_associateAsync(IsoClientConnection self, uint32_t connectTimeoutInMs); 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 * \return value indicates that connection is currently waiting and calling thread can be suspended
*/ */
bool LIB61850_INTERNAL bool
IsoClientConnection_handleConnection(IsoClientConnection self); IsoClientConnection_handleConnection(IsoClientConnection self);
void LIB61850_INTERNAL void
IsoClientConnection_associate(IsoClientConnection self, uint32_t connectTimeoutInMs); IsoClientConnection_associate(IsoClientConnection self, uint32_t connectTimeoutInMs);
/** /**
@ -77,37 +77,35 @@ IsoClientConnection_associate(IsoClientConnection self, uint32_t connectTimeoutI
* *
* \param payload message to send * \param payload message to send
*/ */
void LIB61850_INTERNAL void
IsoClientConnection_sendMessage(IsoClientConnection self, ByteBuffer* payload); IsoClientConnection_sendMessage(IsoClientConnection self, ByteBuffer* payload);
void LIB61850_INTERNAL void
IsoClientConnection_release(IsoClientConnection self); IsoClientConnection_release(IsoClientConnection self);
/** /**
* \brief Send ACSE abort message and wait until connection is closed by server or timeout occurred * \brief Send ACSE abort message and wait until connection is closed by server or timeout occurred
*/ */
void LIB61850_INTERNAL void
IsoClientConnection_abortAsync(IsoClientConnection self); IsoClientConnection_abortAsync(IsoClientConnection self);
void LIB61850_INTERNAL void
IsoClientConnection_close(IsoClientConnection self); IsoClientConnection_close(IsoClientConnection self);
/** /**
* This function should be called by the API client (usually the MmsConnection) to reserve(allocate) * 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 * 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); IsoClientConnection_allocateTransmitBuffer(IsoClientConnection self);
/** /**
* This function is used to release the transmit buffer in case a formerly allocated transmit buffer cannot * This function is used to release the transmit buffer in case a formerly allocated transmit buffer cannot
* be sent. * be sent.
*/ */
void LIB61850_INTERNAL void
IsoClientConnection_releaseTransmitBuffer(IsoClientConnection self); IsoClientConnection_releaseTransmitBuffer(IsoClientConnection self);
void*
IsoClientConnection_getSecurityToken(IsoClientConnection self);
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -37,32 +37,32 @@ typedef struct {
ByteBuffer nextPayload; ByteBuffer nextPayload;
} IsoPresentation; } IsoPresentation;
void LIB61850_INTERNAL void
IsoPresentation_init(IsoPresentation* session); IsoPresentation_init(IsoPresentation* session);
int LIB61850_INTERNAL int
IsoPresentation_parseUserData(IsoPresentation* session, ByteBuffer* message); IsoPresentation_parseUserData(IsoPresentation* session, ByteBuffer* message);
int LIB61850_INTERNAL int
IsoPresentation_parseConnect(IsoPresentation* session, ByteBuffer* message); IsoPresentation_parseConnect(IsoPresentation* session, ByteBuffer* message);
void LIB61850_INTERNAL void
IsoPresentation_createConnectPdu(IsoPresentation* self, IsoConnectionParameters parameters, IsoPresentation_createConnectPdu(IsoPresentation* self, IsoConnectionParameters parameters,
BufferChain buffer, BufferChain payload); BufferChain buffer, BufferChain payload);
void LIB61850_INTERNAL void
IsoPresentation_createCpaMessage(IsoPresentation* self, BufferChain writeBuffer, BufferChain payload); IsoPresentation_createCpaMessage(IsoPresentation* self, BufferChain writeBuffer, BufferChain payload);
void LIB61850_INTERNAL void
IsoPresentation_createUserData(IsoPresentation* self, BufferChain writeBuffer, BufferChain payload); IsoPresentation_createUserData(IsoPresentation* self, BufferChain writeBuffer, BufferChain payload);
void LIB61850_INTERNAL void
IsoPresentation_createUserDataACSE(IsoPresentation* self, BufferChain writeBuffer, BufferChain payload); IsoPresentation_createUserDataACSE(IsoPresentation* self, BufferChain writeBuffer, BufferChain payload);
int LIB61850_INTERNAL int
IsoPresentation_parseAcceptMessage(IsoPresentation* self, ByteBuffer* byteBuffer); IsoPresentation_parseAcceptMessage(IsoPresentation* self, ByteBuffer* byteBuffer);
void LIB61850_INTERNAL void
IsoPresentation_createAbortUserMessage(IsoPresentation* self, BufferChain writeBuffer, BufferChain payload); IsoPresentation_createAbortUserMessage(IsoPresentation* self, BufferChain writeBuffer, BufferChain payload);
#endif /* ISO_PRESENTATION_H_ */ #endif /* ISO_PRESENTATION_H_ */

@ -66,17 +66,17 @@ typedef void
typedef void typedef void
(*MessageReceivedHandler)(void* parameter, ByteBuffer* message, ByteBuffer* response); (*MessageReceivedHandler)(void* parameter, ByteBuffer* message, ByteBuffer* response);
char* LIB61850_INTERNAL char*
IsoConnection_getPeerAddress(IsoConnection self); IsoConnection_getPeerAddress(IsoConnection self);
void LIB61850_INTERNAL void
IsoConnection_close(IsoConnection self); IsoConnection_close(IsoConnection self);
void LIB61850_INTERNAL void
IsoConnection_installListener(IsoConnection self, MessageReceivedHandler handler, IsoConnection_installListener(IsoConnection self, MessageReceivedHandler handler,
void* parameter); void* parameter);
void* LIB61850_INTERNAL void*
IsoConnection_getSecurityToken(IsoConnection self); 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 * \param handlerMode specifies if this function is used in the context of the connection handling thread
* (handlerMode) * (handlerMode)
*/ */
void LIB61850_INTERNAL void
IsoConnection_sendMessage(IsoConnection self, ByteBuffer* message, bool handlerMode); IsoConnection_sendMessage(IsoConnection self, ByteBuffer* message, bool handlerMode);
IsoServer LIB61850_INTERNAL IsoServer
IsoServer_create(TLSConfiguration tlsConfiguration); IsoServer_create(TLSConfiguration tlsConfiguration);
void LIB61850_INTERNAL void
IsoServer_setTcpPort(IsoServer self, int port); IsoServer_setTcpPort(IsoServer self, int port);
void LIB61850_INTERNAL void
IsoServer_setMaxConnections(IsoServer self, int maxConnections); IsoServer_setMaxConnections(IsoServer self, int maxConnections);
void LIB61850_INTERNAL void
IsoServer_setLocalIpAddress(IsoServer self, const char* ipAddress); IsoServer_setLocalIpAddress(IsoServer self, const char* ipAddress);
IsoServerState LIB61850_INTERNAL IsoServerState
IsoServer_getState(IsoServer self); IsoServer_getState(IsoServer self);
void LIB61850_INTERNAL void
IsoServer_setConnectionHandler(IsoServer self, ConnectionIndicationHandler handler, IsoServer_setConnectionHandler(IsoServer self, ConnectionIndicationHandler handler,
void* parameter); void* parameter);
void LIB61850_INTERNAL void
IsoServer_setAuthenticator(IsoServer self, AcseAuthenticator authenticator, void* authenticatorParameter); IsoServer_setAuthenticator(IsoServer self, AcseAuthenticator authenticator, void* authenticatorParameter);
AcseAuthenticator LIB61850_INTERNAL AcseAuthenticator
IsoServer_getAuthenticator(IsoServer self); IsoServer_getAuthenticator(IsoServer self);
void* LIB61850_INTERNAL void*
IsoServer_getAuthenticatorParameter(IsoServer self); IsoServer_getAuthenticatorParameter(IsoServer self);
TLSConfiguration LIB61850_INTERNAL TLSConfiguration
IsoServer_getTLSConfiguration(IsoServer self); IsoServer_getTLSConfiguration(IsoServer self);
void LIB61850_INTERNAL void
IsoServer_startListening(IsoServer self); IsoServer_startListening(IsoServer self);
void LIB61850_INTERNAL void
IsoServer_stopListening(IsoServer self); IsoServer_stopListening(IsoServer self);
LIB61850_INTERNAL void
void
IsoServer_startListeningThreadless(IsoServer self); IsoServer_startListeningThreadless(IsoServer self);
/** /**
* for non-threaded operation * for non-threaded operation
*/ */
void LIB61850_INTERNAL void
IsoServer_processIncomingMessages(IsoServer self); IsoServer_processIncomingMessages(IsoServer self);
int LIB61850_INTERNAL int
IsoServer_waitReady(IsoServer self, unsigned int timeoutMs); IsoServer_waitReady(IsoServer self, unsigned int timeoutMs);
void LIB61850_INTERNAL void
IsoServer_stopListeningThreadless(IsoServer self); IsoServer_stopListeningThreadless(IsoServer self);
void LIB61850_INTERNAL void
IsoServer_closeConnection(IsoServer self, IsoConnection isoConnection); IsoServer_closeConnection(IsoServer self, IsoConnection isoConnection);
void LIB61850_INTERNAL void
IsoServer_destroy(IsoServer self); IsoServer_destroy(IsoServer self);
#ifdef __cplusplus #ifdef __cplusplus

@ -1,7 +1,7 @@
/* /*
* iso_server_private.h * iso_server_private.h
* *
* Copyright 2013 Michael Zillgith * Copyright 2013-2018 Michael Zillgith
* *
* This file is part of libIEC61850. * This file is part of libIEC61850.
* *
@ -27,40 +27,40 @@
#include "tls_config.h" #include "tls_config.h"
#include "hal_socket.h" #include "hal_socket.h"
IsoConnection LIB61850_INTERNAL IsoConnection
IsoConnection_create(Socket socket, IsoServer isoServer); IsoConnection_create(Socket socket, IsoServer isoServer);
void LIB61850_INTERNAL void
IsoConnection_destroy(IsoConnection self); IsoConnection_destroy(IsoConnection self);
void LIB61850_INTERNAL void
IsoConnection_handleTcpConnection(IsoConnection self); IsoConnection_handleTcpConnection(IsoConnection self);
void LIB61850_INTERNAL void
IsoConnection_addHandleSet(const IsoConnection self, HandleSet handles); IsoConnection_addHandleSet(const IsoConnection self, HandleSet handles);
void LIB61850_INTERNAL void
private_IsoServer_increaseConnectionCounter(IsoServer self); private_IsoServer_increaseConnectionCounter(IsoServer self);
void LIB61850_INTERNAL void
private_IsoServer_decreaseConnectionCounter(IsoServer self); private_IsoServer_decreaseConnectionCounter(IsoServer self);
int LIB61850_INTERNAL int
private_IsoServer_getConnectionCounter(IsoServer self); private_IsoServer_getConnectionCounter(IsoServer self);
/** /**
* \brief User provided lock that will be called when higher layer (MMS) is called * \brief User provided lock that will be called when higher layer (MMS) is called
*/ */
void LIB61850_INTERNAL void
IsoServer_setUserLock(IsoServer self, Semaphore userLock); IsoServer_setUserLock(IsoServer self, Semaphore userLock);
void LIB61850_INTERNAL void
IsoServer_userLock(IsoServer self); IsoServer_userLock(IsoServer self);
void LIB61850_INTERNAL void
IsoServer_userUnlock(IsoServer self); IsoServer_userUnlock(IsoServer self);
bool LIB61850_INTERNAL bool
IsoConnection_isRunning(IsoConnection self); IsoConnection_isRunning(IsoConnection self);
#endif /* ISO_SERVER_PRIVATE_H_ */ #endif /* ISO_SERVER_PRIVATE_H_ */

@ -48,31 +48,31 @@ typedef enum {
SESSION_NOT_FINISHED SESSION_NOT_FINISHED
} IsoSessionIndication; } IsoSessionIndication;
void LIB61850_INTERNAL void
IsoSession_init(IsoSession* session); IsoSession_init(IsoSession* session);
ByteBuffer* LIB61850_INTERNAL ByteBuffer*
IsoSession_getUserData(IsoSession* session); IsoSession_getUserData(IsoSession* session);
void LIB61850_INTERNAL void
IsoSession_createConnectSpdu(IsoSession* self, IsoConnectionParameters isoParameters, BufferChain buffer, BufferChain payload); IsoSession_createConnectSpdu(IsoSession* self, IsoConnectionParameters isoParameters, BufferChain buffer, BufferChain payload);
IsoSessionIndication LIB61850_INTERNAL IsoSessionIndication
IsoSession_parseMessage(IsoSession* session, ByteBuffer* message); IsoSession_parseMessage(IsoSession* session, ByteBuffer* message);
void LIB61850_INTERNAL void
IsoSession_createDataSpdu(IsoSession* session, BufferChain buffer, BufferChain payload); IsoSession_createDataSpdu(IsoSession* session, BufferChain buffer, BufferChain payload);
void LIB61850_INTERNAL void
IsoSession_createAcceptSpdu(IsoSession* self, BufferChain buffer, BufferChain payload); IsoSession_createAcceptSpdu(IsoSession* self, BufferChain buffer, BufferChain payload);
void LIB61850_INTERNAL void
IsoSession_createAbortSpdu(IsoSession* self, BufferChain buffer, BufferChain payload); IsoSession_createAbortSpdu(IsoSession* self, BufferChain buffer, BufferChain payload);
void LIB61850_INTERNAL void
IsoSession_createFinishSpdu(IsoSession* self, BufferChain buffer, BufferChain payload); IsoSession_createFinishSpdu(IsoSession* self, BufferChain buffer, BufferChain payload);
void LIB61850_INTERNAL void
IsoSession_createDisconnectSpdu(IsoSession* self, BufferChain buffer, BufferChain payload); IsoSession_createDisconnectSpdu(IsoSession* self, BufferChain buffer, BufferChain payload);
#endif /* ISE_SESSION_H_ */ #endif /* ISE_SESSION_H_ */

@ -158,218 +158,217 @@ typedef enum {
MMS_OBJECT_CLASS_DOMAIN = 9 MMS_OBJECT_CLASS_DOMAIN = 9
} MmsObjectClass; } MmsObjectClass;
char* LIB61850_INTERNAL char*
MmsConnection_getFilestoreBasepath(MmsConnection self); MmsConnection_getFilestoreBasepath(MmsConnection self);
MmsValue* LIB61850_INTERNAL MmsValue*
mmsClient_parseListOfAccessResults(AccessResult_t** accessResultList, int listSize, bool createArray); mmsClient_parseListOfAccessResults(AccessResult_t** accessResultList, int listSize, bool createArray);
uint32_t LIB61850_INTERNAL uint32_t
mmsClient_getInvokeId(ConfirmedResponsePdu_t* confirmedResponse); mmsClient_getInvokeId(ConfirmedResponsePdu_t* confirmedResponse);
int LIB61850_INTERNAL int
mmsClient_write_out(void *buffer, size_t size, void *app_key); mmsClient_write_out(void *buffer, size_t size, void *app_key);
void LIB61850_INTERNAL void
mmsClient_createInitiateRequest(MmsConnection self, ByteBuffer* writeBuffer); mmsClient_createInitiateRequest(MmsConnection self, ByteBuffer* writeBuffer);
MmsPdu_t* LIB61850_INTERNAL MmsPdu_t*
mmsClient_createConfirmedRequestPdu(uint32_t invokeId); mmsClient_createConfirmedRequestPdu(uint32_t invokeId);
AlternateAccess_t* LIB61850_INTERNAL AlternateAccess_t*
mmsClient_createAlternateAccess(uint32_t index, uint32_t elementCount); mmsClient_createAlternateAccess(uint32_t index, uint32_t elementCount);
void LIB61850_INTERNAL void
mmsClient_deleteAlternateAccess(AlternateAccess_t* alternateAccess); mmsClient_deleteAlternateAccess(AlternateAccess_t* alternateAccess);
void LIB61850_INTERNAL void
mmsClient_deleteAlternateAccessIndexComponent(AlternateAccess_t* alternateAccess); mmsClient_deleteAlternateAccessIndexComponent(AlternateAccess_t* alternateAccess);
AlternateAccess_t* LIB61850_INTERNAL AlternateAccess_t*
mmsClient_createAlternateAccessIndexComponent(uint32_t index, const char* componentName); mmsClient_createAlternateAccessIndexComponent(uint32_t index, const char* componentName);
int LIB61850_INTERNAL int
mmsClient_createMmsGetNameListRequestVMDspecific(long invokeId, ByteBuffer* writeBuffer, const char* continueAfter); mmsClient_createMmsGetNameListRequestVMDspecific(long invokeId, ByteBuffer* writeBuffer, const char* continueAfter);
bool LIB61850_INTERNAL bool
mmsClient_parseGetNameListResponse(LinkedList* nameList, ByteBuffer* message); mmsClient_parseGetNameListResponse(LinkedList* nameList, ByteBuffer* message);
int LIB61850_INTERNAL int
mmsClient_createGetNameListRequestDomainOrVMDSpecific(long invokeId, const char* domainName, mmsClient_createGetNameListRequestDomainOrVMDSpecific(long invokeId, const char* domainName,
ByteBuffer* writeBuffer, MmsObjectClass objectClass, const char* continueAfter); ByteBuffer* writeBuffer, MmsObjectClass objectClass, const char* continueAfter);
MmsValue* LIB61850_INTERNAL MmsValue*
mmsClient_parseReadResponse(ByteBuffer* message, uint32_t* invokeId, bool createArray); 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); 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, mmsClient_createReadRequestAlternateAccessIndex(uint32_t invokeId, const char* domainId, const char* itemId,
uint32_t index, uint32_t elementCount, ByteBuffer* writeBuffer); uint32_t index, uint32_t elementCount, ByteBuffer* writeBuffer);
int LIB61850_INTERNAL int
mmsClient_createReadRequestAlternateAccessSingleIndexComponent(uint32_t invokeId, const char* domainId, const char* itemId, mmsClient_createReadRequestAlternateAccessSingleIndexComponent(uint32_t invokeId, const char* domainId, const char* itemId,
uint32_t index, const char* component, ByteBuffer* writeBuffer); uint32_t index, const char* component, ByteBuffer* writeBuffer);
int LIB61850_INTERNAL int
mmsClient_createReadRequestMultipleValues(uint32_t invokeId, const char* domainId, LinkedList /*<char*>*/ items, mmsClient_createReadRequestMultipleValues(uint32_t invokeId, const char* domainId, LinkedList /*<char*>*/ items,
ByteBuffer* writeBuffer); ByteBuffer* writeBuffer);
int LIB61850_INTERNAL int
mmsClient_createReadNamedVariableListRequest(uint32_t invokeId, const char* domainId, const char* itemId, mmsClient_createReadNamedVariableListRequest(uint32_t invokeId, const char* domainId, const char* itemId,
ByteBuffer* writeBuffer, bool specWithResult); ByteBuffer* writeBuffer, bool specWithResult);
int LIB61850_INTERNAL int
mmsClient_createReadAssociationSpecificNamedVariableListRequest( mmsClient_createReadAssociationSpecificNamedVariableListRequest(
uint32_t invokeId, uint32_t invokeId,
const char* itemId, const char* itemId,
ByteBuffer* writeBuffer, ByteBuffer* writeBuffer,
bool specWithResult); bool specWithResult);
void LIB61850_INTERNAL void
mmsClient_createGetNamedVariableListAttributesRequest(uint32_t invokeId, ByteBuffer* writeBuffer, mmsClient_createGetNamedVariableListAttributesRequest(uint32_t invokeId, ByteBuffer* writeBuffer,
const char* domainId, const char* listNameId); const char* domainId, const char* listNameId);
void LIB61850_INTERNAL void
mmsClient_createGetNamedVariableListAttributesRequestAssociationSpecific(uint32_t invokeId, mmsClient_createGetNamedVariableListAttributesRequestAssociationSpecific(uint32_t invokeId,
ByteBuffer* writeBuffer, const char* listNameId); ByteBuffer* writeBuffer, const char* listNameId);
LinkedList LIB61850_INTERNAL LinkedList
mmsClient_parseGetNamedVariableListAttributesResponse(ByteBuffer* message, uint32_t* invokeId, mmsClient_parseGetNamedVariableListAttributesResponse(ByteBuffer* message, uint32_t* invokeId,
bool* /*OUT*/ deletable); bool* /*OUT*/ deletable);
int LIB61850_INTERNAL int
mmsClient_createGetVariableAccessAttributesRequest( mmsClient_createGetVariableAccessAttributesRequest(
uint32_t invokeId, uint32_t invokeId,
const char* domainId, const char* itemId, const char* domainId, const char* itemId,
ByteBuffer* writeBuffer); ByteBuffer* writeBuffer);
MmsVariableSpecification* LIB61850_INTERNAL MmsVariableSpecification*
mmsClient_parseGetVariableAccessAttributesResponse(ByteBuffer* message, uint32_t* invokeId); mmsClient_parseGetVariableAccessAttributesResponse(ByteBuffer* message, uint32_t* invokeId);
MmsDataAccessError LIB61850_INTERNAL MmsDataAccessError
mmsClient_parseWriteResponse(ByteBuffer* message, int32_t bufPos, MmsError* mmsError); mmsClient_parseWriteResponse(ByteBuffer* message, int32_t bufPos, MmsError* mmsError);
void LIB61850_INTERNAL void
mmsClient_parseWriteMultipleItemsResponse(ByteBuffer* message, int32_t bufPos, MmsError* mmsError, mmsClient_parseWriteMultipleItemsResponse(ByteBuffer* message, int32_t bufPos, MmsError* mmsError,
int itemCount, LinkedList* accessResults); int itemCount, LinkedList* accessResults);
int LIB61850_INTERNAL int
mmsClient_createWriteRequest(uint32_t invokeId, const char* domainId, const char* itemId, MmsValue* value, mmsClient_createWriteRequest(uint32_t invokeId, const char* domainId, const char* itemId, MmsValue* value,
ByteBuffer* writeBuffer); ByteBuffer* writeBuffer);
int LIB61850_INTERNAL int
mmsClient_createWriteMultipleItemsRequest(uint32_t invokeId, const char* domainId, LinkedList itemIds, LinkedList values, mmsClient_createWriteMultipleItemsRequest(uint32_t invokeId, const char* domainId, LinkedList itemIds, LinkedList values,
ByteBuffer* writeBuffer); ByteBuffer* writeBuffer);
int LIB61850_INTERNAL int
mmsClient_createWriteRequestNamedVariableList(uint32_t invokeId, bool isAssociationSpecific, const char* domainId, const char* itemId, mmsClient_createWriteRequestNamedVariableList(uint32_t invokeId, bool isAssociationSpecific, const char* domainId, const char* itemId,
LinkedList values, ByteBuffer* writeBuffer); LinkedList values, ByteBuffer* writeBuffer);
int LIB61850_INTERNAL int
mmsClient_createWriteRequestArray(uint32_t invokeId, const char* domainId, const char* itemId, mmsClient_createWriteRequestArray(uint32_t invokeId, const char* domainId, const char* itemId,
int startIndex, int elementCount, int startIndex, int elementCount,
MmsValue* value, ByteBuffer* writeBuffer); MmsValue* value, ByteBuffer* writeBuffer);
int LIB61850_INTERNAL int
mmsClient_createWriteRequestAlternateAccessSingleIndexComponent(uint32_t invokeId, const char* domainId, const char* itemId, mmsClient_createWriteRequestAlternateAccessSingleIndexComponent(uint32_t invokeId, const char* domainId, const char* itemId,
uint32_t arrayIndex, const char* component, uint32_t arrayIndex, const char* component,
MmsValue* value, MmsValue* value,
ByteBuffer* writeBuffer); ByteBuffer* writeBuffer);
void LIB61850_INTERNAL void
mmsClient_createDefineNamedVariableListRequest(uint32_t invokeId, ByteBuffer* writeBuffer, mmsClient_createDefineNamedVariableListRequest(uint32_t invokeId, ByteBuffer* writeBuffer,
const char* domainId, const char* listNameId, LinkedList /*<char*>*/ listOfVariables, const char* domainId, const char* listNameId, LinkedList /*<char*>*/ listOfVariables,
bool associationSpecific); bool associationSpecific);
bool LIB61850_INTERNAL bool
mmsClient_parseDefineNamedVariableResponse(ByteBuffer* message, uint32_t* invokeId); mmsClient_parseDefineNamedVariableResponse(ByteBuffer* message, uint32_t* invokeId);
void LIB61850_INTERNAL void
mmsClient_createDeleteNamedVariableListRequest(long invokeId, ByteBuffer* writeBuffer, mmsClient_createDeleteNamedVariableListRequest(long invokeId, ByteBuffer* writeBuffer,
const char* domainId, const char* listNameId); const char* domainId, const char* listNameId);
bool LIB61850_INTERNAL bool
mmsClient_parseDeleteNamedVariableListResponse(ByteBuffer* message, uint32_t* invokeId); mmsClient_parseDeleteNamedVariableListResponse(ByteBuffer* message, uint32_t* invokeId);
void LIB61850_INTERNAL void
mmsClient_createDeleteAssociationSpecificNamedVariableListRequest( mmsClient_createDeleteAssociationSpecificNamedVariableListRequest(
long invokeId, long invokeId,
ByteBuffer* writeBuffer, ByteBuffer* writeBuffer,
const char* listNameId); const char* listNameId);
void LIB61850_INTERNAL void
mmsClient_createIdentifyRequest(uint32_t invokeId, ByteBuffer* request); 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); 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); 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); 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); 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); mmsClient_createFileReadRequest(uint32_t invokeId, ByteBuffer* request, int32_t frsmId);
void LIB61850_INTERNAL void
mmsClient_createFileCloseRequest(uint32_t invokeId, ByteBuffer* request, int32_t frsmId); 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); 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); 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); 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); 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); mmsClient_parseFileDirectoryResponse(ByteBuffer* response, int bufPos, uint32_t invokeId, MmsConnection_FileDirectoryHandler handler, void* parameter);
bool LIB61850_INTERNAL bool
mmsClient_parseInitiateResponse(MmsConnection self, ByteBuffer* response); mmsClient_parseInitiateResponse(MmsConnection self, ByteBuffer* response);
int LIB61850_INTERNAL int
mmsClient_createConcludeRequest(MmsConnection self, ByteBuffer* message); mmsClient_createConcludeRequest(MmsConnection self, ByteBuffer* message);
int LIB61850_INTERNAL int
mmsClient_createMmsGetNameListRequestAssociationSpecific(long invokeId, ByteBuffer* writeBuffer, mmsClient_createMmsGetNameListRequestAssociationSpecific(long invokeId, ByteBuffer* writeBuffer,
const char* continueAfter); const char* continueAfter);
void LIB61850_INTERNAL void
mmsClient_createReadJournalRequestWithTimeRange(uint32_t invokeId, ByteBuffer* request, const char* domainId, const char* itemId, mmsClient_createReadJournalRequestWithTimeRange(uint32_t invokeId, ByteBuffer* request, const char* domainId, const char* itemId,
MmsValue* startingTime, MmsValue* endingTime); MmsValue* startingTime, MmsValue* endingTime);
void LIB61850_INTERNAL void
mmsClient_createReadJournalRequestStartAfter(uint32_t invokeId, ByteBuffer* request, const char* domainId, const char* itemId, mmsClient_createReadJournalRequestStartAfter(uint32_t invokeId, ByteBuffer* request, const char* domainId, const char* itemId,
MmsValue* timeSpecification, MmsValue* entrySpecification); MmsValue* timeSpecification, MmsValue* entrySpecification);
bool LIB61850_INTERNAL bool
mmsClient_parseReadJournalResponse(MmsConnection self, ByteBuffer* response, int respBufPos, bool* moreFollows, LinkedList* result); mmsClient_parseReadJournalResponse(MmsConnection self, ByteBuffer* response, int respBufPos, bool* moreFollows, LinkedList* result);
LIB61850_INTERNAL void
void
mmsClient_handleFileOpenRequest(MmsConnection connection, mmsClient_handleFileOpenRequest(MmsConnection connection,
uint8_t* buffer, int bufPos, int maxBufPos, uint8_t* buffer, int bufPos, int maxBufPos,
uint32_t invokeId, ByteBuffer* response); uint32_t invokeId, ByteBuffer* response);
void LIB61850_INTERNAL void
mmsClient_handleFileReadRequest( mmsClient_handleFileReadRequest(
MmsConnection connection, MmsConnection connection,
uint8_t* buffer, int bufPos, int maxBufPos, uint8_t* buffer, int bufPos, int maxBufPos,
uint32_t invokeId, uint32_t invokeId,
ByteBuffer* response); ByteBuffer* response);
void LIB61850_INTERNAL void
mmsClient_handleFileCloseRequest( mmsClient_handleFileCloseRequest(
MmsConnection connection, MmsConnection connection,
uint8_t* buffer, int bufPos, int maxBufPos, uint8_t* buffer, int bufPos, int maxBufPos,

@ -52,28 +52,28 @@ typedef struct {
/* include for MmsFileReadHandler definition */ /* include for MmsFileReadHandler definition */
#include "mms_client_connection.h" #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); 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); 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); mmsMsg_createFileReadResponse(int maxPduSize, uint32_t invokeId, ByteBuffer* response, MmsFileReadStateMachine* frsm);
void LIB61850_INTERNAL void
mmsMsg_createFileCloseResponse(uint32_t invokeId, ByteBuffer* response); 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); 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); 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); mmsMsg_createExtendedFilename(const char* basepath, char* extendedFileName, char* fileName);
FileHandle LIB61850_INTERNAL FileHandle
mmsMsg_openFile(const char* basepath, char* fileName, bool readWrite); mmsMsg_openFile(const char* basepath, char* fileName, bool readWrite);
#endif /* (MMS_FILE_SERVICE == 1) */ #endif /* (MMS_FILE_SERVICE == 1) */
@ -84,34 +84,34 @@ typedef struct sMmsServiceError
} MmsServiceError; } MmsServiceError;
void /* Confirmed service error (ServiceError) */ LIB61850_INTERNAL void /* Confirmed service error (ServiceError) */
mmsMsg_createServiceErrorPdu(uint32_t invokeId, ByteBuffer* response, MmsError errorType); mmsMsg_createServiceErrorPdu(uint32_t invokeId, ByteBuffer* response, MmsError errorType);
void LIB61850_INTERNAL void
mmsMsg_createMmsRejectPdu(uint32_t* invokeId, int reason, ByteBuffer* response); 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); 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); 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); mmsMsg_parseDataElement(Data_t* dataElement);
Data_t* LIB61850_INTERNAL Data_t*
mmsMsg_createBasicDataElement(MmsValue* value); mmsMsg_createBasicDataElement(MmsValue* value);
AccessResult_t** LIB61850_INTERNAL AccessResult_t**
mmsMsg_createAccessResultsList(MmsPdu_t* mmsPdu, int resultsCount); mmsMsg_createAccessResultsList(MmsPdu_t* mmsPdu, int resultsCount);
char* LIB61850_INTERNAL char*
mmsMsg_createStringFromAsnIdentifier(Identifier_t identifier); mmsMsg_createStringFromAsnIdentifier(Identifier_t identifier);
void LIB61850_INTERNAL void
mmsMsg_copyAsn1IdentifierToStringBuffer(Identifier_t identifier, char* buffer, int bufSize); mmsMsg_copyAsn1IdentifierToStringBuffer(Identifier_t identifier, char* buffer, int bufSize);
void LIB61850_INTERNAL void
mmsMsg_deleteAccessResultList(AccessResult_t** accessResult, int variableCount); mmsMsg_deleteAccessResultList(AccessResult_t** accessResult, int variableCount);
#endif /* MMS_COMMON_INTERNAL */ #endif /* MMS_COMMON_INTERNAL */

@ -1,7 +1,7 @@
/* /*
* mms_model.h * mms_model.h
* *
* Copyright 2013 Michael Zillgith * Copyright 2013-2018 Michael Zillgith
* *
* This file is part of libIEC61850. * This file is part of libIEC61850.
* *
@ -84,16 +84,16 @@ struct sMmsDomain {
* *
* \return the new MmsDomain instance * \return the new MmsDomain instance
*/ */
MmsDomain* LIB61850_INTERNAL MmsDomain*
MmsDomain_create(char* domainName); MmsDomain_create(char* domainName);
char* LIB61850_INTERNAL char*
MmsDomain_getName(MmsDomain* self); MmsDomain_getName(MmsDomain* self);
void LIB61850_INTERNAL void
MmsDomain_addJournal(MmsDomain* self, const char* name); MmsDomain_addJournal(MmsDomain* self, const char* name);
MmsJournal LIB61850_INTERNAL MmsJournal
MmsDomain_getJournal(MmsDomain* self, const char* name); 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! * This method should not be invoked by client code!
*/ */
void LIB61850_INTERNAL void
MmsDomain_destroy(MmsDomain* self); MmsDomain_destroy(MmsDomain* self);
/** /**
@ -116,7 +116,7 @@ MmsDomain_destroy(MmsDomain* self);
* *
* \return true if operation was successful. * \return true if operation was successful.
*/ */
bool LIB61850_INTERNAL bool
MmsDomain_addNamedVariableList(MmsDomain* self, MmsNamedVariableList variableList); 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. * \param variableListName the name of the variable list to delete.
* *
*/ */
void LIB61850_INTERNAL void
MmsDomain_deleteNamedVariableList(MmsDomain* self, char* variableListName); MmsDomain_deleteNamedVariableList(MmsDomain* self, char* variableListName);
MmsNamedVariableList LIB61850_INTERNAL MmsNamedVariableList
MmsDomain_getNamedVariableList(MmsDomain* self, const char* variableListName); MmsDomain_getNamedVariableList(MmsDomain* self, const char* variableListName);
LinkedList LIB61850_INTERNAL LinkedList
MmsDomain_getNamedVariableLists(MmsDomain* self); MmsDomain_getNamedVariableLists(MmsDomain* self);
LinkedList LIB61850_INTERNAL LinkedList
MmsDomain_getNamedVariableListValues(MmsDomain* self, char* variableListName); MmsDomain_getNamedVariableListValues(MmsDomain* self, char* variableListName);
LinkedList LIB61850_INTERNAL LinkedList
MmsDomain_createNamedVariableListValues(MmsDomain* self, char* variableListName); MmsDomain_createNamedVariableListValues(MmsDomain* self, char* variableListName);
/** /**
@ -151,7 +151,7 @@ MmsDomain_createNamedVariableListValues(MmsDomain* self, char* variableListName)
* *
* \return MmsTypeSpecification instance of the named variable * \return MmsTypeSpecification instance of the named variable
*/ */
MmsVariableSpecification* LIB61850_INTERNAL MmsVariableSpecification*
MmsDomain_getNamedVariable(MmsDomain* self, char* nameId); MmsDomain_getNamedVariable(MmsDomain* self, char* nameId);
/** /**
@ -165,13 +165,13 @@ MmsDomain_getNamedVariable(MmsDomain* self, char* nameId);
* *
* \return the new MmsDevice instance * \return the new MmsDevice instance
*/ */
MmsDevice* LIB61850_INTERNAL MmsDevice*
MmsDevice_create(char* deviceName); MmsDevice_create(char* deviceName);
/** /**
* \brief Delete the MmsDevice instance * \brief Delete the MmsDevice instance
*/ */
void LIB61850_INTERNAL void
MmsDevice_destroy(MmsDevice* self); MmsDevice_destroy(MmsDevice* self);
/** /**
@ -181,7 +181,7 @@ MmsDevice_destroy(MmsDevice* self);
* *
* \return the new MmsDevice instance * \return the new MmsDevice instance
*/ */
MmsDomain* LIB61850_INTERNAL MmsDomain*
MmsDevice_getDomain(MmsDevice* self, const char* domainId); 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 * \return MmsTypeSpecification instance of the named variable
*/ */
MmsVariableSpecification* LIB61850_INTERNAL MmsVariableSpecification*
MmsDevice_getNamedVariable(MmsDevice* self, char* variableName); MmsDevice_getNamedVariable(MmsDevice* self, char* variableName);
LinkedList LIB61850_INTERNAL LinkedList
MmsDevice_getNamedVariableLists(MmsDevice* self); MmsDevice_getNamedVariableLists(MmsDevice* self);
MmsNamedVariableList LIB61850_INTERNAL MmsNamedVariableList
MmsDevice_getNamedVariableListWithName(MmsDevice* self, const char* variableListName); MmsDevice_getNamedVariableListWithName(MmsDevice* self, const char* variableListName);
MmsJournal LIB61850_INTERNAL MmsJournal
MmsJournal_create(const char* name); MmsJournal_create(const char* name);
void LIB61850_INTERNAL void
MmsJournal_destroy(MmsJournal self); MmsJournal_destroy(MmsJournal self);
/**@}*/ /**@}*/

@ -1,7 +1,7 @@
/* /*
* mms_named_variable_list.h * mms_named_variable_list.h
* *
* Copyright 2013 Michael Zillgith * Copyright 2013-2018 Michael Zillgith
* *
* This file is part of libIEC61850. * This file is part of libIEC61850.
* *
@ -43,37 +43,37 @@ struct sMmsNamedVariableList {
LinkedList listOfVariables; LinkedList listOfVariables;
}; };
MmsNamedVariableListEntry LIB61850_INTERNAL MmsNamedVariableListEntry
MmsNamedVariableListEntry_create(MmsAccessSpecifier accessSpecifier); MmsNamedVariableListEntry_create(MmsAccessSpecifier accessSpecifier);
void LIB61850_INTERNAL void
MmsNamedVariableListEntry_destroy(MmsNamedVariableListEntry self); MmsNamedVariableListEntry_destroy(MmsNamedVariableListEntry self);
MmsDomain* LIB61850_INTERNAL MmsDomain*
MmsNamedVariableListEntry_getDomain(MmsNamedVariableListEntry self); MmsNamedVariableListEntry_getDomain(MmsNamedVariableListEntry self);
char* LIB61850_INTERNAL char*
MmsNamedVariableListEntry_getVariableName(MmsNamedVariableListEntry self); MmsNamedVariableListEntry_getVariableName(MmsNamedVariableListEntry self);
MmsNamedVariableList LIB61850_INTERNAL MmsNamedVariableList
MmsNamedVariableList_create(MmsDomain* domain, char* name, bool deletable); MmsNamedVariableList_create(MmsDomain* domain, char* name, bool deletable);
char* LIB61850_INTERNAL char*
MmsNamedVariableList_getName(MmsNamedVariableList self); MmsNamedVariableList_getName(MmsNamedVariableList self);
MmsDomain* LIB61850_INTERNAL MmsDomain*
MmsNamedVariableList_getDomain(MmsNamedVariableList self); MmsNamedVariableList_getDomain(MmsNamedVariableList self);
bool LIB61850_INTERNAL bool
MmsNamedVariableList_isDeletable(MmsNamedVariableList self); MmsNamedVariableList_isDeletable(MmsNamedVariableList self);
void LIB61850_INTERNAL void
MmsNamedVariableList_addVariable(MmsNamedVariableList self, MmsNamedVariableListEntry variable); MmsNamedVariableList_addVariable(MmsNamedVariableList self, MmsNamedVariableListEntry variable);
LinkedList LIB61850_INTERNAL LinkedList
MmsNamedVariableList_getVariableList(MmsNamedVariableList self); MmsNamedVariableList_getVariableList(MmsNamedVariableList self);
void LIB61850_INTERNAL void
MmsNamedVariableList_destroy(MmsNamedVariableList self); MmsNamedVariableList_destroy(MmsNamedVariableList self);
/**@}*/ /**@}*/

@ -1,7 +1,7 @@
/* /*
* mms_server.h * mms_server.h
* *
* Copyright 2013, 2014 Michael Zillgith * Copyright 2013-2018 Michael Zillgith
* *
* This file is part of libIEC61850. * This file is part of libIEC61850.
* *
@ -63,46 +63,46 @@ typedef MmsDataAccessError (*MmsWriteVariableHandler)(void* parameter,
typedef void (*MmsConnectionHandler)(void* parameter, typedef void (*MmsConnectionHandler)(void* parameter,
MmsServerConnection connection, MmsServerEvent event); MmsServerConnection connection, MmsServerEvent event);
MmsServer LIB61850_INTERNAL MmsServer
MmsServer_create(MmsDevice* device, TLSConfiguration tlsConfiguration); MmsServer_create(MmsDevice* device, TLSConfiguration tlsConfiguration);
void LIB61850_INTERNAL void
MmsServer_destroy(MmsServer self); MmsServer_destroy(MmsServer self);
void LIB61850_INTERNAL void
MmsServer_installReadHandler(MmsServer self, MmsReadVariableHandler, MmsServer_installReadHandler(MmsServer self, MmsReadVariableHandler,
void* parameter); void* parameter);
void LIB61850_INTERNAL void
MmsServer_installReadAccessHandler(MmsServer self, MmsReadAccessHandler, void* parameter); MmsServer_installReadAccessHandler(MmsServer self, MmsReadAccessHandler, void* parameter);
void LIB61850_INTERNAL void
MmsServer_installWriteHandler(MmsServer self, MmsWriteVariableHandler, MmsServer_installWriteHandler(MmsServer self, MmsWriteVariableHandler,
void* parameter); void* parameter);
void LIB61850_INTERNAL void
MmsServer_setLocalIpAddress(MmsServer self, const char* localIpAddress); MmsServer_setLocalIpAddress(MmsServer self, const char* localIpAddress);
bool LIB61850_INTERNAL bool
MmsServer_isRunning(MmsServer self); MmsServer_isRunning(MmsServer self);
/** /**
* A connection handler will be invoked whenever a new client connection is opened or closed * A connection handler will be invoked whenever a new client connection is opened or closed
*/ */
void LIB61850_INTERNAL void
MmsServer_installConnectionHandler(MmsServer self, MmsConnectionHandler, MmsServer_installConnectionHandler(MmsServer self, MmsConnectionHandler,
void* parameter); void* parameter);
void LIB61850_INTERNAL void
MmsServer_setClientAuthenticator(MmsServer self, AcseAuthenticator authenticator, void* authenticatorParameter); MmsServer_setClientAuthenticator(MmsServer self, AcseAuthenticator authenticator, void* authenticatorParameter);
MmsDevice* LIB61850_INTERNAL MmsDevice*
MmsServer_getDevice(MmsServer self); MmsServer_getDevice(MmsServer self);
MmsValue* LIB61850_INTERNAL MmsValue*
MmsServer_getValueFromCache(MmsServer self, MmsDomain* domain, const char* itemId); MmsServer_getValueFromCache(MmsServer self, MmsDomain* domain, const char* itemId);
bool LIB61850_INTERNAL bool
MmsServer_isLocked(MmsServer self); MmsServer_isLocked(MmsServer self);
/** /**
@ -127,7 +127,7 @@ typedef MmsError (*MmsNamedVariableListChangedHandler)(void* parameter, bool cre
* \param handler the callback handler function * \param handler the callback handler function
* \param parameter user provided parameter that is passed to the callback handler * \param parameter user provided parameter that is passed to the callback handler
*/ */
void LIB61850_INTERNAL void
MmsServer_installVariableListChangedHandler(MmsServer self, MmsNamedVariableListChangedHandler handler, void* parameter); 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 handler the callback handler function
* \param parameter user provided parameter that is passed to the callback handler * \param parameter user provided parameter that is passed to the callback handler
*/ */
void LIB61850_INTERNAL void
MmsServer_installObtainFileHandler(MmsServer self, MmsObtainFileHandler handler, void* parameter); 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 handler the callback handler function
* \param parameter user provided parameter that is passed to the callback handler * \param parameter user provided parameter that is passed to the callback handler
*/ */
void LIB61850_INTERNAL void
MmsServer_installGetFileCompleteHandler(MmsServer self, MmsGetFileCompleteHandler handler, void* parameter); 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 handler the callback handler function
* \param parameter user provided parameter that is passed to the callback handler * \param parameter user provided parameter that is passed to the callback handler
*/ */
void LIB61850_INTERNAL void
MmsServer_installFileAccessHandler(MmsServer self, MmsFileAccessHandler handler, void* parameter); MmsServer_installFileAccessHandler(MmsServer self, MmsFileAccessHandler handler, void* parameter);
/** /**
@ -222,7 +222,7 @@ MmsServer_installFileAccessHandler(MmsServer self, MmsFileAccessHandler handler,
* \param self the MmsServer instance * \param self the MmsServer instance
* \param basepath the new virtual filestore basepath * \param basepath the new virtual filestore basepath
*/ */
void LIB61850_INTERNAL void
MmsServer_setFilestoreBasepath(MmsServer self, const char* basepath); 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 * \param[in] maxConnections the maximum number of TCP client connections to accept
*/ */
void LIB61850_INTERNAL void
MmsServer_setMaxConnections(MmsServer self, int maxConnections); MmsServer_setMaxConnections(MmsServer self, int maxConnections);
/** /**
@ -241,7 +241,7 @@ MmsServer_setMaxConnections(MmsServer self, int maxConnections);
* \param[in] self the MmsServer instance * \param[in] self the MmsServer instance
* \param[in] enable true to enable file services, false to disable * \param[in] enable true to enable file services, false to disable
*/ */
void LIB61850_INTERNAL void
MmsServer_enableFileService(MmsServer self, bool enable); MmsServer_enableFileService(MmsServer self, bool enable);
/** /**
@ -252,7 +252,7 @@ MmsServer_enableFileService(MmsServer self, bool enable);
* \param[in] self the MmsServer instance * \param[in] self the MmsServer instance
* \param[in] enable true to enable named variable list services, false to disable * \param[in] enable true to enable named variable list services, false to disable
*/ */
void LIB61850_INTERNAL void
MmsServer_enableDynamicNamedVariableListService(MmsServer self, bool enable); MmsServer_enableDynamicNamedVariableListService(MmsServer self, bool enable);
/** /**
@ -261,7 +261,7 @@ MmsServer_enableDynamicNamedVariableListService(MmsServer self, bool enable);
* \param[in] self the MmsServer instance * \param[in] self the MmsServer instance
* \param[in] maxDataSets maximum number association specific data sets * \param[in] maxDataSets maximum number association specific data sets
*/ */
void LIB61850_INTERNAL void
MmsServer_setMaxAssociationSpecificDataSets(MmsServer self, int maxDataSets); MmsServer_setMaxAssociationSpecificDataSets(MmsServer self, int maxDataSets);
/** /**
@ -270,7 +270,7 @@ MmsServer_setMaxAssociationSpecificDataSets(MmsServer self, int maxDataSets);
* \param[in] self the MmsServer instance * \param[in] self the MmsServer instance
* \param[in] maxDataSets maximum number domain specific data sets * \param[in] maxDataSets maximum number domain specific data sets
*/ */
void LIB61850_INTERNAL void
MmsServer_setMaxDomainSpecificDataSets(MmsServer self, int maxDataSets); MmsServer_setMaxDomainSpecificDataSets(MmsServer self, int maxDataSets);
/** /**
@ -279,7 +279,7 @@ MmsServer_setMaxDomainSpecificDataSets(MmsServer self, int maxDataSets);
* \param[in] self the MmsServer instance * \param[in] self the MmsServer instance
* \param[in] maxDataSetEntries maximum number of dynamic data set entries * \param[in] maxDataSetEntries maximum number of dynamic data set entries
*/ */
void LIB61850_INTERNAL void
MmsServer_setMaxDataSetEntries(MmsServer self, int maxDataSetEntries); MmsServer_setMaxDataSetEntries(MmsServer self, int maxDataSetEntries);
/** /**
@ -290,7 +290,7 @@ MmsServer_setMaxDataSetEntries(MmsServer self, int maxDataSetEntries);
* \param[in] self the MmsServer instance * \param[in] self the MmsServer instance
* \param[in] enable true to enable journal service, false to disable * \param[in] enable true to enable journal service, false to disable
*/ */
void LIB61850_INTERNAL void
MmsServer_enableJournalService(MmsServer self, bool enable); MmsServer_enableJournalService(MmsServer self, bool enable);
/** /**
@ -302,7 +302,7 @@ MmsServer_enableJournalService(MmsServer self, bool enable);
* *
* \param self the MmsServer instance to operate on * \param self the MmsServer instance to operate on
*/ */
void LIB61850_INTERNAL void
MmsServer_lockModel(MmsServer self); MmsServer_lockModel(MmsServer self);
/** /**
@ -313,10 +313,10 @@ MmsServer_lockModel(MmsServer self);
* *
* \param self the MmsServer instance to operate on * \param self the MmsServer instance to operate on
*/ */
void LIB61850_INTERNAL void
MmsServer_unlockModel(MmsServer self); MmsServer_unlockModel(MmsServer self);
void LIB61850_INTERNAL void
MmsServer_insertIntoCache(MmsServer self, MmsDomain* domain, char* itemId, MmsServer_insertIntoCache(MmsServer self, MmsDomain* domain, char* itemId,
MmsValue* value); MmsValue* value);
@ -330,7 +330,7 @@ MmsServer_insertIntoCache(MmsServer self, MmsDomain* domain, char* itemId,
* \param self the MmsServer instance to operate on * \param self the MmsServer instance to operate on
* \param tcpPort the TCP port the server is listening on. * \param tcpPort the TCP port the server is listening on.
*/ */
void LIB61850_INTERNAL void
MmsServer_startListening(MmsServer self, int tcpPort); MmsServer_startListening(MmsServer self, int tcpPort);
/** /**
@ -338,7 +338,7 @@ MmsServer_startListening(MmsServer self, int tcpPort);
* *
* \param self the MmsServer instance to operate on * \param self the MmsServer instance to operate on
*/ */
void LIB61850_INTERNAL void
MmsServer_stopListening(MmsServer self); MmsServer_stopListening(MmsServer self);
/*************************************************** /***************************************************
@ -351,7 +351,7 @@ MmsServer_stopListening(MmsServer self);
* \param self the MmsServer instance to operate on * \param self the MmsServer instance to operate on
* \param tcpPort the TCP port the server is listening on. * \param tcpPort the TCP port the server is listening on.
*/ */
void LIB61850_INTERNAL void
MmsServer_startListeningThreadless(MmsServer self, int tcpPort); MmsServer_startListeningThreadless(MmsServer self, int tcpPort);
/** /**
@ -361,7 +361,7 @@ MmsServer_startListeningThreadless(MmsServer self, int tcpPort);
* \param timeoutMs maximum number of milliseconds to wait * \param timeoutMs maximum number of milliseconds to wait
* \return 1 if the server is ready, 0 if not or -1 on error * \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); 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 * \param self the MmsServer instance to operate on
*/ */
void LIB61850_INTERNAL void
MmsServer_handleIncomingMessages(MmsServer self); MmsServer_handleIncomingMessages(MmsServer self);
/** /**
@ -380,7 +380,7 @@ MmsServer_handleIncomingMessages(MmsServer self);
* *
* \param self the MmsServer instance to operate on * \param self the MmsServer instance to operate on
*/ */
void LIB61850_INTERNAL void
MmsServer_handleBackgroundTasks(MmsServer self); MmsServer_handleBackgroundTasks(MmsServer self);
/** /**
@ -388,7 +388,7 @@ MmsServer_handleBackgroundTasks(MmsServer self);
* *
* \param self the MmsServer instance to operate on * \param self the MmsServer instance to operate on
*/ */
void LIB61850_INTERNAL void
MmsServer_stopListeningThreadless(MmsServer self); MmsServer_stopListeningThreadless(MmsServer self);
@ -407,7 +407,7 @@ MmsServer_stopListeningThreadless(MmsServer self);
* \param modelName the model name attribute of the VMD * \param modelName the model name attribute of the VMD
* \param revision the revision 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); 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 * \param self the MmsServer instance to operate on
* \return the vendor name attribute of the VMD as C string * \return the vendor name attribute of the VMD as C string
*/ */
char* LIB61850_INTERNAL char*
MmsServer_getVendorName(MmsServer self); MmsServer_getVendorName(MmsServer self);
/** /**
@ -425,7 +425,7 @@ MmsServer_getVendorName(MmsServer self);
* \param self the MmsServer instance to operate on * \param self the MmsServer instance to operate on
* \return the model name attribute of the VMD as C string * \return the model name attribute of the VMD as C string
*/ */
char* LIB61850_INTERNAL char*
MmsServer_getModelName(MmsServer self); MmsServer_getModelName(MmsServer self);
/** /**
@ -434,7 +434,7 @@ MmsServer_getModelName(MmsServer self);
* \param self the MmsServer instance to operate on * \param self the MmsServer instance to operate on
* \return the revision attribute of the VMD as C string * \return the revision attribute of the VMD as C string
*/ */
char* LIB61850_INTERNAL char*
MmsServer_getRevision(MmsServer self); 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 vmdLogicalStatus the logical status attribute of the VMD
* \param vmdPhysicalStatus the physical 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); 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 * \param self the MmsServer instance to operate on
*/ */
int LIB61850_INTERNAL int
MmsServer_getVMDLogicalStatus(MmsServer self); MmsServer_getVMDLogicalStatus(MmsServer self);
/** /**
@ -487,7 +487,7 @@ MmsServer_getVMDLogicalStatus(MmsServer self);
* *
* \param self the MmsServer instance to operate on * \param self the MmsServer instance to operate on
*/ */
int LIB61850_INTERNAL int
MmsServer_getVMDPhysicalStatus(MmsServer self); 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 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 * \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); MmsServer_setStatusRequestListener(MmsServer self, MmsStatusRequestListener listener, void* parameter);
char* LIB61850_INTERNAL char*
MmsServerConnection_getClientAddress(MmsServerConnection self); MmsServerConnection_getClientAddress(MmsServerConnection self);
IsoConnection LIB61850_INTERNAL IsoConnection
MmsServerConnection_getIsoConnection(MmsServerConnection self); MmsServerConnection_getIsoConnection(MmsServerConnection self);

@ -1,7 +1,7 @@
/* /*
* mms_server_connection.h * mms_server_connection.h
* *
* Copyright 2013 Michael Zillgith * Copyright 2013-2018 Michael Zillgith
* *
* This file is part of libIEC61850. * This file is part of libIEC61850.
* *
@ -42,29 +42,29 @@
extern "C" { extern "C" {
#endif #endif
MmsServerConnection LIB61850_INTERNAL MmsServerConnection
MmsServerConnection_init(MmsServerConnection connection, MmsServer server, IsoConnection isoCon); MmsServerConnection_init(MmsServerConnection connection, MmsServer server, IsoConnection isoCon);
void LIB61850_INTERNAL void
MmsServerConnection_destroy(MmsServerConnection connection); MmsServerConnection_destroy(MmsServerConnection connection);
bool LIB61850_INTERNAL bool
MmsServerConnection_addNamedVariableList(MmsServerConnection self, MmsNamedVariableList variableList); MmsServerConnection_addNamedVariableList(MmsServerConnection self, MmsNamedVariableList variableList);
MmsNamedVariableList LIB61850_INTERNAL MmsNamedVariableList
MmsServerConnection_getNamedVariableList(MmsServerConnection self, const char* variableListName); MmsServerConnection_getNamedVariableList(MmsServerConnection self, const char* variableListName);
LinkedList LIB61850_INTERNAL LinkedList
MmsServerConnection_getNamedVariableLists(MmsServerConnection self); MmsServerConnection_getNamedVariableLists(MmsServerConnection self);
void LIB61850_INTERNAL void
MmsServerConnection_deleteNamedVariableList(MmsServerConnection self, char* listName); MmsServerConnection_deleteNamedVariableList(MmsServerConnection self, char* listName);
/** \brief send information report for a single VMD specific variable /** \brief send information report for a single VMD specific variable
* *
* \param handlerMode send this message in the context of a stack callback handler * \param handlerMode send this message in the context of a stack callback handler
*/ */
void LIB61850_INTERNAL void
MmsServerConnection_sendInformationReportSingleVariableVMDSpecific(MmsServerConnection self, MmsServerConnection_sendInformationReportSingleVariableVMDSpecific(MmsServerConnection self,
char* itemId, MmsValue* value, bool handlerMode); 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 * \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 MmsServerConnection_sendInformationReportVMDSpecific(MmsServerConnection self, char* itemId, LinkedList values
, bool handlerMode); , bool handlerMode);
@ -81,7 +81,7 @@ MmsServerConnection_sendInformationReportVMDSpecific(MmsServerConnection self, c
* *
* \param handlerMode send this message in the context of a stack callback handler * \param handlerMode send this message in the context of a stack callback handler
*/ */
void LIB61850_INTERNAL void
MmsServerConnection_sendInformationReportListOfVariables( MmsServerConnection_sendInformationReportListOfVariables(
MmsServerConnection self, MmsServerConnection self,
LinkedList /* MmsVariableAccessSpecification */ variableAccessDeclarations, LinkedList /* MmsVariableAccessSpecification */ variableAccessDeclarations,
@ -89,18 +89,18 @@ MmsServerConnection_sendInformationReportListOfVariables(
bool handlerMode bool handlerMode
); );
void LIB61850_INTERNAL void
MmsServerConnection_sendWriteResponse(MmsServerConnection self, uint32_t invokeId, MmsDataAccessError indication, MmsServerConnection_sendWriteResponse(MmsServerConnection self, uint32_t invokeId, MmsDataAccessError indication,
bool handlerMode); bool handlerMode);
uint32_t LIB61850_INTERNAL uint32_t
MmsServerConnection_getLastInvokeId(MmsServerConnection self); MmsServerConnection_getLastInvokeId(MmsServerConnection self);
uint32_t LIB61850_INTERNAL uint32_t
MmsServerConnection_getNextRequestInvokeId(MmsServerConnection self); MmsServerConnection_getNextRequestInvokeId(MmsServerConnection self);
const char* LIB61850_INTERNAL const char*
MmsServerConnection_getFilesystemBasepath(MmsServerConnection self); MmsServerConnection_getFilesystemBasepath(MmsServerConnection self);
#ifdef __cplusplus #ifdef __cplusplus

@ -200,99 +200,99 @@ struct sMmsServerConnection {
}; };
#if (MMS_OBTAIN_FILE_SERVICE == 1) #if (MMS_OBTAIN_FILE_SERVICE == 1)
MmsObtainFileTask LIB61850_INTERNAL MmsObtainFileTask
MmsServer_getObtainFileTask(MmsServer self); MmsServer_getObtainFileTask(MmsServer self);
void LIB61850_INTERNAL void
mmsServer_fileUploadTask(MmsServer self, MmsObtainFileTask task); mmsServer_fileUploadTask(MmsServer self, MmsObtainFileTask task);
#endif #endif
ByteBuffer* LIB61850_INTERNAL ByteBuffer*
MmsServer_reserveTransmitBuffer(MmsServer self); MmsServer_reserveTransmitBuffer(MmsServer self);
void LIB61850_INTERNAL void
MmsServer_releaseTransmitBuffer(MmsServer self); MmsServer_releaseTransmitBuffer(MmsServer self);
/* write_out function required for ASN.1 encoding */ /* write_out function required for ASN.1 encoding */
int LIB61850_INTERNAL int
mmsServer_write_out(const void *buffer, size_t size, void *app_key); mmsServer_write_out(const void *buffer, size_t size, void *app_key);
void LIB61850_INTERNAL void
mmsServer_handleDeleteNamedVariableListRequest(MmsServerConnection connection, mmsServer_handleDeleteNamedVariableListRequest(MmsServerConnection connection,
uint8_t* buffer, int bufPos, int maxBufPos, uint8_t* buffer, int bufPos, int maxBufPos,
uint32_t invokeId, uint32_t invokeId,
ByteBuffer* response); ByteBuffer* response);
void LIB61850_INTERNAL void
mmsServer_handleGetNamedVariableListAttributesRequest( mmsServer_handleGetNamedVariableListAttributesRequest(
MmsServerConnection connection, MmsServerConnection connection,
uint8_t* buffer, int bufPos, int maxBufPos, uint8_t* buffer, int bufPos, int maxBufPos,
uint32_t invokeId, uint32_t invokeId,
ByteBuffer* response); ByteBuffer* response);
void LIB61850_INTERNAL void
mmsServer_handleReadRequest( mmsServer_handleReadRequest(
MmsServerConnection connection, MmsServerConnection connection,
uint8_t* buffer, int bufPos, int maxBufPos, uint8_t* buffer, int bufPos, int maxBufPos,
uint32_t invokeId, uint32_t invokeId,
ByteBuffer* response); ByteBuffer* response);
MmsPdu_t* LIB61850_INTERNAL MmsPdu_t*
mmsServer_createConfirmedResponse(uint32_t invokeId); mmsServer_createConfirmedResponse(uint32_t invokeId);
void LIB61850_INTERNAL void
mmsMsg_createServiceErrorPdu(uint32_t invokeId, ByteBuffer* response, MmsError errorType); mmsMsg_createServiceErrorPdu(uint32_t invokeId, ByteBuffer* response, MmsError errorType);
void LIB61850_INTERNAL void
mmsServer_createServiceErrorPduWithServiceSpecificInfo(uint32_t invokeId, ByteBuffer* response, mmsServer_createServiceErrorPduWithServiceSpecificInfo(uint32_t invokeId, ByteBuffer* response,
MmsError errorType, uint8_t* serviceSpecificInfo, int serviceSpecficInfoLength); MmsError errorType, uint8_t* serviceSpecificInfo, int serviceSpecficInfoLength);
void LIB61850_INTERNAL void
mmsServer_writeConcludeResponsePdu(ByteBuffer* response); mmsServer_writeConcludeResponsePdu(ByteBuffer* response);
void LIB61850_INTERNAL void
mmsServer_handleInitiateRequest ( mmsServer_handleInitiateRequest (
MmsServerConnection self, MmsServerConnection self,
uint8_t* buffer, int bufPos, int maxBufPos, uint8_t* buffer, int bufPos, int maxBufPos,
ByteBuffer* response); ByteBuffer* response);
int LIB61850_INTERNAL int
mmsServer_handleGetVariableAccessAttributesRequest( mmsServer_handleGetVariableAccessAttributesRequest(
MmsServerConnection connection, MmsServerConnection connection,
uint8_t* buffer, int bufPos, int maxBufPos, uint8_t* buffer, int bufPos, int maxBufPos,
uint32_t invokeId, uint32_t invokeId,
ByteBuffer* response); ByteBuffer* response);
void LIB61850_INTERNAL void
mmsServer_handleDefineNamedVariableListRequest( mmsServer_handleDefineNamedVariableListRequest(
MmsServerConnection connection, MmsServerConnection connection,
uint8_t* buffer, int bufPos, int maxBufPos, uint8_t* buffer, int bufPos, int maxBufPos,
uint32_t invokeId, uint32_t invokeId,
ByteBuffer* response); ByteBuffer* response);
void LIB61850_INTERNAL void
mmsServer_handleGetNameListRequest( mmsServer_handleGetNameListRequest(
MmsServerConnection connection, MmsServerConnection connection,
uint8_t* buffer, int bufPos, int maxBufPos, uint8_t* buffer, int bufPos, int maxBufPos,
uint32_t invokeId, uint32_t invokeId,
ByteBuffer* response); ByteBuffer* response);
void LIB61850_INTERNAL void
mmsServer_handleWriteRequest( mmsServer_handleWriteRequest(
MmsServerConnection connection, MmsServerConnection connection,
uint8_t* buffer, int bufPos, int maxBufPos, uint8_t* buffer, int bufPos, int maxBufPos,
uint32_t invokeId, uint32_t invokeId,
ByteBuffer* response); ByteBuffer* response);
void LIB61850_INTERNAL void
mmsServer_handleIdentifyRequest( mmsServer_handleIdentifyRequest(
MmsServerConnection connection, MmsServerConnection connection,
uint32_t invokeId, uint32_t invokeId,
ByteBuffer* response); ByteBuffer* response);
void LIB61850_INTERNAL void
mmsServer_handleStatusRequest( mmsServer_handleStatusRequest(
MmsServerConnection connection, MmsServerConnection connection,
uint8_t* requestBuffer, uint8_t* requestBuffer,
@ -300,7 +300,7 @@ mmsServer_handleStatusRequest(
uint32_t invokeId, uint32_t invokeId,
ByteBuffer* response); ByteBuffer* response);
void LIB61850_INTERNAL void
mmsServer_handleReadJournalRequest( mmsServer_handleReadJournalRequest(
MmsServerConnection connection, MmsServerConnection connection,
uint8_t* requestBuffer, uint8_t* requestBuffer,
@ -308,85 +308,85 @@ mmsServer_handleReadJournalRequest(
uint32_t invokeId, uint32_t invokeId,
ByteBuffer* response); ByteBuffer* response);
void LIB61850_INTERNAL void
mmsServer_handleFileDirectoryRequest( mmsServer_handleFileDirectoryRequest(
MmsServerConnection connection, MmsServerConnection connection,
uint8_t* buffer, int bufPos, int maxBufPos, uint8_t* buffer, int bufPos, int maxBufPos,
uint32_t invokeId, uint32_t invokeId,
ByteBuffer* response); ByteBuffer* response);
void LIB61850_INTERNAL void
mmsServer_handleFileOpenRequest( mmsServer_handleFileOpenRequest(
MmsServerConnection connection, MmsServerConnection connection,
uint8_t* buffer, int bufPos, int maxBufPos, uint8_t* buffer, int bufPos, int maxBufPos,
uint32_t invokeId, uint32_t invokeId,
ByteBuffer* response); ByteBuffer* response);
void LIB61850_INTERNAL void
mmsServer_handleFileDeleteRequest( mmsServer_handleFileDeleteRequest(
MmsServerConnection connection, MmsServerConnection connection,
uint8_t* buffer, int bufPos, int maxBufPos, uint8_t* buffer, int bufPos, int maxBufPos,
uint32_t invokeId, uint32_t invokeId,
ByteBuffer* response); ByteBuffer* response);
void LIB61850_INTERNAL void
mmsServer_handleFileRenameRequest( mmsServer_handleFileRenameRequest(
MmsServerConnection connection, MmsServerConnection connection,
uint8_t* buffer, int bufPos, int maxBufPos, uint8_t* buffer, int bufPos, int maxBufPos,
uint32_t invokeId, uint32_t invokeId,
ByteBuffer* response); ByteBuffer* response);
void LIB61850_INTERNAL void
mmsServer_handleFileReadRequest( mmsServer_handleFileReadRequest(
MmsServerConnection connection, MmsServerConnection connection,
uint8_t* buffer, int bufPos, int maxBufPos, uint8_t* buffer, int bufPos, int maxBufPos,
uint32_t invokeId, uint32_t invokeId,
ByteBuffer* response); ByteBuffer* response);
void LIB61850_INTERNAL void
mmsServer_handleFileCloseRequest( mmsServer_handleFileCloseRequest(
MmsServerConnection connection, MmsServerConnection connection,
uint8_t* buffer, int bufPos, int maxBufPos, uint8_t* buffer, int bufPos, int maxBufPos,
uint32_t invokeId, uint32_t invokeId,
ByteBuffer* response); ByteBuffer* response);
void LIB61850_INTERNAL void
mmsServer_handleObtainFileRequest( mmsServer_handleObtainFileRequest(
MmsServerConnection connection, MmsServerConnection connection,
uint8_t* buffer, int bufPos, int maxBufPos, uint8_t* buffer, int bufPos, int maxBufPos,
uint32_t invokeId, uint32_t invokeId,
ByteBuffer* response); ByteBuffer* response);
int LIB61850_INTERNAL int
mmsServer_isIndexAccess(AlternateAccess_t* alternateAccess); mmsServer_isIndexAccess(AlternateAccess_t* alternateAccess);
int LIB61850_INTERNAL int
mmsServer_getLowIndex(AlternateAccess_t* alternateAccess); mmsServer_getLowIndex(AlternateAccess_t* alternateAccess);
int LIB61850_INTERNAL int
mmsServer_getNumberOfElements(AlternateAccess_t* alternateAccess); mmsServer_getNumberOfElements(AlternateAccess_t* alternateAccess);
MmsNamedVariableList LIB61850_INTERNAL MmsNamedVariableList
mmsServer_getNamedVariableListWithName(LinkedList namedVariableLists, const char* variableListName); mmsServer_getNamedVariableListWithName(LinkedList namedVariableLists, const char* variableListName);
void LIB61850_INTERNAL void
mmsServer_deleteVariableList(LinkedList namedVariableLists, char* variableListName); mmsServer_deleteVariableList(LinkedList namedVariableLists, char* variableListName);
MmsDataAccessError LIB61850_INTERNAL MmsDataAccessError
mmsServer_setValue(MmsServer self, MmsDomain* domain, char* itemId, MmsValue* value, mmsServer_setValue(MmsServer self, MmsDomain* domain, char* itemId, MmsValue* value,
MmsServerConnection connection); MmsServerConnection connection);
MmsValue* LIB61850_INTERNAL MmsValue*
mmsServer_getValue(MmsServer self, MmsDomain* domain, char* itemId, MmsServerConnection connection); mmsServer_getValue(MmsServer self, MmsDomain* domain, char* itemId, MmsServerConnection connection);
void LIB61850_INTERNAL void
mmsServer_createMmsWriteResponse(MmsServerConnection connection, mmsServer_createMmsWriteResponse(MmsServerConnection connection,
uint32_t invokeId, ByteBuffer* response, int numberOfItems, MmsDataAccessError* accessResults); uint32_t invokeId, ByteBuffer* response, int numberOfItems, MmsDataAccessError* accessResults);
void LIB61850_INTERNAL void
mmsMsg_createMmsRejectPdu(uint32_t* invokeId, int reason, ByteBuffer* response); mmsMsg_createMmsRejectPdu(uint32_t* invokeId, int reason, ByteBuffer* response);
MmsError LIB61850_INTERNAL MmsError
mmsServer_callVariableListChangedHandler(bool create, MmsVariableListType listType, MmsDomain* domain, mmsServer_callVariableListChangedHandler(bool create, MmsVariableListType listType, MmsDomain* domain,
char* listName, MmsServerConnection connection); char* listName, MmsServerConnection connection);

@ -29,16 +29,16 @@
typedef struct sMmsValueCache* MmsValueCache; typedef struct sMmsValueCache* MmsValueCache;
MmsValueCache LIB61850_INTERNAL MmsValueCache
MmsValueCache_create(MmsDomain* domain); MmsValueCache_create(MmsDomain* domain);
void LIB61850_INTERNAL void
MmsValueCache_insertValue(MmsValueCache self, char* itemId, MmsValue* value); MmsValueCache_insertValue(MmsValueCache self, char* itemId, MmsValue* value);
MmsValue* LIB61850_INTERNAL MmsValue*
MmsValueCache_lookupValue(MmsValueCache self, const char* itemId); MmsValueCache_lookupValue(MmsValueCache self, const char* itemId);
void LIB61850_INTERNAL void
MmsValueCache_destroy(MmsValueCache self); MmsValueCache_destroy(MmsValueCache self);
#endif /* MMS_VARIABLE_CACHE_H_ */ #endif /* MMS_VARIABLE_CACHE_H_ */

@ -25,6 +25,7 @@
#define MMS_VALUE_INTERNAL_H_ #define MMS_VALUE_INTERNAL_H_
#include "mms_value.h" #include "mms_value.h"
#include "ber_integer.h"
struct ATTRIBUTE_PACKED sMmsValue { struct ATTRIBUTE_PACKED sMmsValue {
MmsType type; 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_ */ #endif /* MMS_VALUE_INTERNAL_H_ */

@ -78,7 +78,7 @@ typedef struct AccessResult {
} AccessResult_t; } AccessResult_t;
/* Implementation */ /* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_AccessResult; LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_AccessResult;
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -43,7 +43,7 @@ typedef struct Address {
} Address_t; } Address_t;
/* Implementation */ /* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_Address; LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_Address;
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -58,7 +58,7 @@ typedef struct AlternateAccess {
} AlternateAccess_t; } AlternateAccess_t;
/* Implementation */ /* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_AlternateAccess; LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_AlternateAccess;
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -99,7 +99,7 @@ typedef struct AlternateAccessSelection {
} AlternateAccessSelection_t; } AlternateAccessSelection_t;
/* Implementation */ /* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_AlternateAccessSelection; LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_AlternateAccessSelection;
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -20,11 +20,11 @@ typedef struct BIT_STRING_s {
asn_struct_ctx_t _asn_ctx; /* Parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; /* Parsing across buffer boundaries */
} BIT_STRING_t; } 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 */ LIB61850_INTERNAL asn_struct_print_f BIT_STRING_print; /* Human-readable output */
asn_constr_check_f BIT_STRING_constraint; LIB61850_INTERNAL asn_constr_check_f BIT_STRING_constraint;
xer_type_encoder_f BIT_STRING_encode_xer; LIB61850_INTERNAL xer_type_encoder_f BIT_STRING_encode_xer;
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -20,14 +20,14 @@ typedef int BOOLEAN_t;
extern asn_TYPE_descriptor_t asn_DEF_BOOLEAN; extern asn_TYPE_descriptor_t asn_DEF_BOOLEAN;
asn_struct_free_f BOOLEAN_free; LIB61850_INTERNAL asn_struct_free_f BOOLEAN_free;
asn_struct_print_f BOOLEAN_print; LIB61850_INTERNAL asn_struct_print_f BOOLEAN_print;
ber_type_decoder_f BOOLEAN_decode_ber; LIB61850_INTERNAL ber_type_decoder_f BOOLEAN_decode_ber;
der_type_encoder_f BOOLEAN_encode_der; LIB61850_INTERNAL der_type_encoder_f BOOLEAN_encode_der;
xer_type_decoder_f BOOLEAN_decode_xer; LIB61850_INTERNAL xer_type_decoder_f BOOLEAN_decode_xer;
xer_type_encoder_f BOOLEAN_encode_xer; LIB61850_INTERNAL xer_type_encoder_f BOOLEAN_encode_xer;
per_type_decoder_f BOOLEAN_decode_uper; LIB61850_INTERNAL per_type_decoder_f BOOLEAN_decode_uper;
per_type_encoder_f BOOLEAN_encode_uper; LIB61850_INTERNAL per_type_encoder_f BOOLEAN_encode_uper;
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -22,14 +22,14 @@ extern "C" {
typedef NULL_t ConcludeRequestPDU_t; typedef NULL_t ConcludeRequestPDU_t;
/* Implementation */ /* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_ConcludeRequestPDU; LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ConcludeRequestPDU;
asn_struct_free_f ConcludeRequestPDU_free; LIB61850_INTERNAL asn_struct_free_f ConcludeRequestPDU_free;
asn_struct_print_f ConcludeRequestPDU_print; LIB61850_INTERNAL asn_struct_print_f ConcludeRequestPDU_print;
asn_constr_check_f ConcludeRequestPDU_constraint; LIB61850_INTERNAL asn_constr_check_f ConcludeRequestPDU_constraint;
ber_type_decoder_f ConcludeRequestPDU_decode_ber; LIB61850_INTERNAL ber_type_decoder_f ConcludeRequestPDU_decode_ber;
der_type_encoder_f ConcludeRequestPDU_encode_der; LIB61850_INTERNAL der_type_encoder_f ConcludeRequestPDU_encode_der;
xer_type_decoder_f ConcludeRequestPDU_decode_xer; LIB61850_INTERNAL xer_type_decoder_f ConcludeRequestPDU_decode_xer;
xer_type_encoder_f ConcludeRequestPDU_encode_xer; LIB61850_INTERNAL xer_type_encoder_f ConcludeRequestPDU_encode_xer;
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -22,14 +22,14 @@ extern "C" {
typedef NULL_t ConcludeResponsePDU_t; typedef NULL_t ConcludeResponsePDU_t;
/* Implementation */ /* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_ConcludeResponsePDU; LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ConcludeResponsePDU;
asn_struct_free_f ConcludeResponsePDU_free; LIB61850_INTERNAL asn_struct_free_f ConcludeResponsePDU_free;
asn_struct_print_f ConcludeResponsePDU_print; LIB61850_INTERNAL asn_struct_print_f ConcludeResponsePDU_print;
asn_constr_check_f ConcludeResponsePDU_constraint; LIB61850_INTERNAL asn_constr_check_f ConcludeResponsePDU_constraint;
ber_type_decoder_f ConcludeResponsePDU_decode_ber; LIB61850_INTERNAL ber_type_decoder_f ConcludeResponsePDU_decode_ber;
der_type_encoder_f ConcludeResponsePDU_encode_der; LIB61850_INTERNAL der_type_encoder_f ConcludeResponsePDU_encode_der;
xer_type_decoder_f ConcludeResponsePDU_decode_xer; LIB61850_INTERNAL xer_type_decoder_f ConcludeResponsePDU_decode_xer;
xer_type_encoder_f ConcludeResponsePDU_encode_xer; LIB61850_INTERNAL xer_type_encoder_f ConcludeResponsePDU_encode_xer;
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -30,7 +30,7 @@ typedef struct ConfirmedErrorPDU {
} ConfirmedErrorPDU_t; } ConfirmedErrorPDU_t;
/* Implementation */ /* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_ConfirmedErrorPDU; LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ConfirmedErrorPDU;
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -30,7 +30,7 @@ typedef struct ConfirmedRequestPdu {
} ConfirmedRequestPdu_t; } ConfirmedRequestPdu_t;
/* Implementation */ /* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_ConfirmedRequestPdu; LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ConfirmedRequestPdu;
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -30,7 +30,7 @@ typedef struct ConfirmedResponsePdu {
} ConfirmedResponsePdu_t; } ConfirmedResponsePdu_t;
/* Implementation */ /* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_ConfirmedResponsePdu; LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ConfirmedResponsePdu;
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -55,7 +55,7 @@ typedef struct ConfirmedServiceRequest {
} ConfirmedServiceRequest_t; } ConfirmedServiceRequest_t;
/* Implementation */ /* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_ConfirmedServiceRequest; LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ConfirmedServiceRequest;
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -55,7 +55,7 @@ typedef struct ConfirmedServiceResponse {
} ConfirmedServiceResponse_t; } ConfirmedServiceResponse_t;
/* Implementation */ /* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_ConfirmedServiceResponse; LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_ConfirmedServiceResponse;
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -77,7 +77,7 @@ typedef struct Data {
} Data_t; } Data_t;
/* Implementation */ /* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_Data; LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_Data;
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -38,14 +38,14 @@ typedef enum DataAccessError {
typedef INTEGER_t DataAccessError_t; typedef INTEGER_t DataAccessError_t;
/* Implementation */ /* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_DataAccessError; LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_DataAccessError;
asn_struct_free_f DataAccessError_free; LIB61850_INTERNAL asn_struct_free_f DataAccessError_free;
asn_struct_print_f DataAccessError_print; LIB61850_INTERNAL asn_struct_print_f DataAccessError_print;
asn_constr_check_f DataAccessError_constraint; LIB61850_INTERNAL asn_constr_check_f DataAccessError_constraint;
ber_type_decoder_f DataAccessError_decode_ber; LIB61850_INTERNAL ber_type_decoder_f DataAccessError_decode_ber;
der_type_encoder_f DataAccessError_encode_der; LIB61850_INTERNAL der_type_encoder_f DataAccessError_encode_der;
xer_type_decoder_f DataAccessError_decode_xer; LIB61850_INTERNAL xer_type_decoder_f DataAccessError_decode_xer;
xer_type_encoder_f DataAccessError_encode_xer; LIB61850_INTERNAL xer_type_encoder_f DataAccessError_encode_xer;
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -31,7 +31,7 @@ typedef struct DataSequence {
} DataSequence_t; } DataSequence_t;
/* Implementation */ /* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_DataSequence; LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_DataSequence;
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -48,7 +48,7 @@ typedef struct DefineNamedVariableListRequest {
} DefineNamedVariableListRequest_t; } DefineNamedVariableListRequest_t;
/* Implementation */ /* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_DefineNamedVariableListRequest; LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_DefineNamedVariableListRequest;
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -22,14 +22,14 @@ extern "C" {
typedef NULL_t DefineNamedVariableListResponse_t; typedef NULL_t DefineNamedVariableListResponse_t;
/* Implementation */ /* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_DefineNamedVariableListResponse; LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_DefineNamedVariableListResponse;
asn_struct_free_f DefineNamedVariableListResponse_free; LIB61850_INTERNAL asn_struct_free_f DefineNamedVariableListResponse_free;
asn_struct_print_f DefineNamedVariableListResponse_print; LIB61850_INTERNAL asn_struct_print_f DefineNamedVariableListResponse_print;
asn_constr_check_f DefineNamedVariableListResponse_constraint; LIB61850_INTERNAL asn_constr_check_f DefineNamedVariableListResponse_constraint;
ber_type_decoder_f DefineNamedVariableListResponse_decode_ber; LIB61850_INTERNAL ber_type_decoder_f DefineNamedVariableListResponse_decode_ber;
der_type_encoder_f DefineNamedVariableListResponse_encode_der; LIB61850_INTERNAL der_type_encoder_f DefineNamedVariableListResponse_encode_der;
xer_type_decoder_f DefineNamedVariableListResponse_decode_xer; LIB61850_INTERNAL xer_type_decoder_f DefineNamedVariableListResponse_decode_xer;
xer_type_encoder_f DefineNamedVariableListResponse_encode_xer; LIB61850_INTERNAL xer_type_encoder_f DefineNamedVariableListResponse_encode_xer;
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -51,7 +51,7 @@ typedef struct DeleteNamedVariableListRequest {
} DeleteNamedVariableListRequest_t; } DeleteNamedVariableListRequest_t;
/* Implementation */ /* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_DeleteNamedVariableListRequest; LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_DeleteNamedVariableListRequest;
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -29,7 +29,7 @@ typedef struct DeleteNamedVariableListResponse {
} DeleteNamedVariableListResponse_t; } DeleteNamedVariableListResponse_t;
/* Implementation */ /* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_DeleteNamedVariableListResponse; LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_DeleteNamedVariableListResponse;
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -22,14 +22,14 @@ extern "C" {
typedef OCTET_STRING_t FloatingPoint_t; typedef OCTET_STRING_t FloatingPoint_t;
/* Implementation */ /* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_FloatingPoint; LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_FloatingPoint;
asn_struct_free_f FloatingPoint_free; LIB61850_INTERNAL asn_struct_free_f FloatingPoint_free;
asn_struct_print_f FloatingPoint_print; LIB61850_INTERNAL asn_struct_print_f FloatingPoint_print;
asn_constr_check_f FloatingPoint_constraint; LIB61850_INTERNAL asn_constr_check_f FloatingPoint_constraint;
ber_type_decoder_f FloatingPoint_decode_ber; LIB61850_INTERNAL ber_type_decoder_f FloatingPoint_decode_ber;
der_type_encoder_f FloatingPoint_encode_der; LIB61850_INTERNAL der_type_encoder_f FloatingPoint_encode_der;
xer_type_decoder_f FloatingPoint_decode_xer; LIB61850_INTERNAL xer_type_decoder_f FloatingPoint_decode_xer;
xer_type_encoder_f FloatingPoint_encode_xer; LIB61850_INTERNAL xer_type_encoder_f FloatingPoint_encode_xer;
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -13,12 +13,12 @@ extern "C" {
typedef OCTET_STRING_t GeneralizedTime_t; /* Implemented via OCTET STRING */ 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; LIB61850_INTERNAL asn_struct_print_f GeneralizedTime_print;
asn_constr_check_f GeneralizedTime_constraint; LIB61850_INTERNAL asn_constr_check_f GeneralizedTime_constraint;
der_type_encoder_f GeneralizedTime_encode_der; LIB61850_INTERNAL der_type_encoder_f GeneralizedTime_encode_der;
xer_type_encoder_f GeneralizedTime_encode_xer; LIB61850_INTERNAL xer_type_encoder_f GeneralizedTime_encode_xer;
/*********************** /***********************
* Some handy helpers. * * Some handy helpers. *
@ -33,11 +33,11 @@ struct tm; /* <time.h> */
* instead of default local one. * instead of default local one.
* On error returns -1 and errno set to EINVAL * 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); int as_gmt);
/* A version of the above function also returning the fractions of seconds */ /* 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)) */ int *frac_value, int *frac_digits, /* (value / (10 ^ digits)) */
struct tm *_optional_tm4fill, int as_gmt); 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 * For example, parsing of the time ending with ".1" seconds
* with frac_digits=3 (msec) would yield frac_value = 100. * 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, int *frac_value, int frac_digits,
struct tm *_optional_tm4fill, int as_gmt); 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"). * into a GMT time zone (encoding ends with a "Z").
* On error, this function returns 0 and sets errno. * 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); 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); const struct tm *, int frac_value, int frac_digits, int force_gmt);
#ifdef __cplusplus #ifdef __cplusplus

@ -51,7 +51,7 @@ typedef struct GetNameListRequest {
} GetNameListRequest_t; } GetNameListRequest_t;
/* Implementation */ /* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_GetNameListRequest; LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_GetNameListRequest;
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -37,7 +37,7 @@ typedef struct GetNameListResponse {
} GetNameListResponse_t; } GetNameListResponse_t;
/* Implementation */ /* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_GetNameListResponse; LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_GetNameListResponse;
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -22,14 +22,14 @@ extern "C" {
typedef ObjectName_t GetNamedVariableListAttributesRequest_t; typedef ObjectName_t GetNamedVariableListAttributesRequest_t;
/* Implementation */ /* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_GetNamedVariableListAttributesRequest; LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_GetNamedVariableListAttributesRequest;
asn_struct_free_f GetNamedVariableListAttributesRequest_free; LIB61850_INTERNAL asn_struct_free_f GetNamedVariableListAttributesRequest_free;
asn_struct_print_f GetNamedVariableListAttributesRequest_print; LIB61850_INTERNAL asn_struct_print_f GetNamedVariableListAttributesRequest_print;
asn_constr_check_f GetNamedVariableListAttributesRequest_constraint; LIB61850_INTERNAL asn_constr_check_f GetNamedVariableListAttributesRequest_constraint;
ber_type_decoder_f GetNamedVariableListAttributesRequest_decode_ber; LIB61850_INTERNAL ber_type_decoder_f GetNamedVariableListAttributesRequest_decode_ber;
der_type_encoder_f GetNamedVariableListAttributesRequest_encode_der; LIB61850_INTERNAL der_type_encoder_f GetNamedVariableListAttributesRequest_encode_der;
xer_type_decoder_f GetNamedVariableListAttributesRequest_decode_xer; LIB61850_INTERNAL xer_type_decoder_f GetNamedVariableListAttributesRequest_decode_xer;
xer_type_encoder_f GetNamedVariableListAttributesRequest_encode_xer; LIB61850_INTERNAL xer_type_encoder_f GetNamedVariableListAttributesRequest_encode_xer;
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -50,7 +50,7 @@ typedef struct GetNamedVariableListAttributesResponse {
} GetNamedVariableListAttributesResponse_t; } GetNamedVariableListAttributesResponse_t;
/* Implementation */ /* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_GetNamedVariableListAttributesResponse; LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_GetNamedVariableListAttributesResponse;
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -40,7 +40,7 @@ typedef struct GetVariableAccessAttributesRequest {
} GetVariableAccessAttributesRequest_t; } GetVariableAccessAttributesRequest_t;
/* Implementation */ /* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_GetVariableAccessAttributesRequest; LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_GetVariableAccessAttributesRequest;
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -34,7 +34,7 @@ typedef struct GetVariableAccessAttributesResponse {
} GetVariableAccessAttributesResponse_t; } GetVariableAccessAttributesResponse_t;
/* Implementation */ /* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_GetVariableAccessAttributesResponse; LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_GetVariableAccessAttributesResponse;
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -32,13 +32,13 @@ typedef struct asn_INTEGER_specifics_s {
int strict_enumeration; /* Enumeration set is fixed */ int strict_enumeration; /* Enumeration set is fixed */
} asn_INTEGER_specifics_t; } asn_INTEGER_specifics_t;
asn_struct_print_f INTEGER_print; LIB61850_INTERNAL asn_struct_print_f INTEGER_print;
ber_type_decoder_f INTEGER_decode_ber; LIB61850_INTERNAL ber_type_decoder_f INTEGER_decode_ber;
der_type_encoder_f INTEGER_encode_der; LIB61850_INTERNAL der_type_encoder_f INTEGER_encode_der;
xer_type_decoder_f INTEGER_decode_xer; LIB61850_INTERNAL xer_type_decoder_f INTEGER_decode_xer;
xer_type_encoder_f INTEGER_encode_xer; LIB61850_INTERNAL xer_type_encoder_f INTEGER_encode_xer;
per_type_decoder_f INTEGER_decode_uper; LIB61850_INTERNAL per_type_decoder_f INTEGER_decode_uper;
per_type_encoder_f INTEGER_encode_uper; LIB61850_INTERNAL per_type_encoder_f INTEGER_encode_uper;
/*********************************** /***********************************
* Some handy conversion routines. * * 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/ERANGE: Value encoded is out of range for long representation
* -1/ENOMEM: Memory allocation failed (in asn_long2INTEGER()). * -1/ENOMEM: Memory allocation failed (in asn_long2INTEGER()).
*/ */
int asn_INTEGER2long(const INTEGER_t *i, long *l); LIB61850_INTERNAL int asn_INTEGER2long(const INTEGER_t *i, long *l);
int asn_long2INTEGER(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. * 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 #ifdef __cplusplus
} }

@ -22,14 +22,14 @@ extern "C" {
typedef VisibleString_t Identifier_t; typedef VisibleString_t Identifier_t;
/* Implementation */ /* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_Identifier; LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_Identifier;
asn_struct_free_f Identifier_free; LIB61850_INTERNAL asn_struct_free_f Identifier_free;
asn_struct_print_f Identifier_print; LIB61850_INTERNAL asn_struct_print_f Identifier_print;
asn_constr_check_f Identifier_constraint; LIB61850_INTERNAL asn_constr_check_f Identifier_constraint;
ber_type_decoder_f Identifier_decode_ber; LIB61850_INTERNAL ber_type_decoder_f Identifier_decode_ber;
der_type_encoder_f Identifier_encode_der; LIB61850_INTERNAL der_type_encoder_f Identifier_encode_der;
xer_type_decoder_f Identifier_decode_xer; LIB61850_INTERNAL xer_type_decoder_f Identifier_decode_xer;
xer_type_encoder_f Identifier_encode_xer; LIB61850_INTERNAL xer_type_encoder_f Identifier_encode_xer;
#ifdef __cplusplus #ifdef __cplusplus
} }

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save