- 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()
set(LIB_VERSION_MAJOR "1")
set(LIB_VERSION_MINOR "3")
set(LIB_VERSION_MINOR "4")
set(LIB_VERSION_PATCH "0")
set(LIB_VERSION "${LIB_VERSION_MAJOR}.${LIB_VERSION_MINOR}.${LIB_VERSION_PATCH}")

@ -103,15 +103,9 @@ LIB_API_HEADER_FILES += src/iec61850/inc/iec61850_config_file_parser.h
LIB_API_HEADER_FILES += src/mms/inc/mms_value.h
LIB_API_HEADER_FILES += src/mms/inc/mms_common.h
LIB_API_HEADER_FILES += src/mms/inc/mms_types.h
LIB_API_HEADER_FILES += src/mms/inc/mms_device_model.h
LIB_API_HEADER_FILES += src/mms/inc/mms_server.h
LIB_API_HEADER_FILES += src/mms/inc/mms_named_variable_list.h
LIB_API_HEADER_FILES += src/mms/inc/mms_type_spec.h
LIB_API_HEADER_FILES += src/mms/inc/mms_client_connection.h
LIB_API_HEADER_FILES += src/mms/inc/iso_connection_parameters.h
LIB_API_HEADER_FILES += src/mms/inc/iso_server.h
LIB_API_HEADER_FILES += src/mms/inc/ber_integer.h
LIB_API_HEADER_FILES += src/mms/inc/asn1_ber_primitive_value.h
LIB_API_HEADER_FILES += src/goose/goose_subscriber.h
LIB_API_HEADER_FILES += src/goose/goose_receiver.h
LIB_API_HEADER_FILES += src/goose/goose_publisher.h

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

@ -24,6 +24,8 @@
#ifndef FILESYSTEM_HAL_H_
#define FILESYSTEM_HAL_H_
#include "hal_base.h"
#ifdef __cplusplus
extern "C" {
#endif
@ -55,7 +57,7 @@ typedef struct sDirectoryHandle* DirectoryHandle;
* \return a handle for the file. Has to be used by subsequent calls to file functions to identify the file or
* NULL if opening fails
*/
FileHandle
PAL_API FileHandle
FileSystem_openFile(char* pathName, bool readWrite);
/**
@ -72,7 +74,7 @@ FileSystem_openFile(char* pathName, bool readWrite);
*
* \return the number of bytes actually read
*/
int
PAL_API int
FileSystem_readFile(FileHandle handle, uint8_t* buffer, int maxSize);
/**
@ -84,7 +86,7 @@ FileSystem_readFile(FileHandle handle, uint8_t* buffer, int maxSize);
*
* \return the number of bytes actually written
*/
int
PAL_API int
FileSystem_writeFile(FileHandle handle, uint8_t* buffer, int size);
/**
@ -92,7 +94,7 @@ FileSystem_writeFile(FileHandle handle, uint8_t* buffer, int size);
*
* \param handle the file handle to identify the file
*/
void
PAL_API void
FileSystem_closeFile(FileHandle handle);
/**
@ -108,7 +110,7 @@ FileSystem_closeFile(FileHandle handle);
*
* \return true if file exists, false if not
*/
bool
PAL_API bool
FileSystem_getFileInfo(char* filename, uint32_t* fileSize, uint64_t* lastModificationTimestamp);
/**
@ -118,7 +120,7 @@ FileSystem_getFileInfo(char* filename, uint32_t* fileSize, uint64_t* lastModific
*
* \return true on success, false on error
*/
bool
PAL_API bool
FileSystem_deleteFile(char* filename);
/**
@ -129,7 +131,7 @@ FileSystem_deleteFile(char* filename);
*
* \return true on success, false on error
*/
bool
PAL_API bool
FileSystem_renameFile(char* oldFilename, char* newFilename);
/**
@ -139,7 +141,7 @@ FileSystem_renameFile(char* oldFilename, char* newFilename);
*
* \return a handle for the opened directory to be used in subsequent calls to identify the directory
*/
DirectoryHandle
PAL_API DirectoryHandle
FileSystem_openDirectory(char* directoryName);
/**
@ -154,7 +156,7 @@ FileSystem_openDirectory(char* directoryName);
*
* \return the name of the directory entry
*/
char*
PAL_API char*
FileSystem_readDirectory(DirectoryHandle directory, bool* isDirectory);
@ -163,7 +165,7 @@ FileSystem_readDirectory(DirectoryHandle directory, bool* isDirectory);
*
* \param directory the handle to identify the directory
*/
void
PAL_API void
FileSystem_closeDirectory(DirectoryHandle directory);

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

@ -24,8 +24,7 @@
#ifndef SOCKET_HAL_H_
#define SOCKET_HAL_H_
#include <stdint.h>
#include <stdbool.h>
#include "hal_base.h"
/**
* \file hal_socket.h
@ -78,13 +77,13 @@ typedef enum
*
* \return new HandleSet instance
*/
HandleSet
PAL_API HandleSet
Handleset_new(void);
/**
* \brief Reset the handle set for reuse
*/
void
PAL_API void
Handleset_reset(HandleSet self);
/**
@ -93,7 +92,7 @@ Handleset_reset(HandleSet self);
* \param self the HandleSet instance
* \param sock the socket to add
*/
void
PAL_API void
Handleset_addSocket(HandleSet self, const Socket sock);
/**
@ -111,7 +110,7 @@ Handleset_addSocket(HandleSet self, const Socket sock);
* or 0 if no data is pending on any of the monitored connections.
* The function shall return -1 if a socket error occures.
*/
int
PAL_API int
Handleset_waitReady(HandleSet self, unsigned int timeoutMs);
/**
@ -119,7 +118,7 @@ Handleset_waitReady(HandleSet self, unsigned int timeoutMs);
*
* \param self the HandleSet instance to destroy
*/
void
PAL_API void
Handleset_destroy(HandleSet self);
/**
@ -132,11 +131,11 @@ Handleset_destroy(HandleSet self);
*
* \return the newly create TcpServerSocket instance
*/
ServerSocket
PAL_API ServerSocket
TcpServerSocket_create(const char* address, int port);
void
PAL_API void
ServerSocket_listen(ServerSocket self);
/**
@ -153,7 +152,7 @@ ServerSocket_listen(ServerSocket self);
*
* \return handle of the new connection socket or NULL if no new connection is available
*/
Socket
PAL_API Socket
ServerSocket_accept(ServerSocket self);
/**
@ -166,7 +165,7 @@ ServerSocket_accept(ServerSocket self);
* \param interval time (in s) between subsequent keep alive messages if no ACK received
* \param count number of not missing keep alive ACKs until socket is considered dead
*/
void
PAL_API void
Socket_activateTcpKeepAlive(Socket self, int idleTime, int interval, int count);
/**
@ -178,7 +177,7 @@ Socket_activateTcpKeepAlive(Socket self, int idleTime, int interval, int count);
* \param backlog the number of pending connections in the queue
*
*/
void
PAL_API void
ServerSocket_setBacklog(ServerSocket self, int backlog);
/**
@ -190,7 +189,7 @@ ServerSocket_setBacklog(ServerSocket self, int backlog);
*
* \param self server socket instance
*/
void
PAL_API void
ServerSocket_destroy(ServerSocket self);
/**
@ -200,7 +199,7 @@ ServerSocket_destroy(ServerSocket self);
*
* \return a new client socket instance.
*/
Socket
PAL_API Socket
TcpSocket_create(void);
/**
@ -209,7 +208,7 @@ TcpSocket_create(void);
* \param self the client socket instance
* \param timeoutInMs the timeout in ms
*/
void
PAL_API void
Socket_setConnectTimeout(Socket self, uint32_t timeoutInMs);
/**
@ -230,13 +229,13 @@ Socket_setConnectTimeout(Socket self, uint32_t timeoutInMs);
*
* \return true if the connection was established successfully, false otherwise
*/
bool
PAL_API bool
Socket_connect(Socket self, const char* address, int port);
bool
PAL_API bool
Socket_connectAsync(Socket self, const char* address, int port);
SocketState
PAL_API SocketState
Socket_checkAsyncConnectState(Socket self);
/**
@ -255,7 +254,7 @@ Socket_checkAsyncConnectState(Socket self);
*
* \return the number of bytes read or -1 if an error occurred
*/
int
PAL_API int
Socket_read(Socket self, uint8_t* buf, int size);
/**
@ -267,7 +266,7 @@ Socket_read(Socket self, uint8_t* buf, int size);
*
* \return number of bytes transmitted of -1 in case of an error
*/
int
PAL_API int
Socket_write(Socket self, uint8_t* buf, int size);
/**
@ -281,7 +280,7 @@ Socket_write(Socket self, uint8_t* buf, int size);
*
* \return the IP address and port number as strings separated by the ':' character.
*/
char*
PAL_API char*
Socket_getPeerAddress(Socket self);
/**
@ -298,7 +297,7 @@ Socket_getPeerAddress(Socket self);
* \return the IP address and port number as strings separated by the ':' character. If the
* address is an IPv6 address the IP part is encapsulated in square brackets.
*/
char*
PAL_API char*
Socket_getPeerAddressStatic(Socket self, char* peerAddressString);
/**
@ -311,7 +310,7 @@ Socket_getPeerAddressStatic(Socket self, char* peerAddressString);
*
* \param self the client, connection or server socket instance
*/
void
PAL_API void
Socket_destroy(Socket self);
/*! @} */

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

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

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

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

@ -41,7 +41,6 @@ extern "C" {
* @{
*/
#include <stdint.h>
#include "tls_config.h"
#include "hal_socket.h"
@ -59,13 +58,13 @@ typedef struct sTLSSocket* TLSSocket;
*
* \return new TLS connection instance
*/
TLSSocket
PAL_API TLSSocket
TLSSocket_create(Socket socket, TLSConfiguration configuration, bool storeClientCert);
/**
* \brief Perform a new TLS handshake/session renegotiation
*/
bool
PAL_API bool
TLSSocket_performHandshake(TLSSocket self);
/**
@ -75,7 +74,7 @@ TLSSocket_performHandshake(TLSSocket self);
*
* \return the certificate byte buffer
*/
uint8_t*
PAL_API uint8_t*
TLSSocket_getPeerCertificate(TLSSocket self, int* certSize);
/**
@ -90,7 +89,7 @@ TLSSocket_getPeerCertificate(TLSSocket self, int* certSize);
*
* \return the number of bytes read or -1 if an error occurred
*/
int
PAL_API int
TLSSocket_read(TLSSocket self, uint8_t* buf, int size);
/**
@ -102,13 +101,13 @@ TLSSocket_read(TLSSocket self, uint8_t* buf, int size);
*
* \return number of bytes transmitted of -1 in case of an error
*/
int
PAL_API int
TLSSocket_write(TLSSocket self, uint8_t* buf, int size);
/**
* \brief Closes the TLS connection and released all resources
*/
void
PAL_API void
TLSSocket_close(TLSSocket self);
/*! @} */

@ -94,7 +94,7 @@ CFLAGS+=-m64
endif
LDLIBS=-lws2_32
DYNLIB_LDFLAGS=-Wl,-no-undefined -Wl,--enable-runtime-pseudo-reloc -Wl,--output-def,libiec61850.def,--out-implib,libiec61850.a
DYNLIB_LDFLAGS=-Wl,-no-undefined -Wl,--enable-runtime-pseudo-reloc -Wl,--out-implib,libiec61850.a
# on Windows: only compile with ethernet support if winpcap files are in third_party/winpcap!

@ -218,8 +218,6 @@ ELSE()
add_definitions(-DEXCLUDE_ETHERNET_WINDOWS)
ENDIF()
set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}\"/DEF:${CMAKE_CURRENT_SOURCE_DIR}/vs/libiec61850.def\"")
include_directories(
../third_party/winpcap/include
)
@ -333,6 +331,7 @@ IF(MINGW)
target_link_libraries(iec61850-shared ws2_32 iphlpapi)
target_link_libraries(iec61850 ws2_32 iphlpapi)
ENDIF(MINGW)
iF(WITH_WPCAP)
target_link_libraries(iec61850
${CMAKE_CURRENT_SOURCE_DIR}/../third_party/winpcap/lib/wpcap.lib
@ -343,19 +342,6 @@ target_link_libraries(iec61850-shared
${CMAKE_CURRENT_SOURCE_DIR}/../third_party/winpcap/lib/packet.lib
)
if(MSVC)
set_target_properties(iec61850-shared PROPERTIES
LINK_FLAGS "/DEF:\"${CMAKE_CURRENT_SOURCE_DIR}/vs/libiec61850.def\""
)
endif()
ELSE(WITH_WPCAP)
if(MSVC)
set_target_properties(iec61850-shared PROPERTIES
LINK_FLAGS "/DEF:\"${CMAKE_CURRENT_SOURCE_DIR}/vs/libiec61850-wo-goose.def\""
)
endif()
ENDIF(WITH_WPCAP)
set(BINDIR "bin")

@ -794,11 +794,8 @@ INPUT = "iec61850/inc/iec61850_client.h" \
"goose/goose_receiver.h" \
"sampled_values/sv_subscriber.h" \
"sampled_values/sv_publisher.h" \
"mms/inc/mms_device_model.h" \
"mms/inc/mms_types.h" \
"mms/inc/mms_common.h" \
"mms/inc/mms_server.h" \
"mms/inc/iso_server.h" \
"mms/inc/mms_named_variable_list.h" \
"mms/inc/mms_type_spec.h" \
"mms/inc/mms_types.h" \

@ -35,41 +35,6 @@ BufferChain_init(BufferChain self, int length, int partLength, BufferChain nextP
self->buffer = buffer;
}
void
BufferChain_destroy(BufferChain self)
{
BufferChain currentChainElement = self;
while (currentChainElement != NULL) {
BufferChain nextChainElement = currentChainElement->nextPart;
GLOBAL_FREEMEM(currentChainElement);
currentChainElement = nextChainElement;
}
}
int /* returns the number of bytes written to the buffer */
BufferChain_dumpToBuffer(BufferChain self, uint8_t* buffer, int bufferMaxSize)
{
if (self->length > bufferMaxSize)
return 0;
BufferChain currentChain = self;
int currentBufferIndex = 0;
do {
int currentChainIndex = 0;
int currentPartLength = self->partLength;
while (currentChainIndex < currentPartLength)
buffer[currentBufferIndex++] = self->buffer[currentChainIndex++];
currentChain = currentChain->nextPart;
} while (currentChain != NULL);
return currentBufferIndex;
}
void
MemoryArea_initialize(MemoryArea* self, uint8_t* memory, int size)
{

@ -1,13 +1,31 @@
/*
* buffer_chain.h
* buffer_chain.h
*
* Created on: Nov 10, 2013
* Author: mzillgit
* Copyright 2013-2018 Michael Zillgith
*
* This file is part of libIEC61850.
*
* libIEC61850 is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* libIEC61850 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with libIEC61850. If not, see <http://www.gnu.org/licenses/>.
*
* See COPYING file for the complete license text.
*/
#ifndef BUFFER_CHAIN_H_
#define BUFFER_CHAIN_H_
#include "libiec61850_platform_includes.h"
typedef struct sBufferChain* BufferChain;
struct sBufferChain {
@ -18,26 +36,19 @@ struct sBufferChain {
BufferChain nextPart;
};
void
LIB61850_INTERNAL void
BufferChain_init(BufferChain self, int length, int partLength, BufferChain nextPart, uint8_t* buffer);
void
BufferChain_destroy(BufferChain self);
int /* returns the number of bytes written to the buffer */
BufferChain_dumpToBuffer(BufferChain self, uint8_t* buffer, int bufferMaxSize);
typedef struct {
uint8_t* memory;
int currentPos;
int size;
} MemoryArea;
void
LIB61850_INTERNAL void
MemoryArea_initialize(MemoryArea* self, uint8_t* memory, int size);
uint8_t*
LIB61850_INTERNAL uint8_t*
MemoryArea_getNextBlock(MemoryArea* self, int size);
#if 0

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

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

@ -1,5 +1,5 @@
/*
* libiec61850_common_api_includes.h
* libiec61850_common_api.h
*/
#ifndef LIBIEC61850_COMMON_API_INCLUDES_H_
@ -17,6 +17,32 @@
#define ATTRIBUTE_PACKED
#endif
#ifndef DEPRECATED
#if defined(__GNUC__) || defined(__clang__)
#define DEPRECATED __attribute__((deprecated))
#else
#define DEPRECATED
#endif
#endif
#if defined _WIN32 || defined __CYGWIN__
#ifdef EXPORT_FUNCTIONS_FOR_DLL
#define LIB61850_API __declspec(dllexport)
#else
#define LIB61850_API
#endif
#define LIB61850_INTERNAL
#else
#if __GNUC__ >= 4
#define LIB61850_API __attribute__ ((visibility ("default")))
#define LIB61850_INTERNAL __attribute__ ((visibility ("hidden")))
#else
#define LIB61850_API
#define LIB61850_INTERNAL
#endif
#endif
#include "hal_time.h"
#include "mms_value.h"

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

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

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

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

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

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

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

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

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

@ -520,7 +520,7 @@ IedConnection_getRCBValues(IedConnection self, IedClientError* error, const char
}
uint32_t
IedConnection_setRCBValues(IedConnection self, IedClientError* error, ClientReportControlBlock rcb,
IedConnection_setRCBValuesAsync(IedConnection self, IedClientError* error, ClientReportControlBlock rcb,
uint32_t parametersMask, bool singleRequest, IedConnection_WriteObjectHandler handler, void* parameter)
{
//TODO implement

@ -133,7 +133,7 @@ extern "C" {
* Constructed Attribute Classes (CAC)
***************************************************/
DataAttribute*
LIB61850_API DataAttribute*
CAC_AnalogueValue_create(const char* name, ModelNode* parent, FunctionalConstraint fc, uint8_t triggerOptions,
bool isIntegerNotFloat);
@ -143,48 +143,48 @@ CAC_AnalogueValue_create(const char* name, ModelNode* parent, FunctionalConstrai
*
* \param hasTransInd
*/
DataAttribute*
LIB61850_API DataAttribute*
CAC_ValWithTrans_create(const char* name, ModelNode* parent, FunctionalConstraint fc, uint8_t triggerOptions, bool hasTransientIndicator);
/**
* CDC_OPTION_AC_CLC_O
*/
DataAttribute*
LIB61850_API DataAttribute*
CAC_Vector_create(const char* name, ModelNode* parent, uint32_t options, FunctionalConstraint fc, uint8_t triggerOptions);
DataAttribute*
LIB61850_API DataAttribute*
CAC_Point_create(const char* name, ModelNode* parent, FunctionalConstraint fc, uint8_t triggerOptions, bool hasZVal);
DataAttribute*
LIB61850_API DataAttribute*
CAC_ScaledValueConfig_create(const char* name, ModelNode* parent);
DataAttribute*
LIB61850_API DataAttribute*
CAC_Unit_create(const char* name, ModelNode* parent, bool hasMagnitude);
DataAttribute*
LIB61850_API DataAttribute*
CDA_OperBoolean(ModelNode* parent, bool isTImeActivated);
/****************************************************
* Common Data Classes (CDC)
***************************************************/
DataObject*
LIB61850_API DataObject*
CDC_SPS_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
DataObject*
LIB61850_API DataObject*
CDC_DPS_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
DataObject*
LIB61850_API DataObject*
CDC_INS_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
DataObject*
LIB61850_API DataObject*
CDC_ENS_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
DataObject*
LIB61850_API DataObject*
CDC_BCR_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
DataObject*
LIB61850_API DataObject*
CDC_VSS_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
/**
@ -202,7 +202,7 @@ CDC_VSS_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
* \param parent the parent of the new data object (either a LogicalNode or another DataObject)
* \param options bit mask to encode required optional elements
*/
DataObject*
LIB61850_API DataObject*
CDC_SEC_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
/**
@ -222,14 +222,14 @@ CDC_SEC_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
* \param isIntegerNotFloat if true the AnalogueValue instance have integer instead of float
*
*/
DataObject*
LIB61850_API DataObject*
CDC_MV_create(const char* dataObjectName, ModelNode* parent, uint32_t options, bool isIntegerNotFloat);
/**
* CDC_OPTION_INST_MAG
* CDC_OPTION_RANGE
*/
DataObject*
LIB61850_API DataObject*
CDC_CMV_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
/**
@ -250,7 +250,7 @@ CDC_CMV_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
* \param isIntegerNotFloat if true the AnalogueValue instance have integer instead of float
*
*/
DataObject*
LIB61850_API DataObject*
CDC_SAV_create(const char* dataObjectName, ModelNode* parent, uint32_t options, bool isIntegerNotFloat);
/**
@ -274,7 +274,7 @@ CDC_SAV_create(const char* dataObjectName, ModelNode* parent, uint32_t options,
*
* \return new DataObject instance
*/
DataObject*
LIB61850_API DataObject*
CDC_LPL_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
/**
@ -298,10 +298,10 @@ CDC_LPL_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
*
* \return new DataObject instance
*/
DataObject*
LIB61850_API DataObject*
CDC_DPL_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
DataObject*
LIB61850_API DataObject*
CDC_HST_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint16_t maxPts);
/**
@ -322,13 +322,13 @@ CDC_HST_create(const char* dataObjectName, ModelNode* parent, uint32_t options,
* \param parent the parent of the new data object (either a LogicalNode or another DataObject)
* \param options bit mask to encode required optional elements
*/
DataObject*
LIB61850_API DataObject*
CDC_ACD_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
/**
* \brief Protection activation information (ACT)
*/
DataObject*
LIB61850_API DataObject*
CDC_ACT_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
/**
@ -338,7 +338,7 @@ CDC_ACT_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
* \param parent the parent of the new data object (either a LogicalNode or another DataObject)
* \param options bit mask to encode required optional elements
*/
DataObject*
LIB61850_API DataObject*
CDC_SPG_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
/**
@ -348,7 +348,7 @@ CDC_SPG_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
* \param parent the parent of the new data object (either a LogicalNode or another DataObject)
* \param options bit mask to encode required optional elements
*/
DataObject*
LIB61850_API DataObject*
CDC_VSG_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
/**
@ -358,7 +358,7 @@ CDC_VSG_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
* \param parent the parent of the new data object (either a LogicalNode or another DataObject)
* \param options bit mask to encode required optional elements
*/
DataObject*
LIB61850_API DataObject*
CDC_ENG_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
/**
@ -372,7 +372,7 @@ CDC_ENG_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
* standard (include standard optional elements like extension namespaces and descriptions (d, dU).
*
*/
DataObject*
LIB61850_API DataObject*
CDC_ING_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
/**
@ -386,7 +386,7 @@ CDC_ING_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
* standard (include standard optional elements like extension namespaces and descriptions (d, dU).
*
*/
DataObject*
LIB61850_API DataObject*
CDC_ASG_create(const char* dataObjectName, ModelNode* parent, uint32_t options, bool isIntegerNotFloat);
/**
@ -395,7 +395,7 @@ CDC_ASG_create(const char* dataObjectName, ModelNode* parent, uint32_t options,
* possible options:
* CDC_OPTION_ANGLE_REF
*/
DataObject*
LIB61850_API DataObject*
CDC_WYE_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
/**
@ -404,7 +404,7 @@ CDC_WYE_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
* possible options:
* CDC_OPTION_ANGLE_REF
*/
DataObject*
LIB61850_API DataObject*
CDC_DEL_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
/***************************
@ -416,7 +416,7 @@ CDC_DEL_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
*
* \param controlOptions specify which control model to set as default and other control related options
*/
DataObject*
LIB61850_API DataObject*
CDC_SPC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions);
/**
@ -434,7 +434,7 @@ CDC_SPC_create(const char* dataObjectName, ModelNode* parent, uint32_t options,
* \param defaultControlModel specify which control model to set as default.
*
*/
DataObject*
LIB61850_API DataObject*
CDC_DPC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions);
/**
@ -456,7 +456,7 @@ CDC_DPC_create(const char* dataObjectName, ModelNode* parent, uint32_t options,
* \param defaultControlModel specify which control model to set as default.
*
*/
DataObject*
LIB61850_API DataObject*
CDC_INC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions);
/**
@ -474,7 +474,7 @@ CDC_INC_create(const char* dataObjectName, ModelNode* parent, uint32_t options,
* \param defaultControlModel specify which control model to set as default.
*
*/
DataObject*
LIB61850_API DataObject*
CDC_ENC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions);
/**
@ -493,7 +493,7 @@ CDC_ENC_create(const char* dataObjectName, ModelNode* parent, uint32_t options,
* \param hasTransientIndicator specifies if the step position information contains the transient indicator
*
*/
DataObject*
LIB61850_API DataObject*
CDC_BSC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions, bool hasTransientIndicator);
/**
@ -511,7 +511,7 @@ CDC_BSC_create(const char* dataObjectName, ModelNode* parent, uint32_t options,
* \param controlOptions specify which control model to set as default and other control specific options
* \param isIntegerNotFloat
*/
DataObject*
LIB61850_API DataObject*
CDC_APC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions, bool isIntegerNotFloat);
/** Minimum measured value */
@ -559,21 +559,21 @@ CDC_APC_create(const char* dataObjectName, ModelNode* parent, uint32_t options,
/** All counting data */
#define CDC_OPTION_61400_COUNTING_ALL (CDC_OPTION_61400_COUNTING_DAILY | CDC_OPTION_61400_COUNTING_MONTHLY | CDC_OPTION_61400_COUNTING_YEARLY | CDC_OPTION_61400_COUNTING_TOTAL)
DataObject*
LIB61850_API DataObject*
CDC_SPV_create(const char* dataObjectName, ModelNode* parent,
uint32_t options,
uint32_t controlOptions,
uint32_t wpOptions,
bool hasChaManRs);
DataObject*
LIB61850_API DataObject*
CDC_STV_create(const char* dataObjectName, ModelNode* parent,
uint32_t options,
uint32_t controlOptions,
uint32_t wpOptions,
bool hasOldStatus);
DataObject*
LIB61850_API DataObject*
CDC_CMD_create(const char* dataObjectName, ModelNode* parent,
uint32_t options,
uint32_t controlOptions,
@ -582,21 +582,21 @@ CDC_CMD_create(const char* dataObjectName, ModelNode* parent,
bool hasCmTm,
bool hasCmCt);
DataObject*
LIB61850_API DataObject*
CDC_ALM_create(const char* dataObjectName, ModelNode* parent,
uint32_t options,
uint32_t controlOptions,
uint32_t wpOptions,
bool hasOldStatus);
DataObject*
LIB61850_API DataObject*
CDC_CTE_create(const char* dataObjectName, ModelNode* parent,
uint32_t options,
uint32_t controlOptions,
uint32_t wpOptions,
bool hasHisRs);
DataObject*
LIB61850_API DataObject*
CDC_TMS_create(const char* dataObjectName, ModelNode* parent,
uint32_t options,
uint32_t controlOptions,

File diff suppressed because it is too large Load Diff

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

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

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

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

@ -31,7 +31,7 @@
extern "C" {
#endif
/** \defgroup server_api_group IEC 61850 server API
/** \defgroup server_api_group IEC 61850/MMS server API
* @{
*/
@ -84,13 +84,13 @@ struct sIedServerConfig
*
* \return a new configuration object with default configuration values
*/
IedServerConfig
LIB61850_API IedServerConfig
IedServerConfig_create(void);
/**
* \brief Destroy the configuration object
*/
void
LIB61850_API void
IedServerConfig_destroy(IedServerConfig self);
/**
@ -98,7 +98,7 @@ IedServerConfig_destroy(IedServerConfig self);
*
* \param edition IEC_61850_EDITION_1, IEC_61850_EDITION_2, or IEC_61850_EDITION_2_1
*/
void
LIB61850_API void
IedServerConfig_setEdition(IedServerConfig self, uint8_t edition);
/**
@ -106,7 +106,7 @@ IedServerConfig_setEdition(IedServerConfig self, uint8_t edition);
*
* \returns IEC_61850_EDITION_1, IEC_61850_EDITION_2, or IEC_61850_EDITION_2_1
*/
uint8_t
LIB61850_API uint8_t
IedServerConfig_getEdition(IedServerConfig self);
/**
@ -114,7 +114,7 @@ IedServerConfig_getEdition(IedServerConfig self);
*
* \param reportBufferSize the buffer size for each buffered report control block
*/
void
LIB61850_API void
IedServerConfig_setReportBufferSize(IedServerConfig self, int reportBufferSize);
/**
@ -122,7 +122,7 @@ IedServerConfig_setReportBufferSize(IedServerConfig self, int reportBufferSize);
*
* \return the buffer size for each buffered report control block
*/
int
LIB61850_API int
IedServerConfig_getReportBufferSize(IedServerConfig self);
/**
@ -133,7 +133,7 @@ IedServerConfig_getReportBufferSize(IedServerConfig self);
*
* \param maxConnection maximum number of TCP connections
*/
void
LIB61850_API void
IedServerConfig_setMaxMmsConnections(IedServerConfig self, int maxConnections);
/**
@ -141,7 +141,7 @@ IedServerConfig_setMaxMmsConnections(IedServerConfig self, int maxConnections);
*
* \return maximum number of TCP connections
*/
int
LIB61850_API int
IedServerConfig_getMaxMmsConnections(IedServerConfig self);
/**
@ -151,13 +151,13 @@ IedServerConfig_getMaxMmsConnections(IedServerConfig self);
*
* \param basepath new file service base path
*/
void
LIB61850_API void
IedServerConfig_setFileServiceBasePath(IedServerConfig self, const char* basepath);
/**
* \brief Get the basepath of the file services
*/
const char*
LIB61850_API const char*
IedServerConfig_getFileServiceBasePath(IedServerConfig self);
/**
@ -165,7 +165,7 @@ IedServerConfig_getFileServiceBasePath(IedServerConfig self);
*
* \param[in] enable set true to enable the file services, otherwise false
*/
void
LIB61850_API void
IedServerConfig_enableFileService(IedServerConfig self, bool enable);
/**
@ -173,7 +173,7 @@ IedServerConfig_enableFileService(IedServerConfig self, bool enable);
*
* \return true if enabled, false otherwise
*/
bool
LIB61850_API bool
IedServerConfig_isFileServiceEnabled(IedServerConfig self);
/**
@ -181,7 +181,7 @@ IedServerConfig_isFileServiceEnabled(IedServerConfig self);
*
* \param[in] enable set true to enable dynamic data set service, otherwise false
*/
void
LIB61850_API void
IedServerConfig_enableDynamicDataSetService(IedServerConfig self, bool enable);
/**
@ -189,7 +189,7 @@ IedServerConfig_enableDynamicDataSetService(IedServerConfig self, bool enable);
*
* \return true if enabled, false otherwise
*/
bool
LIB61850_API bool
IedServerConfig_isDynamicDataSetServiceEnabled(IedServerConfig self);
/**
@ -200,7 +200,7 @@ IedServerConfig_isDynamicDataSetServiceEnabled(IedServerConfig self);
*
* \param maxDataSets maximum number of allowed data sets.
*/
void
LIB61850_API void
IedServerConfig_setMaxAssociationSpecificDataSets(IedServerConfig self, int maxDataSets);
/**
@ -208,7 +208,7 @@ IedServerConfig_setMaxAssociationSpecificDataSets(IedServerConfig self, int maxD
*
* \return maximum number of allowed data sets.
*/
int
LIB61850_API int
IedServerConfig_getMaxAssociationSpecificDataSets(IedServerConfig self);
/**
@ -216,7 +216,7 @@ IedServerConfig_getMaxAssociationSpecificDataSets(IedServerConfig self);
*
* \param maxDataSets maximum number of allowed data sets.
*/
void
LIB61850_API void
IedServerConfig_setMaxDomainSpecificDataSets(IedServerConfig self, int maxDataSets);
/**
@ -224,7 +224,7 @@ IedServerConfig_setMaxDomainSpecificDataSets(IedServerConfig self, int maxDataSe
*
* \return maximum number of allowed data sets.
*/
int
LIB61850_API int
IedServerConfig_getMaxDomainSpecificDataSets(IedServerConfig self);
/**
@ -236,7 +236,7 @@ IedServerConfig_getMaxDomainSpecificDataSets(IedServerConfig self);
*
* \param maxDataSetEntries the maximum number of entries allowed in a data set
*/
void
LIB61850_API void
IedServerConfig_setMaxDataSetEntries(IedServerConfig self, int maxDataSetEntries);
/**
@ -244,7 +244,7 @@ IedServerConfig_setMaxDataSetEntries(IedServerConfig self, int maxDataSetEntries
*
* \return the maximum number of entries allowed in a data sets
*/
int
LIB61850_API int
IedServerConfig_getMaxDatasSetEntries(IedServerConfig self);
/**
@ -252,7 +252,7 @@ IedServerConfig_getMaxDatasSetEntries(IedServerConfig self);
*
* \param[in] enable set true to enable dynamic data set service, otherwise false
*/
void
LIB61850_API void
IedServerConfig_enableLogService(IedServerConfig self, bool enable);
/**
@ -260,7 +260,7 @@ IedServerConfig_enableLogService(IedServerConfig self, bool enable);
*
* \return true if enabled, false otherwise
*/
bool
LIB61850_API bool
IedServerConfig_isLogServiceEnabled(IedServerConfig self);
/**
@ -287,7 +287,7 @@ typedef struct sClientConnection* ClientConnection;
*
* \return the new IedServer instance
*/
IedServer
LIB61850_API IedServer
IedServer_create(IedModel* dataModel);
/**
@ -298,7 +298,7 @@ IedServer_create(IedModel* dataModel);
*
* \return the new IedServer instance
*/
IedServer
LIB61850_API IedServer
IedServer_createWithTlsSupport(IedModel* dataModel, TLSConfiguration tlsConfiguration);
/**
@ -308,7 +308,7 @@ IedServer_createWithTlsSupport(IedModel* dataModel, TLSConfiguration tlsConfigur
* \param tlsConfiguration TLS configuration object, or NULL to not use TLS
* \param serverConfiguration IED server configuration object for advanced server configuration
*/
IedServer
LIB61850_API IedServer
IedServer_createWithConfig(IedModel* dataModel, TLSConfiguration tlsConfiguration, IedServerConfig serverConfiguration);
/**
@ -316,7 +316,7 @@ IedServer_createWithConfig(IedModel* dataModel, TLSConfiguration tlsConfiguratio
*
* \param self the instance of IedServer to operate on.
*/
void
LIB61850_API void
IedServer_destroy(IedServer self);
/**
@ -325,7 +325,7 @@ IedServer_destroy(IedServer self);
* \param self the IedServer instance
* \param localIpAddress the local IP address as C string (an internal copy will be created)
*/
void
LIB61850_API void
IedServer_setLocalIpAddress(IedServer self, const char* localIpAddress);
/**
@ -338,7 +338,7 @@ IedServer_setLocalIpAddress(IedServer self, const char* localIpAddress);
* \param self the IedServer instance
* \param basepath the new virtual filestore basepath
*/
void
LIB61850_API void
IedServer_setFilestoreBasepath(IedServer self, const char* basepath);
/**
@ -347,7 +347,7 @@ IedServer_setFilestoreBasepath(IedServer self, const char* basepath);
* \param self the instance of IedServer to operate on.
* \param tcpPort the TCP port the server is listening (-1 for using the default MMS or secure MMS port)
*/
void
LIB61850_API void
IedServer_start(IedServer self, int tcpPort);
/**
@ -355,7 +355,7 @@ IedServer_start(IedServer self, int tcpPort);
*
* \param self the instance of IedServer to operate on.
*/
void
LIB61850_API void
IedServer_stop(IedServer self);
/**
@ -368,7 +368,7 @@ IedServer_stop(IedServer self);
* \param self the instance of IedServer to operate on.
* \param tcpPort the TCP port the server is listening (-1 for using the default MMS or secure MMS port)
*/
void
LIB61850_API void
IedServer_startThreadless(IedServer self, int tcpPort);
/**
@ -384,7 +384,7 @@ IedServer_startThreadless(IedServer self, int tcpPort);
*
* \return 0 if no connection is ready; otherwise at least one connection is ready
*/
int
LIB61850_API int
IedServer_waitReady(IedServer self, unsigned int timeoutMs);
/**
@ -396,7 +396,7 @@ IedServer_waitReady(IedServer self, unsigned int timeoutMs);
*
* \param self the instance of IedServer to operate on.
*/
void
LIB61850_API void
IedServer_processIncomingData(IedServer self);
/**
@ -407,7 +407,7 @@ IedServer_processIncomingData(IedServer self);
*
* \param self the instance of IedServer to operate on.
*/
void
LIB61850_API void
IedServer_performPeriodicTasks(IedServer self);
/**
@ -415,7 +415,7 @@ IedServer_performPeriodicTasks(IedServer self);
*
* \param self the instance of IedServer to operate on.
*/
void
LIB61850_API void
IedServer_stopThreadless(IedServer self);
/**
@ -425,7 +425,7 @@ IedServer_stopThreadless(IedServer self);
*
* \return the IedModel* instance of the server
*/
IedModel*
LIB61850_API IedModel*
IedServer_getDataModel(IedServer self);
/**
@ -435,7 +435,7 @@ IedServer_getDataModel(IedServer self);
*
* \return true if IedServer instance is listening for client connections
*/
bool
LIB61850_API bool
IedServer_isRunning(IedServer self);
/**
@ -448,7 +448,7 @@ IedServer_isRunning(IedServer self);
*
* \return MmsServer instance that is used by the IedServer
*/
MmsServer
LIB61850_API MmsServer
IedServer_getMmsServer(IedServer self);
/**
@ -461,7 +461,7 @@ IedServer_getMmsServer(IedServer self);
*
* \param self the instance of IedServer to operate on.
*/
void
LIB61850_API void
IedServer_enableGoosePublishing(IedServer self);
/**
@ -472,7 +472,7 @@ IedServer_enableGoosePublishing(IedServer self);
*
* \param self the instance of IedServer to operate on.
*/
void
LIB61850_API void
IedServer_disableGoosePublishing(IedServer self);
/**
@ -485,7 +485,7 @@ IedServer_disableGoosePublishing(IedServer self);
* \param self the instance of IedServer to operate on.
* \param interfaceId the ID of the ethernet interface to be used for GOOSE publishing
*/
void
LIB61850_API void
IedServer_setGooseInterfaceId(IedServer self, const char* interfaceId);
/**@}*/
@ -508,7 +508,7 @@ IedServer_setGooseInterfaceId(IedServer self, const char* interfaceId);
* \param authenticator the user provided authenticator callback
* \param authenticatorParameter user provided parameter that is passed to the authenticator
*/
void
LIB61850_API void
IedServer_setAuthenticator(IedServer self, AcseAuthenticator authenticator, void* authenticatorParameter);
@ -522,7 +522,7 @@ IedServer_setAuthenticator(IedServer self, AcseAuthenticator authenticator, void
* \param self the ClientConnection instance
* \return peer address as C string.
*/
const char*
LIB61850_API const char*
ClientConnection_getPeerAddress(ClientConnection self);
/**
@ -535,7 +535,7 @@ ClientConnection_getPeerAddress(ClientConnection self);
*
* \return the security token or NULL
*/
void*
LIB61850_API void*
ClientConnection_getSecurityToken(ClientConnection self);
/**
@ -556,7 +556,7 @@ typedef void (*IedConnectionIndicationHandler) (IedServer self, ClientConnection
* \param handler the user provided callback function
* \param parameter a user provided parameter that is passed to the callback function.
*/
void
LIB61850_API void
IedServer_setConnectionIndicationHandler(IedServer self, IedConnectionIndicationHandler handler, void* parameter);
@ -582,7 +582,7 @@ IedServer_setConnectionIndicationHandler(IedServer self, IedConnectionIndication
*
* \param self the instance of IedServer to operate on.
*/
void
LIB61850_API void
IedServer_lockDataModel(IedServer self);
/**
@ -593,7 +593,7 @@ IedServer_lockDataModel(IedServer self);
*
* \param self the instance of IedServer to operate on.
*/
void
LIB61850_API void
IedServer_unlockDataModel(IedServer self);
/**
@ -608,7 +608,7 @@ IedServer_unlockDataModel(IedServer self);
*
* \return MmsValue object of the MMS Named Variable or NULL if the value does not exist.
*/
MmsValue*
LIB61850_API MmsValue*
IedServer_getAttributeValue(IedServer self, DataAttribute* dataAttribute);
/**
@ -622,7 +622,7 @@ IedServer_getAttributeValue(IedServer self, DataAttribute* dataAttribute);
*
* \return true or false
*/
bool
LIB61850_API bool
IedServer_getBooleanAttributeValue(IedServer self, const DataAttribute* dataAttribute);
/**
@ -636,7 +636,7 @@ IedServer_getBooleanAttributeValue(IedServer self, const DataAttribute* dataAttr
*
* \return the value as 32 bit integer
*/
int32_t
LIB61850_API int32_t
IedServer_getInt32AttributeValue(IedServer self, const DataAttribute* dataAttribute);
/**
@ -650,7 +650,7 @@ IedServer_getInt32AttributeValue(IedServer self, const DataAttribute* dataAttrib
*
* \return the value as 64 bit integer
*/
int64_t
LIB61850_API int64_t
IedServer_getInt64AttributeValue(IedServer self, const DataAttribute* dataAttribute);
/**
@ -664,7 +664,7 @@ IedServer_getInt64AttributeValue(IedServer self, const DataAttribute* dataAttrib
*
* \return the value as 32 bit unsigned integer
*/
uint32_t
LIB61850_API uint32_t
IedServer_getUInt32AttributeValue(IedServer self, const DataAttribute* dataAttribute);
/**
@ -678,7 +678,7 @@ IedServer_getUInt32AttributeValue(IedServer self, const DataAttribute* dataAttri
*
* \return the value as 32 bit float
*/
float
LIB61850_API float
IedServer_getFloatAttributeValue(IedServer self, const DataAttribute* dataAttribute);
/**
@ -692,7 +692,7 @@ IedServer_getFloatAttributeValue(IedServer self, const DataAttribute* dataAttrib
*
* \return the value as 32 bit float
*/
uint64_t
LIB61850_API uint64_t
IedServer_getUTCTimeAttributeValue(IedServer self, const DataAttribute* dataAttribute);
/**
@ -710,7 +710,7 @@ IedServer_getUTCTimeAttributeValue(IedServer self, const DataAttribute* dataAttr
*
* \return the value a 32 bit integer.
*/
uint32_t
LIB61850_API uint32_t
IedServer_getBitStringAttributeValue(IedServer self, const DataAttribute* dataAttribute);
/**
@ -724,7 +724,7 @@ IedServer_getBitStringAttributeValue(IedServer self, const DataAttribute* dataAt
*
* \return the value as a C string (null terminated string)
*/
const char*
LIB61850_API const char*
IedServer_getStringAttributeValue(IedServer self, const DataAttribute* dataAttribute);
@ -743,7 +743,7 @@ IedServer_getStringAttributeValue(IedServer self, const DataAttribute* dataAttri
*
* \return MmsValue object cached by the server.
*/
MmsValue*
LIB61850_API MmsValue*
IedServer_getFunctionalConstrainedData(IedServer self, DataObject* dataObject, FunctionalConstraint fc);
/**
@ -762,7 +762,7 @@ IedServer_getFunctionalConstrainedData(IedServer self, DataObject* dataObject, F
* \param dataAttribute the data attribute handle
* \param value MmsValue object used to update the value cached by the server.
*/
void
LIB61850_API void
IedServer_updateAttributeValue(IedServer self, DataAttribute* dataAttribute, MmsValue* value);
/**
@ -777,7 +777,7 @@ IedServer_updateAttributeValue(IedServer self, DataAttribute* dataAttribute, Mms
* \param dataAttribute the data attribute handle
* \param value the new float value of the data attribute.
*/
void
LIB61850_API void
IedServer_updateFloatAttributeValue(IedServer self, DataAttribute* dataAttribute, float value);
/**
@ -792,7 +792,7 @@ IedServer_updateFloatAttributeValue(IedServer self, DataAttribute* dataAttribute
* \param dataAttribute the data attribute handle
* \param value the new integer value of the data attribute.
*/
void
LIB61850_API void
IedServer_updateInt32AttributeValue(IedServer self, DataAttribute* dataAttribute, int32_t value);
/**
@ -807,7 +807,7 @@ IedServer_updateInt32AttributeValue(IedServer self, DataAttribute* dataAttribute
* \param dataAttribute the data attribute handle
* \param value the new Dbpos value of the data attribute.
*/
void
LIB61850_API void
IedServer_udpateDbposValue(IedServer self, DataAttribute* dataAttribute, Dbpos value);
/**
@ -822,7 +822,7 @@ IedServer_udpateDbposValue(IedServer self, DataAttribute* dataAttribute, Dbpos v
* \param dataAttribute the data attribute handle
* \param value the new 64 bit integer value of the data attribute.
*/
void
LIB61850_API void
IedServer_updateInt64AttributeValue(IedServer self, DataAttribute* dataAttribute, int64_t value);
/**
@ -837,7 +837,7 @@ IedServer_updateInt64AttributeValue(IedServer self, DataAttribute* dataAttribute
* \param dataAttribute the data attribute handle
* \param value the new unsigned integer value of the data attribute.
*/
void
LIB61850_API void
IedServer_updateUnsignedAttributeValue(IedServer self, DataAttribute* dataAttribute, uint32_t value);
/**
@ -852,7 +852,7 @@ IedServer_updateUnsignedAttributeValue(IedServer self, DataAttribute* dataAttrib
* \param dataAttribute the data attribute handle
* \param value the new bit string integer value of the data attribute.
*/
void
LIB61850_API void
IedServer_updateBitStringAttributeValue(IedServer self, DataAttribute* dataAttribute, uint32_t value);
/**
@ -867,7 +867,7 @@ IedServer_updateBitStringAttributeValue(IedServer self, DataAttribute* dataAttri
* \param dataAttribute the data attribute handle
* \param value the new boolean value of the data attribute.
*/
void
LIB61850_API void
IedServer_updateBooleanAttributeValue(IedServer self, DataAttribute* dataAttribute, bool value);
/**
@ -882,7 +882,7 @@ IedServer_updateBooleanAttributeValue(IedServer self, DataAttribute* dataAttribu
* \param dataAttribute the data attribute handle
* \param value the new visible string value of the data attribute.
*/
void
LIB61850_API void
IedServer_updateVisibleStringAttributeValue(IedServer self, DataAttribute* dataAttribute, char *value);
/**
@ -897,7 +897,7 @@ IedServer_updateVisibleStringAttributeValue(IedServer self, DataAttribute* dataA
* \param dataAttribute the data attribute handle
* \param value the new UTC time value of the data attribute as a ms timestamp
*/
void
LIB61850_API void
IedServer_updateUTCTimeAttributeValue(IedServer self, DataAttribute* dataAttribute, uint64_t value);
/**
@ -912,7 +912,7 @@ IedServer_updateUTCTimeAttributeValue(IedServer self, DataAttribute* dataAttribu
* \param dataAttribute the data attribute handle
* \param value the new UTC time value of the data attribute as a Timestamp
*/
void
LIB61850_API void
IedServer_updateTimestampAttributeValue(IedServer self, DataAttribute* dataAttribute, Timestamp* timestamp);
/**
@ -929,13 +929,13 @@ IedServer_updateTimestampAttributeValue(IedServer self, DataAttribute* dataAttri
* \param quality the new quality value
*
*/
void
LIB61850_API void
IedServer_updateQuality(IedServer self, DataAttribute* dataAttribute, Quality quality);
/**@}*/
void
LIB61850_API void
IedServer_setLogStorage(IedServer self, const char* logRef, LogStorage logStorage);
/**
@ -954,7 +954,7 @@ IedServer_setLogStorage(IedServer self, const char* logRef, LogStorage logStorag
* \param sgcb the handle of the setting group control block of the setting group
* \param newActiveSg the number of the new active setting group
*/
void
LIB61850_API void
IedServer_changeActiveSettingGroup(IedServer self, SettingGroupControlBlock* sgcb, uint8_t newActiveSg);
/**
@ -965,7 +965,7 @@ IedServer_changeActiveSettingGroup(IedServer self, SettingGroupControlBlock* sgc
*
* \return the number of the active setting group
*/
uint8_t
LIB61850_API uint8_t
IedServer_getActiveSettingGroup(IedServer self, SettingGroupControlBlock* sgcb);
/**
@ -994,7 +994,7 @@ typedef bool (*ActiveSettingGroupChangedHandler) (void* parameter, SettingGroupC
* \param handler the user provided callback handler.
* \param parameter a user provided parameter that is passed to the control handler.
*/
void
LIB61850_API void
IedServer_setActiveSettingGroupChangedHandler(IedServer self, SettingGroupControlBlock* sgcb,
ActiveSettingGroupChangedHandler handler, void* parameter);
@ -1026,7 +1026,7 @@ typedef bool (*EditSettingGroupChangedHandler) (void* parameter, SettingGroupCon
* \param handler the user provided callback handler.
* \param parameter a user provided parameter that is passed to the control handler.
*/
void
LIB61850_API void
IedServer_setEditSettingGroupChangedHandler(IedServer self, SettingGroupControlBlock* sgcb,
EditSettingGroupChangedHandler handler, void* parameter);
@ -1050,7 +1050,7 @@ typedef void (*EditSettingGroupConfirmationHandler) (void* parameter, SettingGro
* \param handler the user provided callback handler.
* \param parameter a user provided parameter that is passed to the control handler.
*/
void
LIB61850_API void
IedServer_setEditSettingGroupConfirmationHandler(IedServer self, SettingGroupControlBlock* sgcb,
EditSettingGroupConfirmationHandler handler, void* parameter);
@ -1157,7 +1157,7 @@ typedef ControlHandlerResult (*ControlHandler) (void* parameter, MmsValue* ctlVa
* \param handler a callback function of type ControlHandler
* \param parameter a user provided parameter that is passed to the control handler.
*/
void
LIB61850_API void
IedServer_setControlHandler(IedServer self, DataObject* node, ControlHandler handler, void* parameter);
/**
@ -1174,7 +1174,7 @@ IedServer_setControlHandler(IedServer self, DataObject* node, ControlHandler han
* \param parameter a user provided parameter that is passed to the control handler.
*
*/
void
LIB61850_API void
IedServer_setPerformCheckHandler(IedServer self, DataObject* node, ControlPerformCheckHandler handler, void* parameter);
/**
@ -1192,7 +1192,7 @@ IedServer_setPerformCheckHandler(IedServer self, DataObject* node, ControlPerfor
* \param parameter a user provided parameter that is passed to the control handler.
*
*/
void
LIB61850_API void
IedServer_setWaitForExecutionHandler(IedServer self, DataObject* node, ControlWaitForExecutionHandler handler, void* parameter);
/**@}*/
@ -1226,7 +1226,7 @@ typedef void (*SVCBEventHandler) (SVControlBlock* svcb, int event, void* paramet
* \param handler the event handler to be used
* \param parameter a user provided parameter that is passed to the handler.
*/
void
LIB61850_API void
IedServer_setSVCBHandler(IedServer self, SVControlBlock* svcb, SVCBEventHandler handler, void* parameter);
/**@}*/
@ -1277,7 +1277,7 @@ typedef MmsDataAccessError
* the monitored data attribute.
* \param parameter a user provided parameter that is passed to the WriteAccessHandler when called.
*/
void
LIB61850_API void
IedServer_handleWriteAccess(IedServer self, DataAttribute* dataAttribute,
WriteAccessHandler handler, void* parameter);
@ -1294,7 +1294,7 @@ typedef enum {
* \param policy the new policy to apply.
*
*/
void
LIB61850_API void
IedServer_setWriteAccessPolicy(IedServer self, FunctionalConstraint fc, AccessPolicy policy);
/**
@ -1325,7 +1325,7 @@ typedef MmsDataAccessError
* \param handler the callback function that is invoked if a client tries to read a data object.
* \param parameter a user provided parameter that is passed to the callback function.
*/
void
LIB61850_API void
IedServer_setReadAccessHandler(IedServer self, ReadAccessHandler handler, void* parameter);
/**@}*/

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

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

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

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

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

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

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

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

@ -28,8 +28,7 @@
extern "C" {
#endif
#include <stdint.h>
#include <stdbool.h>
#include "libiec61850_common_api.h"
/** \addtogroup server_api_group
@ -105,7 +104,7 @@ struct sLogStorage {
* \param self the pointer of the LogStorage instance
* \param maxEntries the maximum number of log entries
*/
void
LIB61850_API void
LogStorage_setMaxLogEntries(LogStorage self, int maxEntries);
/**
@ -116,7 +115,7 @@ LogStorage_setMaxLogEntries(LogStorage self, int maxEntries);
*
* \return the entryID of the new entry
*/
uint64_t
LIB61850_API uint64_t
LogStorage_addEntry(LogStorage self, uint64_t timestamp);
/**
@ -131,7 +130,7 @@ LogStorage_addEntry(LogStorage self, uint64_t timestamp);
*
* \return true if the entry data was successfully added, false otherwise
*/
bool
LIB61850_API bool
LogStorage_addEntryData(LogStorage self, uint64_t entryID, const char* dataRef, uint8_t* data, int dataSize, uint8_t reasonCode);
/**
@ -146,7 +145,7 @@ LogStorage_addEntryData(LogStorage self, uint64_t entryID, const char* dataRef,
*
* \return true if the request has been successful, false otherwise
*/
bool
LIB61850_API bool
LogStorage_getEntries(LogStorage self, uint64_t startingTime, uint64_t endingTime,
LogEntryCallback entryCallback, LogEntryDataCallback entryDataCallback, void* parameter);
@ -165,7 +164,7 @@ LogStorage_getEntries(LogStorage self, uint64_t startingTime, uint64_t endingTim
*
* \return true if the request has been successful, false otherwise
*/
bool
LIB61850_API bool
LogStorage_getEntriesAfter(LogStorage self, uint64_t startingTime, uint64_t entryID,
LogEntryCallback entryCallback, LogEntryDataCallback entryDataCallback, void* parameter);
@ -181,7 +180,7 @@ LogStorage_getEntriesAfter(LogStorage self, uint64_t startingTime, uint64_t entr
* \param oldEntryTime pointer to store the entry time of the oldest entry
*
*/
bool
LIB61850_API bool
LogStorage_getOldestAndNewestEntries(LogStorage self, uint64_t* newEntry, uint64_t* newEntryTime,
uint64_t* oldEntry, uint64_t* oldEntryTime);
@ -190,7 +189,7 @@ LogStorage_getOldestAndNewestEntries(LogStorage self, uint64_t* newEntry, uint64
*
* \param self the pointer of the LogStorage instance
*/
void
LIB61850_API void
LogStorage_destroy(LogStorage self);
/**@}*/

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

@ -84,7 +84,7 @@ typedef struct sMmsConnection* MmsConnection;
*
* \return the newly created instance.
*/
MmsConnection
LIB61850_API MmsConnection
MmsConnection_create(void);
/**
@ -94,7 +94,7 @@ MmsConnection_create(void);
*
* \return the newly created instance.
*/
MmsConnection
LIB61850_API MmsConnection
MmsConnection_createSecure(TLSConfiguration tlsConfig);
/**
@ -108,7 +108,7 @@ MmsConnection_createSecure(TLSConfiguration tlsConfig);
*
* \return the newly created instance.
*/
MmsConnection
LIB61850_API MmsConnection
MmsConnection_createNonThreaded(TLSConfiguration tlsConfig);
/**
@ -135,7 +135,7 @@ typedef void (*MmsRawMessageHandler) (void* parameter, uint8_t* message, int mes
* \param handler the connection specific callback function
* \param a user provided parameter passed to the callback function (use NULL if not required).
*/
void
LIB61850_API void
MmsConnection_setRawMessageHandler(MmsConnection self, MmsRawMessageHandler handler, void* parameter);
/**
@ -148,7 +148,7 @@ MmsConnection_setRawMessageHandler(MmsConnection self, MmsRawMessageHandler hand
* \param self the MmsServer instance
* \param basepath the new virtual filestore basepath
*/
void
LIB61850_API void
MmsConnection_setFilestoreBasepath(MmsConnection self, const char* basepath);
/**
@ -157,7 +157,7 @@ MmsConnection_setFilestoreBasepath(MmsConnection self, const char* basepath);
* \param self MmsConnection instance to operate on
* \param timeoutInMs request timeout in milliseconds
*/
void
LIB61850_API void
MmsConnection_setRequestTimeout(MmsConnection self, uint32_t timeoutInMs);
/**
@ -166,7 +166,7 @@ MmsConnection_setRequestTimeout(MmsConnection self, uint32_t timeoutInMs);
* \param self MmsConnection instance to operate on
* \param timeoutInMs connect timeout in milliseconds
*/
void
LIB61850_API void
MmsConnection_setConnectTimeout(MmsConnection self, uint32_t timeoutInMs);
/**
@ -180,7 +180,7 @@ MmsConnection_setConnectTimeout(MmsConnection self, uint32_t timeoutInMs);
* \param parameter a user specified parameter that will be passed to the handler function on each
* invocation.
*/
void
LIB61850_API void
MmsConnection_setInformationReportHandler(MmsConnection self, MmsInformationReportHandler handler,
void* parameter);
@ -190,7 +190,7 @@ MmsConnection_setInformationReportHandler(MmsConnection self, MmsInformationRepo
* \param self MmsConnection instance to operate on
* \return params the to be used by this connection
*/
IsoConnectionParameters
LIB61850_API IsoConnectionParameters
MmsConnection_getIsoConnectionParameters(MmsConnection self);
/**
@ -199,12 +199,12 @@ MmsConnection_getIsoConnectionParameters(MmsConnection self);
* \param self MmsConnection instance to operate on
* \return params the to be used by this connection
*/
MmsConnectionParameters
LIB61850_API MmsConnectionParameters
MmsConnection_getMmsConnectionParameters(MmsConnection self);
typedef void (*MmsConnectionStateChangedHandler) (MmsConnection connection, void* parameter, MmsConnectionState newState);
void
LIB61850_API void
MmsConnection_setConnectionStateChangedHandler(MmsConnection self, MmsConnectionStateChangedHandler handler, void* parameter);
/**
@ -221,7 +221,7 @@ typedef void (*MmsConnectionLostHandler) (MmsConnection connection, void* parame
* \param handler the user provided callback function
* \param handlerParameter a parameter that will be passed to the callback function. Can be set to NULL if not required.
*/
void
LIB61850_API void
MmsConnection_setConnectionLostHandler(MmsConnection self, MmsConnectionLostHandler handler, void* handlerParameter);
/**
@ -230,7 +230,7 @@ MmsConnection_setConnectionLostHandler(MmsConnection self, MmsConnectionLostHand
* \param self MmsConnection instance to operate on
* \param params the ISO client parameters to use
*/
void
LIB61850_API void
MmsConnection_setIsoConnectionParameters(MmsConnection self, IsoConnectionParameters* params);
/**
@ -238,7 +238,7 @@ MmsConnection_setIsoConnectionParameters(MmsConnection self, IsoConnectionParame
*
* \param self MmsConnection instance to operate on
*/
void
LIB61850_API void
MmsConnection_destroy(MmsConnection self);
/*******************************************************************************
@ -258,10 +258,10 @@ MmsConnection_destroy(MmsConnection self);
*
* \return true on success. false if the connection attempt failed.
*/
bool
LIB61850_API bool
MmsConnection_connect(MmsConnection self, MmsError* mmsError, const char* serverName, int serverPort);
void
LIB61850_API void
MmsConnection_connectAsync(MmsConnection self, MmsError* mmsError, const char* serverName, int serverPort);
@ -275,7 +275,7 @@ MmsConnection_connectAsync(MmsConnection self, MmsError* mmsError, const char* s
* \return true when connection is currently waiting and calling thread can be suspended, false means
* connection is busy and the tick function should be called again as soon as possible.
*/
bool
LIB61850_API bool
MmsConnection_tick(MmsConnection self);
/**
@ -286,7 +286,7 @@ MmsConnection_tick(MmsConnection self);
*
* \param self MmsConnection instance to operate on
*/
void
LIB61850_API void
MmsConnection_close(MmsConnection self);
typedef void
@ -303,10 +303,10 @@ typedef void
* \param self MmsConnection instance to operate on
* \param mmsError user provided variable to store error code
*/
void
LIB61850_API void
MmsConnection_abort(MmsConnection self, MmsError* mmsError);
void
LIB61850_API void
MmsConnection_abortAsync(MmsConnection self, MmsError* mmsError);
/**
@ -320,10 +320,10 @@ MmsConnection_abortAsync(MmsConnection self, MmsError* mmsError);
* \param self MmsConnection instance to operate on
* \param mmsError user provided variable to store error code
*/
void
LIB61850_API void
MmsConnection_conclude(MmsConnection self, MmsError* mmsError);
void
LIB61850_API void
MmsConnection_concludeAsync(MmsConnection self, MmsError* mmsError, MmsConnection_ConcludeAbortHandler handler, void* parameter);
typedef void
@ -342,10 +342,10 @@ typedef void
*
* \return the of VMD specific variable names or NULL if the request failed.
*/
LinkedList /* <char*> */
LIB61850_API LinkedList /* <char*> */
MmsConnection_getVMDVariableNames(MmsConnection self, MmsError* mmsError);
uint32_t
LIB61850_API uint32_t
MmsConnection_getVMDVariableNamesAsync(MmsConnection self, MmsError* mmsError, const char* continueAfter,
MmsConnection_GetNameListHandler handler, void* parameter);
@ -360,10 +360,10 @@ MmsConnection_getVMDVariableNamesAsync(MmsConnection self, MmsError* mmsError, c
* \return the list of domain names or NULL if the request failed.
*
*/
LinkedList /* <char*> */
LIB61850_API LinkedList /* <char*> */
MmsConnection_getDomainNames(MmsConnection self, MmsError* mmsError);
uint32_t
LIB61850_API uint32_t
MmsConnection_getDomainNamesAsync(MmsConnection self, MmsError* mmsError, const char* continueAfter,
MmsConnection_GetNameListHandler handler, void* parameter);
@ -378,10 +378,10 @@ MmsConnection_getDomainNamesAsync(MmsConnection self, MmsError* mmsError, const
*
* \return the of domain specific variable names or NULL if the request failed.
*/
LinkedList /* <char*> */
LIB61850_API LinkedList /* <char*> */
MmsConnection_getDomainVariableNames(MmsConnection self, MmsError* mmsError, const char* domainId);
uint32_t
LIB61850_API uint32_t
MmsConnection_getDomainVariableNamesAsync(MmsConnection self, MmsError* mmsError, const char* domainId,
const char* continueAfter, MmsConnection_GetNameListHandler handler, void* parameter);
@ -396,10 +396,10 @@ MmsConnection_getDomainVariableNamesAsync(MmsConnection self, MmsError* mmsError
*
* \return the domain specific named variable list names or NULL if the request failed.
*/
LinkedList /* <char*> */
LIB61850_API LinkedList /* <char*> */
MmsConnection_getDomainVariableListNames(MmsConnection self, MmsError* mmsError, const char* domainId);
uint32_t
LIB61850_API uint32_t
MmsConnection_getDomainVariableListNamesAsync(MmsConnection self, MmsError* mmsError, const char* domainId,
const char* continueAfter, MmsConnection_GetNameListHandler handler, void* parameter);
@ -414,10 +414,10 @@ MmsConnection_getDomainVariableListNamesAsync(MmsConnection self, MmsError* mmsE
*
* \return the domain specific journal names or NULL if the request failed.
*/
LinkedList /* <char*> */
LIB61850_API LinkedList /* <char*> */
MmsConnection_getDomainJournals(MmsConnection self, MmsError* mmsError, const char* domainId);
uint32_t
LIB61850_API uint32_t
MmsConnection_getDomainJournalsAsync(MmsConnection self, MmsError* mmsError, const char* domainId,
const char* continueAfter, MmsConnection_GetNameListHandler handler, void* parameter);
@ -431,10 +431,10 @@ MmsConnection_getDomainJournalsAsync(MmsConnection self, MmsError* mmsError, con
*
* \return the association specific named variable list names or NULL if the request failed.
*/
LinkedList /* <char*> */
LIB61850_API LinkedList /* <char*> */
MmsConnection_getVariableListNamesAssociationSpecific(MmsConnection self, MmsError* mmsError);
uint32_t
LIB61850_API uint32_t
MmsConnection_getVariableListNamesAssociationSpecificAsync(MmsConnection self, MmsError* mmsError,
const char* continueAfter, MmsConnection_GetNameListHandler handler, void* parameter);
@ -451,7 +451,7 @@ MmsConnection_getVariableListNamesAssociationSpecificAsync(MmsConnection self, M
* either be a simple value or a complex value or array. It is also possible that the return value is NULL
* even if mmsError = MMS_ERROR_NON. This is the case when the servers returns an empty result list.
*/
MmsValue*
LIB61850_API MmsValue*
MmsConnection_readVariable(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId);
@ -468,7 +468,7 @@ typedef void
*
* \return invoke ID of the request when the request was sent successfully
*/
uint32_t
LIB61850_API uint32_t
MmsConnection_readVariableAsync(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId,
MmsConnection_ReadVariableHandler handler, void* parameter);
@ -486,7 +486,7 @@ MmsConnection_readVariableAsync(MmsConnection self, MmsError* mmsError, const ch
* a simple or complex type if numberOfElements is 0, or an array containing the selected
* array elements of numberOfElements > 0.
*/
MmsValue*
LIB61850_API MmsValue*
MmsConnection_readArrayElements(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId,
uint32_t startIndex, uint32_t numberOfElements);
@ -505,7 +505,7 @@ MmsConnection_readArrayElements(MmsConnection self, MmsError* mmsError, const ch
*
* \return invoke ID of the request when the request was sent successfully
*/
uint32_t
LIB61850_API uint32_t
MmsConnection_readArrayElementsAsync(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId,
uint32_t startIndex, uint32_t numberOfElements,
MmsConnection_ReadVariableHandler handler, void* parameter);
@ -523,11 +523,11 @@ MmsConnection_readArrayElementsAsync(MmsConnection self, MmsError* mmsError, con
*
* \return Returns a MmsValue object or NULL if the request failed.
*/
MmsValue*
LIB61850_API MmsValue*
MmsConnection_readSingleArrayElementWithComponent(MmsConnection self, MmsError* mmsError,
const char* domainId, const char* itemId, uint32_t index, const char* componentId);
uint32_t
LIB61850_API uint32_t
MmsConnection_readSingleArrayElementWithComponentAsync(MmsConnection self, MmsError* mmsError,
const char* domainId, const char* itemId,
uint32_t index, const char* componentId,
@ -545,11 +545,11 @@ MmsConnection_readSingleArrayElementWithComponentAsync(MmsConnection self, MmsEr
* is of type MMS_ARRAY and contains the variable values of simple or complex type
* in the order as they appeared in the item ID list.
*/
MmsValue*
LIB61850_API MmsValue*
MmsConnection_readMultipleVariables(MmsConnection self, MmsError* mmsError, const char* domainId,
LinkedList /*<char*>*/ items);
uint32_t
LIB61850_API uint32_t
MmsConnection_readMultipleVariablesAsync(MmsConnection self, MmsError* mmsError,
const char* domainId, LinkedList /*<char*>*/items,
MmsConnection_ReadVariableHandler handler, void* parameter);
@ -567,14 +567,14 @@ MmsConnection_readMultipleVariablesAsync(MmsConnection self, MmsError* mmsError,
*
* \return when successful, the data access error value returned by the server
*/
MmsDataAccessError
LIB61850_API MmsDataAccessError
MmsConnection_writeVariable(MmsConnection self, MmsError* mmsError,
const char* domainId, const char* itemId, MmsValue* value);
typedef void
(*MmsConnection_WriteVariableHandler) (int invokeId, void* parameter, MmsError mmsError, MmsDataAccessError accessError);
uint32_t
LIB61850_API uint32_t
MmsConnection_writeVariableAsync(MmsConnection self, MmsError* mmsError,
const char* domainId, const char* itemId, MmsValue* value,
MmsConnection_WriteVariableHandler handler, void* parameter);
@ -593,12 +593,12 @@ MmsConnection_writeVariableAsync(MmsConnection self, MmsError* mmsError,
*
* \return when successful, the data access error value returned by the server
*/
MmsDataAccessError
LIB61850_API MmsDataAccessError
MmsConnection_writeSingleArrayElementWithComponent(MmsConnection self, MmsError* mmsError,
const char* domainId, const char* itemId,
uint32_t arrayIndex, const char* componentId, MmsValue* value);
uint32_t
LIB61850_API uint32_t
MmsConnection_writeSingleArrayElementWithComponentAsync(MmsConnection self, MmsError* mmsError,
const char* domainId, const char* itemId,
uint32_t arrayIndex, const char* componentId, MmsValue* value,
@ -622,12 +622,12 @@ MmsConnection_writeSingleArrayElementWithComponentAsync(MmsConnection self, MmsE
*
* \return when successful, the data access error value returned by the server
*/
MmsDataAccessError
LIB61850_API MmsDataAccessError
MmsConnection_writeArrayElements(MmsConnection self, MmsError* mmsError,
const char* domainId, const char* itemId, int index, int numberOfElements,
MmsValue* value);
uint32_t
LIB61850_API uint32_t
MmsConnection_writeArrayElementsAsync(MmsConnection self, MmsError* mmsError,
const char* domainId, const char* itemId, int index, int numberOfElements,
MmsValue* value,
@ -655,12 +655,12 @@ typedef void
* \param[out] the MmsValue objects of type MMS_DATA_ACCESS_ERROR representing the write success of a single variable
* write.
*/
void
LIB61850_API void
MmsConnection_writeMultipleVariables(MmsConnection self, MmsError* mmsError, const char* domainId,
LinkedList /*<char*>*/ items, LinkedList /* <MmsValue*> */ values,
LinkedList* /* <MmsValue*> */ accessResults);
uint32_t
LIB61850_API uint32_t
MmsConnection_writeMultipleVariablesAsync(MmsConnection self, MmsError* mmsError, const char* domainId,
LinkedList /*<char*>*/ items, LinkedList /* <MmsValue*> */ values,
MmsConnection_WriteMultipleVariablesHandler handler, void* parameter);
@ -681,13 +681,13 @@ MmsConnection_writeMultipleVariablesAsync(MmsConnection self, MmsError* mmsError
* \param[out] the MmsValue objects of type MMS_DATA_ACCESS_ERROR representing the write success of a single variable
* write.
*/
void
LIB61850_API void
MmsConnection_writeNamedVariableList(MmsConnection self, MmsError* mmsError, bool isAssociationSpecific,
const char* domainId, const char* itemId, LinkedList /* <MmsValue*> */values,
LinkedList* /* <MmsValue*> */accessResults);
uint32_t
LIB61850_API uint32_t
MmsConnection_writeNamedVariableListAsync(MmsConnection self, MmsError* mmsError, bool isAssociationSpecific,
const char* domainId, const char* itemId, LinkedList /* <MmsValue*> */values,
MmsConnection_WriteMultipleVariablesHandler handler, void* parameter);
@ -702,7 +702,7 @@ MmsConnection_writeNamedVariableListAsync(MmsConnection self, MmsError* mmsError
*
* \return Returns a MmsTypeSpecification object or NULL if the request failed.
*/
MmsVariableSpecification*
LIB61850_API MmsVariableSpecification*
MmsConnection_getVariableAccessAttributes(MmsConnection self, MmsError* mmsError,
const char* domainId, const char* itemId);
@ -710,7 +710,7 @@ typedef void
(*MmsConnection_GetVariableAccessAttributesHandler) (int invokeId, void* parameter, MmsError mmsError, MmsVariableSpecification* spec);
uint32_t
LIB61850_API uint32_t
MmsConnection_getVariableAccessAttributesAsync(MmsConnection self, MmsError* mmsError,
const char* domainId, const char* itemId,
MmsConnection_GetVariableAccessAttributesHandler, void* parameter);
@ -731,11 +731,11 @@ MmsConnection_getVariableAccessAttributesAsync(MmsConnection self, MmsError* mms
* is of type MMS_ARRAY and contains the variable values of simple or complex type
* in the order as they appeared in named variable list definition.
*/
MmsValue*
LIB61850_API MmsValue*
MmsConnection_readNamedVariableListValues(MmsConnection self, MmsError* mmsError, const char* domainId,
const char* listName, bool specWithResult);
uint32_t
LIB61850_API uint32_t
MmsConnection_readNamedVariableListValuesAsync(MmsConnection self, MmsError* mmsError,
const char* domainId, const char* listName, bool specWithResult,
MmsConnection_ReadVariableHandler handler, void* parameter);
@ -753,11 +753,11 @@ MmsConnection_readNamedVariableListValuesAsync(MmsConnection self, MmsError* mms
* is of type MMS_ARRAY and contains the variable values of simple or complex type
* in the order as they appeared in named variable list definition.
*/
MmsValue*
LIB61850_API MmsValue*
MmsConnection_readNamedVariableListValuesAssociationSpecific(MmsConnection self, MmsError* mmsError,
const char* listName, bool specWithResult);
uint32_t
LIB61850_API uint32_t
MmsConnection_readNamedVariableListValuesAssociationSpecificAsync(MmsConnection self, MmsError* mmsError,
const char* listName, bool specWithResult,
MmsConnection_ReadVariableHandler handler, void* parameter);
@ -775,11 +775,11 @@ MmsConnection_readNamedVariableListValuesAssociationSpecificAsync(MmsConnection
* \param variableSpecs a list of variable specifications for the new variable list. The list
* elements have to be of type MmsVariableAccessSpecification*.
*/
void
LIB61850_API void
MmsConnection_defineNamedVariableList(MmsConnection self, MmsError* mmsError, const char* domainId,
const char* listName, LinkedList variableSpecs);
uint32_t
LIB61850_API uint32_t
MmsConnection_defineNamedVariableListAsync(MmsConnection self, MmsError* mmsError, const char* domainId,
const char* listName, LinkedList variableSpecs,
MmsConnection_GenericServiceHandler handler, void* parameter);
@ -795,11 +795,11 @@ MmsConnection_defineNamedVariableListAsync(MmsConnection self, MmsError* mmsErro
* \param variableSpecs list of variable specifications for the new variable list.The list
* elements have to be of type MmsVariableAccessSpecification*.
*/
void
LIB61850_API void
MmsConnection_defineNamedVariableListAssociationSpecific(MmsConnection self, MmsError* mmsError,
const char* listName, LinkedList variableSpecs);
uint32_t
LIB61850_API uint32_t
MmsConnection_defineNamedVariableListAssociationSpecificAsync(MmsConnection self, MmsError* mmsError,
const char* listName, LinkedList variableSpecs,
MmsConnection_GenericServiceHandler handler, void* parameter);
@ -819,7 +819,7 @@ MmsConnection_defineNamedVariableListAssociationSpecificAsync(MmsConnection self
*
* \return List of names of the variable list entries or NULL if the request failed
*/
LinkedList /* <MmsVariableAccessSpecification*> */
LIB61850_API LinkedList /* <MmsVariableAccessSpecification*> */
MmsConnection_readNamedVariableListDirectory(MmsConnection self, MmsError* mmsError,
const char* domainId, const char* listName, bool* deletable);
@ -828,7 +828,7 @@ typedef void
(*MmsConnection_ReadNVLDirectoryHandler) (int invokeId, void* parameter, MmsError mmsError, LinkedList /* <MmsVariableAccessSpecification*> */ specs, bool deletable);
uint32_t
LIB61850_API uint32_t
MmsConnection_readNamedVariableListDirectoryAsync(MmsConnection self, MmsError* mmsError,
const char* domainId, const char* listName,
MmsConnection_ReadNVLDirectoryHandler handler, void* parameter);
@ -843,11 +843,11 @@ MmsConnection_readNamedVariableListDirectoryAsync(MmsConnection self, MmsError*
*
* \return List of names of the variable list entries or NULL if the request failed
*/
LinkedList /* <MmsVariableAccessSpecification*> */
LIB61850_API LinkedList /* <MmsVariableAccessSpecification*> */
MmsConnection_readNamedVariableListDirectoryAssociationSpecific(MmsConnection self, MmsError* mmsError,
const char* listName, bool* deletable);
uint32_t
LIB61850_API uint32_t
MmsConnection_readNamedVariableListDirectoryAssociationSpecificAsync(MmsConnection self, MmsError* mmsError,
const char* listName,
MmsConnection_ReadNVLDirectoryHandler handler, void* parameter);
@ -865,11 +865,11 @@ MmsConnection_readNamedVariableListDirectoryAssociationSpecificAsync(MmsConnecti
*
* \return true if named variable list has been deleted, false otherwise
*/
bool
LIB61850_API bool
MmsConnection_deleteNamedVariableList(MmsConnection self, MmsError* mmsError, const char* domainId, const char* listName);
uint32_t
LIB61850_API uint32_t
MmsConnection_deleteNamedVariableListAsync(MmsConnection self, MmsError* mmsError, const char* domainId, const char* listName,
MmsConnection_GenericServiceHandler handler, void* parameter);
@ -882,12 +882,12 @@ MmsConnection_deleteNamedVariableListAsync(MmsConnection self, MmsError* mmsErro
*
* \return true if named variable list has been deleted, false otherwise
*/
bool
LIB61850_API bool
MmsConnection_deleteAssociationSpecificNamedVariableList(MmsConnection self, MmsError* mmsError,
const char* listName);
uint32_t
LIB61850_API uint32_t
MmsConnection_deleteAssociationSpecificNamedVariableListAsync(MmsConnection self, MmsError* mmsError, const char* listName,
MmsConnection_GenericServiceHandler handler, void* parameter);
@ -902,7 +902,7 @@ MmsConnection_deleteAssociationSpecificNamedVariableListAsync(MmsConnection self
*
* \return reference to the new MmsVariableSpecfication object
*/
MmsVariableAccessSpecification*
LIB61850_API MmsVariableAccessSpecification*
MmsVariableAccessSpecification_create(char* domainId, char* itemId);
/**
@ -921,7 +921,7 @@ MmsVariableAccessSpecification_create(char* domainId, char* itemId);
*
* \return reference to the new MmsVariableSpecfication object
*/
MmsVariableAccessSpecification*
LIB61850_API MmsVariableAccessSpecification*
MmsVariableAccessSpecification_createAlternateAccess(char* domainId, char* itemId, int32_t index,
char* componentName);
@ -930,7 +930,7 @@ MmsVariableAccessSpecification_createAlternateAccess(char* domainId, char* itemI
*
* \param self the instance to delete
*/
void
LIB61850_API void
MmsVariableAccessSpecification_destroy(MmsVariableAccessSpecification* self);
/**
@ -942,10 +942,10 @@ MmsVariableAccessSpecification_destroy(MmsVariableAccessSpecification* self);
* \param self MmsConnection instance to operate on
* \param localDetail the maximum size of the MMS PDU that will be accepted.
*/
void
LIB61850_API void
MmsConnection_setLocalDetail(MmsConnection self, int32_t localDetail);
int32_t
LIB61850_API int32_t
MmsConnection_getLocalDetail(MmsConnection self);
/**
@ -957,18 +957,18 @@ MmsConnection_getLocalDetail(MmsConnection self);
* \param self MmsConnection instance to operate on
* \param mmsError user provided variable to store error code
*/
MmsServerIdentity*
LIB61850_API MmsServerIdentity*
MmsConnection_identify(MmsConnection self, MmsError* mmsError);
typedef void
(*MmsConnection_IdentifyHandler) (int invokeId, void* parameter, MmsError mmsError,
char* vendorName, char* modelName, char* revision);
uint32_t
LIB61850_API uint32_t
MmsConnection_identifyAsync(MmsConnection self, MmsError* mmsError,
MmsConnection_IdentifyHandler handler, void* parameter);
void
LIB61850_API void
MmsServerIdentity_destroy(MmsServerIdentity* self);
/**
@ -983,14 +983,14 @@ MmsServerIdentity_destroy(MmsServerIdentity* self);
* \param[out] vmdPhysicalStatus user provided variable to store the physical state of the VMD
* \param[in] extendedDerivation instructs the server to invoke self-diagnosis routines to determine server status
*/
void
LIB61850_API void
MmsConnection_getServerStatus(MmsConnection self, MmsError* mmsError, int* vmdLogicalStatus, int* vmdPhysicalStatus,
bool extendedDerivation);
typedef void
(*MmsConnection_GetServerStatusHandler) (int invokeId, void* parameter, MmsError mmsError, int vmdLogicalStatus, int vmdPhysicalStatus);
uint32_t
LIB61850_API uint32_t
MmsConnection_getServerStatusAsync(MmsConnection self, MmsError* mmsError, bool extendedDerivation,
MmsConnection_GetServerStatusHandler handler, void* parameter);
@ -1028,14 +1028,14 @@ typedef void
*
* \return the FRSM ID (file read state machine) handle of the opened file
*/
int32_t
LIB61850_API int32_t
MmsConnection_fileOpen(MmsConnection self, MmsError* mmsError, const char* filename, uint32_t initialPosition,
uint32_t* fileSize, uint64_t* lastModified);
typedef void
(*MmsConnection_FileOpenHandler) (int invokeId, void* parameter, MmsError mmsError, int32_t frsmId, uint32_t fileSize, uint64_t lastModified);
uint32_t
LIB61850_API uint32_t
MmsConnection_fileOpenAsync(MmsConnection self, MmsError* mmsError, const char* filename, uint32_t initialPosition, MmsConnection_FileOpenHandler handler,
void* parameter);
@ -1051,10 +1051,10 @@ MmsConnection_fileOpenAsync(MmsConnection self, MmsError* mmsError, const char*
*
* \return true if more data follows, false if last data has been received.
*/
bool
LIB61850_API bool
MmsConnection_fileRead(MmsConnection self, MmsError* mmsError, int32_t frsmId, MmsFileReadHandler handler, void* handlerParameter);
uint32_t
LIB61850_API uint32_t
MmsConnection_fileReadAsync(MmsConnection self, MmsError* mmsError, int32_t frsmId, MmsConnection_FileReadHandler handler, void* parameter);
/**
@ -1064,10 +1064,10 @@ MmsConnection_fileReadAsync(MmsConnection self, MmsError* mmsError, int32_t frsm
* \param mmsError user provided variable to store error code
* \param frsmId id of the file to close
*/
void
LIB61850_API void
MmsConnection_fileClose(MmsConnection self, MmsError* mmsError, int32_t frsmId);
uint32_t
LIB61850_API uint32_t
MmsConnection_fileCloseAsync(MmsConnection self, MmsError* mmsError, uint32_t frsmId, MmsConnection_GenericServiceHandler handler, void* parameter);
/**
@ -1077,10 +1077,10 @@ MmsConnection_fileCloseAsync(MmsConnection self, MmsError* mmsError, uint32_t fr
* \param mmsError user provided variable to store error code
* \param fileName name of the file to delete
*/
void
LIB61850_API void
MmsConnection_fileDelete(MmsConnection self, MmsError* mmsError, const char* fileName);
uint32_t
LIB61850_API uint32_t
MmsConnection_fileDeleteAsync(MmsConnection self, MmsError* mmsError, const char* fileName,
MmsConnection_GenericServiceHandler handler, void* parameter);
@ -1092,10 +1092,10 @@ MmsConnection_fileDeleteAsync(MmsConnection self, MmsError* mmsError, const char
* \param currentFileName name of the file to rename
* \param newFileName new name of the file
*/
void
LIB61850_API void
MmsConnection_fileRename(MmsConnection self, MmsError* mmsError, const char* currentFileName, const char* newFileName);
uint32_t
LIB61850_API uint32_t
MmsConnection_fileRenameAsync(MmsConnection self, MmsError* mmsError, const char* currentFileName, const char* newFileName,
MmsConnection_GenericServiceHandler handler, void* parameter);
@ -1107,10 +1107,10 @@ MmsConnection_fileRenameAsync(MmsConnection self, MmsError* mmsError, const char
* \param sourceFile the name of the source file (client side name)
* \param destinationFile the name of the destination file (server side name)
*/
void
LIB61850_API void
MmsConnection_obtainFile(MmsConnection self, MmsError* mmsError, const char* sourceFile, const char* destinationFile);
uint32_t
LIB61850_API uint32_t
MmsConnection_obtainFileAsync(MmsConnection self, MmsError* mmsError, const char* sourceFile, const char* destinationFile,
MmsConnection_GenericServiceHandler handler, void* parameter);
@ -1130,11 +1130,11 @@ MmsConnection_obtainFileAsync(MmsConnection self, MmsError* mmsError, const char
*
* \return (more follows) true if more data is available
*/
bool
LIB61850_API bool
MmsConnection_getFileDirectory(MmsConnection self, MmsError* mmsError, const char* fileSpecification, const char* continueAfter,
MmsFileDirectoryHandler handler, void* handlerParameter);
uint32_t
LIB61850_API uint32_t
MmsConnection_getFileDirectoryAsync(MmsConnection self, MmsError* mmsError, const char* fileSpecification, const char* continueAfter,
MmsConnection_FileDirectoryHandler handler, void* parameter);
@ -1166,41 +1166,41 @@ struct sMmsJournalVariable {
*
* \param self the MmsJournalEntry instance to destroy
*/
void
LIB61850_API void
MmsJournalEntry_destroy(MmsJournalEntry self);
const MmsValue*
LIB61850_API const MmsValue*
MmsJournalEntry_getEntryID(MmsJournalEntry self);
const MmsValue*
LIB61850_API const MmsValue*
MmsJournalEntry_getOccurenceTime(MmsJournalEntry self);
const LinkedList /* <MmsJournalVariable> */
LIB61850_API const LinkedList /* <MmsJournalVariable> */
MmsJournalEntry_getJournalVariables(MmsJournalEntry self);
const char*
LIB61850_API const char*
MmsJournalVariable_getTag(MmsJournalVariable self);
const MmsValue*
LIB61850_API const MmsValue*
MmsJournalVariable_getValue(MmsJournalVariable self);
typedef void
(*MmsConnection_ReadJournalHandler) (int invokeId, void* parameter, MmsError mmsError, LinkedList /* <MmsJournalEntry> */ journalEntries, bool moreFollows);
LinkedList /* <MmsJournalEntry> */
LIB61850_API LinkedList /* <MmsJournalEntry> */
MmsConnection_readJournalTimeRange(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId,
MmsValue* startTime, MmsValue* endTime, bool* moreFollows);
uint32_t
LIB61850_API uint32_t
MmsConnection_readJournalTimeRangeAsync(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId,
MmsValue* startTime, MmsValue* endTime, MmsConnection_ReadJournalHandler handler, void* parameter);
LinkedList /* <MmsJournalEntry> */
LIB61850_API LinkedList /* <MmsJournalEntry> */
MmsConnection_readJournalStartAfter(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId,
MmsValue* timeSpecification, MmsValue* entrySpecification, bool* moreFollows);
uint32_t
LIB61850_API uint32_t
MmsConnection_readJournalStartAfterAsync(MmsConnection self, MmsError* mmsError, const char* domainId, const char* itemId,
MmsValue* timeSpecification, MmsValue* entrySpecification, MmsConnection_ReadJournalHandler handler, void* parameter);
@ -1209,7 +1209,7 @@ MmsConnection_readJournalStartAfterAsync(MmsConnection self, MmsError* mmsError,
*
* \param self the object to destroy
*/
void
LIB61850_API void
MmsServerIdentity_destroy(MmsServerIdentity* self);
/**@}*/

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

@ -1,7 +1,7 @@
/*
* mms_value.h
*
* Copyright 2013 Michael Zillgith
* Copyright 2013-2018 Michael Zillgith
*
* This file is part of libIEC61850.
*
@ -31,7 +31,6 @@ extern "C" {
#include "libiec61850_common_api.h"
#include "mms_common.h"
#include "mms_types.h"
#include "ber_integer.h"
/**
* \defgroup common_api_group libIEC61850 API common parts
@ -79,7 +78,7 @@ typedef struct sMmsValue MmsValue;
*
* \return a newly created array instance
*/
MmsValue*
LIB61850_API MmsValue*
MmsValue_createArray(MmsVariableSpecification* elementType, int size);
/**
@ -89,7 +88,7 @@ MmsValue_createArray(MmsVariableSpecification* elementType, int size);
*
* \return the size of the array
*/
uint32_t
LIB61850_API uint32_t
MmsValue_getArraySize(const MmsValue* self);
/**
@ -100,7 +99,7 @@ MmsValue_getArraySize(const MmsValue* self);
*
* \return the element object
*/
MmsValue*
LIB61850_API MmsValue*
MmsValue_getElement(const MmsValue* array, int index);
/**
@ -110,7 +109,7 @@ MmsValue_getElement(const MmsValue* array, int index);
*
* \return a newly created empty array instance
*/
MmsValue*
LIB61850_API MmsValue*
MmsValue_createEmptyArray(int size);
/**
@ -123,7 +122,7 @@ MmsValue_createEmptyArray(int size);
* \param the index of the element to set/replace
* \param elementValue the (new) value of the element
*/
void
LIB61850_API void
MmsValue_setElement(MmsValue* complexValue, int index, MmsValue* elementValue);
@ -131,7 +130,7 @@ MmsValue_setElement(MmsValue* complexValue, int index, MmsValue* elementValue);
* Basic type functions
*************************************************************************************/
MmsDataAccessError
LIB61850_API MmsDataAccessError
MmsValue_getDataAccessError(const MmsValue* self);
/**
@ -141,7 +140,7 @@ MmsValue_getDataAccessError(const MmsValue* self);
*
* \return signed 64 bit integer
*/
int64_t
LIB61850_API int64_t
MmsValue_toInt64(const MmsValue* self);
/**
@ -151,7 +150,7 @@ MmsValue_toInt64(const MmsValue* self);
*
* \return signed 32 bit integer
*/
int32_t
LIB61850_API int32_t
MmsValue_toInt32(const MmsValue* value);
/**
@ -161,7 +160,7 @@ MmsValue_toInt32(const MmsValue* value);
*
* \return unsigned 32 bit integer
*/
uint32_t
LIB61850_API uint32_t
MmsValue_toUint32(const MmsValue* value);
/**
@ -171,7 +170,7 @@ MmsValue_toUint32(const MmsValue* value);
*
* \return 64 bit floating point value
*/
double
LIB61850_API double
MmsValue_toDouble(const MmsValue* self);
/**
@ -181,7 +180,7 @@ MmsValue_toDouble(const MmsValue* self);
*
* \return 32 bit floating point value
*/
float
LIB61850_API float
MmsValue_toFloat(const MmsValue* self);
/**
@ -191,7 +190,7 @@ MmsValue_toFloat(const MmsValue* self);
*
* \return unix timestamp of the MMS_UTCTIME variable.
*/
uint32_t
LIB61850_API uint32_t
MmsValue_toUnixTimestamp(const MmsValue* self);
/**
@ -199,7 +198,7 @@ MmsValue_toUnixTimestamp(const MmsValue* self);
*
* \param self MmsValue instance to operate on. Has to be of a type MMS_FLOAT.
*/
void
LIB61850_API void
MmsValue_setFloat(MmsValue* self, float newFloatValue);
/**
@ -207,7 +206,7 @@ MmsValue_setFloat(MmsValue* self, float newFloatValue);
*
* \param self MmsValue instance to operate on. Has to be of a type MMS_FLOAT.
*/
void
LIB61850_API void
MmsValue_setDouble(MmsValue* self, double newFloatValue);
/**
@ -216,7 +215,7 @@ MmsValue_setDouble(MmsValue* self, double newFloatValue);
* \param self MmsValue instance to operate on. Has to be of a type MMS_INTEGER.
* \param integer the new value to set
*/
void
LIB61850_API void
MmsValue_setInt8(MmsValue* value, int8_t integer);
/**
@ -225,7 +224,7 @@ MmsValue_setInt8(MmsValue* value, int8_t integer);
* \param self MmsValue instance to operate on. Has to be of a type MMS_INTEGER.
* \param integer the new value to set
*/
void
LIB61850_API void
MmsValue_setInt16(MmsValue* value, int16_t integer);
/**
@ -234,7 +233,7 @@ MmsValue_setInt16(MmsValue* value, int16_t integer);
* \param self MmsValue instance to operate on. Has to be of a type MMS_INTEGER.
* \param integer the new value to set
*/
void
LIB61850_API void
MmsValue_setInt32(MmsValue* self, int32_t integer);
/**
@ -243,7 +242,7 @@ MmsValue_setInt32(MmsValue* self, int32_t integer);
* \param self MmsValue instance to operate on. Has to be of a type MMS_INTEGER.
* \param integer the new value to set
*/
void
LIB61850_API void
MmsValue_setInt64(MmsValue* value, int64_t integer);
/**
@ -252,7 +251,7 @@ MmsValue_setInt64(MmsValue* value, int64_t integer);
* \param self MmsValue instance to operate on. Has to be of a type MMS_UNSIGNED.
* \param integer the new value to set
*/
void
LIB61850_API void
MmsValue_setUint8(MmsValue* value, uint8_t integer);
/**
@ -261,7 +260,7 @@ MmsValue_setUint8(MmsValue* value, uint8_t integer);
* \param self MmsValue instance to operate on. Has to be of a type MMS_UNSIGNED.
* \param integer the new value to set
*/
void
LIB61850_API void
MmsValue_setUint16(MmsValue* value, uint16_t integer);
/**
@ -270,7 +269,7 @@ MmsValue_setUint16(MmsValue* value, uint16_t integer);
* \param self MmsValue instance to operate on. Has to be of a type MMS_UNSIGNED.
* \param integer the new value to set
*/
void
LIB61850_API void
MmsValue_setUint32(MmsValue* value, uint32_t integer);
@ -280,7 +279,7 @@ MmsValue_setUint32(MmsValue* value, uint32_t integer);
* \param self MmsValue instance to operate on. Has to be of a type MMS_BOOLEAN.
* \param boolValue a bool value
*/
void
LIB61850_API void
MmsValue_setBoolean(MmsValue* value, bool boolValue);
/**
@ -289,7 +288,7 @@ MmsValue_setBoolean(MmsValue* value, bool boolValue);
* \param self MmsValue instance to operate on. Has to be of a type MMS_BOOLEAN.
* \return the MmsValue value as bool value
*/
bool
LIB61850_API bool
MmsValue_getBoolean(const MmsValue* value);
/**
@ -299,7 +298,7 @@ MmsValue_getBoolean(const MmsValue* value);
*
* \returns the string value as 0 terminated C string
*/
const char*
LIB61850_API const char*
MmsValue_toString(MmsValue* self);
/**
@ -309,10 +308,10 @@ MmsValue_toString(MmsValue* self);
*
* \param self MmsValue instance to operate on. Has to be of a type MMS_VISIBLE_STRING or MMS_STRING.
*/
int
LIB61850_API int
MmsValue_getStringSize(MmsValue* self);
void
LIB61850_API void
MmsValue_setVisibleString(MmsValue* self, const char* string);
@ -324,7 +323,7 @@ MmsValue_setVisibleString(MmsValue* self, const char* string);
* with position 0 is the first bit if the MmsValue instance is serialized.
* \param value the new value of the bit (true = 1 / false = 0)
*/
void
LIB61850_API void
MmsValue_setBitStringBit(MmsValue* self, int bitPos, bool value);
/**
@ -335,7 +334,7 @@ MmsValue_setBitStringBit(MmsValue* self, int bitPos, bool value);
* with position 0 is the first bit if the MmsValue instance is serialized.
* \return the value of the bit (true = 1 / false = 0)
*/
bool
LIB61850_API bool
MmsValue_getBitStringBit(const MmsValue* self, int bitPos);
/**
@ -343,7 +342,7 @@ MmsValue_getBitStringBit(const MmsValue* self, int bitPos);
*
* \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING.
*/
void
LIB61850_API void
MmsValue_deleteAllBitStringBits(MmsValue* self);
@ -352,7 +351,7 @@ MmsValue_deleteAllBitStringBits(MmsValue* self);
*
* \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING.
*/
int
LIB61850_API int
MmsValue_getBitStringSize(const MmsValue* self);
/**
@ -360,7 +359,7 @@ MmsValue_getBitStringSize(const MmsValue* self);
*
* \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING.
*/
int
LIB61850_API int
MmsValue_getBitStringByteSize(const MmsValue* self);
/**
@ -368,7 +367,7 @@ MmsValue_getBitStringByteSize(const MmsValue* self);
*
* \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING.
*/
int
LIB61850_API int
MmsValue_getNumberOfSetBits(const MmsValue* self);
/**
@ -376,7 +375,7 @@ MmsValue_getNumberOfSetBits(const MmsValue* self);
*
* \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING.
*/
void
LIB61850_API void
MmsValue_setAllBitStringBits(MmsValue* self);
/**
@ -387,7 +386,7 @@ MmsValue_setAllBitStringBits(MmsValue* self);
*
* \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING.
*/
uint32_t
LIB61850_API uint32_t
MmsValue_getBitStringAsInteger(const MmsValue* self);
/**
@ -399,7 +398,7 @@ MmsValue_getBitStringAsInteger(const MmsValue* self);
* \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING.
* \param intValue the integer value that is used to set the bit string
*/
void
LIB61850_API void
MmsValue_setBitStringFromInteger(MmsValue* self, uint32_t intValue);
/**
@ -410,7 +409,7 @@ MmsValue_setBitStringFromInteger(MmsValue* self, uint32_t intValue);
*
* \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING.
*/
uint32_t
LIB61850_API uint32_t
MmsValue_getBitStringAsIntegerBigEndian(const MmsValue* self);
/**
@ -422,7 +421,7 @@ MmsValue_getBitStringAsIntegerBigEndian(const MmsValue* self);
* \param self MmsValue instance to operate on. Has to be of a type MMS_BITSTRING.
* \param intValue the integer value that is used to set the bit string
*/
void
LIB61850_API void
MmsValue_setBitStringFromIntegerBigEndian(MmsValue* self, uint32_t intValue);
/**
@ -431,7 +430,7 @@ MmsValue_setBitStringFromIntegerBigEndian(MmsValue* self, uint32_t intValue);
* \param self MmsValue instance to operate on. Has to be of a type MMS_BOOLEAN.
* \param timeval the new value in seconds since epoch (1970/01/01 00:00 UTC)
*/
MmsValue*
LIB61850_API MmsValue*
MmsValue_setUtcTime(MmsValue* self, uint32_t timeval);
/**
@ -440,7 +439,7 @@ MmsValue_setUtcTime(MmsValue* self, uint32_t timeval);
* \param self MmsValue instance to operate on. Has to be of a type MMS_UTCTIME.
* \param timeval the new value in milliseconds since epoch (1970/01/01 00:00 UTC)
*/
MmsValue*
LIB61850_API MmsValue*
MmsValue_setUtcTimeMs(MmsValue* self, uint64_t timeval);
/**
@ -451,7 +450,7 @@ MmsValue_setUtcTimeMs(MmsValue* self, uint64_t timeval);
* \param self MmsValue instance to operate on. Has to be of a type MMS_UTCTIME.
* \param buffer buffer containing the encoded UTCTime.
*/
void
LIB61850_API void
MmsValue_setUtcTimeByBuffer(MmsValue* self, const uint8_t* buffer);
/**
@ -463,7 +462,7 @@ MmsValue_setUtcTimeByBuffer(MmsValue* self, const uint8_t* buffer);
*
* \return the buffer containing the raw data
*/
uint8_t*
LIB61850_API uint8_t*
MmsValue_getUtcTimeBuffer(MmsValue* self);
/**
@ -473,7 +472,7 @@ MmsValue_getUtcTimeBuffer(MmsValue* self);
*
* \return the value in milliseconds since epoch (1970/01/01 00:00 UTC)
*/
uint64_t
LIB61850_API uint64_t
MmsValue_getUtcTimeInMs(const MmsValue* value);
/**
@ -484,7 +483,7 @@ MmsValue_getUtcTimeInMs(const MmsValue* value);
*
* \return the value in milliseconds since epoch (1970/01/01 00:00 UTC)
*/
uint64_t
LIB61850_API uint64_t
MmsValue_getUtcTimeInMsWithUs(const MmsValue* self, uint32_t* usec);
/**
@ -501,7 +500,7 @@ MmsValue_getUtcTimeInMsWithUs(const MmsValue* self, uint32_t* usec);
*
* \param timeQuality the byte representing the time quality
*/
void
LIB61850_API void
MmsValue_setUtcTimeQuality(MmsValue* self, uint8_t timeQuality);
/**
@ -518,7 +517,7 @@ MmsValue_setUtcTimeQuality(MmsValue* self, uint8_t timeQuality);
*
* \return the byte representing the time quality
*/
uint8_t
LIB61850_API uint8_t
MmsValue_getUtcTimeQuality(const MmsValue* self);
/**
@ -527,7 +526,7 @@ MmsValue_getUtcTimeQuality(const MmsValue* self);
* \param self MmsValue instance to operate on. Has to be of a type MMS_UTCTIME.
* \param timeval the new value in milliseconds since epoch (1970/01/01 00:00 UTC)
*/
void
LIB61850_API void
MmsValue_setBinaryTime(MmsValue* self, uint64_t timestamp);
/**
@ -537,7 +536,7 @@ MmsValue_setBinaryTime(MmsValue* self, uint64_t timestamp);
*
* \return the value in milliseconds since epoch (1970/01/01 00:00 UTC)
*/
uint64_t
LIB61850_API uint64_t
MmsValue_getBinaryTimeAsUtcMs(const MmsValue* self);
/**
@ -551,7 +550,7 @@ MmsValue_getBinaryTimeAsUtcMs(const MmsValue* self);
* \param buf the buffer that contains the new value
* \param size the size of the buffer that contains the new value
*/
void
LIB61850_API void
MmsValue_setOctetString(MmsValue* self, uint8_t* buf, int size);
/**
@ -561,7 +560,7 @@ MmsValue_setOctetString(MmsValue* self, uint8_t* buf, int size);
*
* \return size in bytes
*/
uint16_t
LIB61850_API uint16_t
MmsValue_getOctetStringSize(const MmsValue* self);
/**
@ -574,7 +573,7 @@ MmsValue_getOctetStringSize(const MmsValue* self);
*
* \return maximum size in bytes
*/
uint16_t
LIB61850_API uint16_t
MmsValue_getOctetStringMaxSize(MmsValue* self);
/**
@ -584,7 +583,7 @@ MmsValue_getOctetStringMaxSize(MmsValue* self);
*
* \return reference to the buffer
*/
uint8_t*
LIB61850_API uint8_t*
MmsValue_getOctetStringBuffer(MmsValue* self);
/**
@ -598,7 +597,7 @@ MmsValue_getOctetStringBuffer(MmsValue* self);
*
* \return indicates if the update has been successful (false if not)
*/
bool
LIB61850_API bool
MmsValue_update(MmsValue* self, const MmsValue* source);
/**
@ -612,7 +611,7 @@ MmsValue_update(MmsValue* self, const MmsValue* source);
*
* \return true if both instances are of the same type and have the same value
*/
bool
LIB61850_API bool
MmsValue_equals(const MmsValue* self, const MmsValue* otherValue);
/**
@ -627,7 +626,7 @@ MmsValue_equals(const MmsValue* self, const MmsValue* otherValue);
*
* \return true if both instances and all their children are of the same type.
*/
bool
LIB61850_API bool
MmsValue_equalTypes(const MmsValue* self, const MmsValue* otherValue);
/*************************************************************************************
@ -635,22 +634,16 @@ MmsValue_equalTypes(const MmsValue* self, const MmsValue* otherValue);
*************************************************************************************/
MmsValue*
LIB61850_API MmsValue*
MmsValue_newDataAccessError(MmsDataAccessError accessError);
MmsValue*
MmsValue_newIntegerFromBerInteger(Asn1PrimitiveValue* berInteger);
MmsValue*
MmsValue_newUnsignedFromBerInteger(Asn1PrimitiveValue* berInteger);
MmsValue*
LIB61850_API MmsValue*
MmsValue_newInteger(int size);
MmsValue*
LIB61850_API MmsValue*
MmsValue_newUnsigned(int size);
MmsValue*
LIB61850_API MmsValue*
MmsValue_newBoolean(bool boolean);
/**
@ -660,40 +653,40 @@ MmsValue_newBoolean(bool boolean);
*
* \return new MmsValue instance of type MMS_BITSTRING
*/
MmsValue*
LIB61850_API MmsValue*
MmsValue_newBitString(int bitSize);
MmsValue*
LIB61850_API MmsValue*
MmsValue_newOctetString(int size, int maxSize);
MmsValue*
LIB61850_API MmsValue*
MmsValue_newStructure(const MmsVariableSpecification* typeSpec);
MmsValue*
LIB61850_API MmsValue*
MmsValue_createEmptyStructure(int size);
MmsValue*
LIB61850_API MmsValue*
MmsValue_newDefaultValue(const MmsVariableSpecification* typeSpec);
MmsValue*
LIB61850_API MmsValue*
MmsValue_newIntegerFromInt8(int8_t integer);
MmsValue*
LIB61850_API MmsValue*
MmsValue_newIntegerFromInt16(int16_t integer);
MmsValue*
LIB61850_API MmsValue*
MmsValue_newIntegerFromInt32(int32_t integer);
MmsValue*
LIB61850_API MmsValue*
MmsValue_newIntegerFromInt64(int64_t integer);
MmsValue*
LIB61850_API MmsValue*
MmsValue_newUnsignedFromUint32(uint32_t integer);
MmsValue*
LIB61850_API MmsValue*
MmsValue_newFloat(float variable);
MmsValue*
LIB61850_API MmsValue*
MmsValue_newDouble(double variable);
/**
@ -706,7 +699,7 @@ MmsValue_newDouble(double variable);
*
* \return an MmsValue instance that is an exact copy of the given instance.
*/
MmsValue*
LIB61850_API MmsValue*
MmsValue_clone(const MmsValue* self);
/**
@ -719,7 +712,7 @@ MmsValue_clone(const MmsValue* self);
*
* \return a pointer to the position in the buffer just after the last byte written.
*/
uint8_t*
LIB61850_API uint8_t*
MmsValue_cloneToBuffer(const MmsValue* self, uint8_t* destinationAddress);
/**
@ -732,7 +725,7 @@ MmsValue_cloneToBuffer(const MmsValue* self, uint8_t* destinationAddress);
*
* \return the number of bytes required by a clone
*/
int
LIB61850_API int
MmsValue_getSizeInMemory(const MmsValue* self);
/**
@ -744,7 +737,7 @@ MmsValue_getSizeInMemory(const MmsValue* self);
*
* \param self the MmsValue instance to be deleted.
*/
void
LIB61850_API void
MmsValue_delete(MmsValue* self);
/**
@ -759,7 +752,7 @@ MmsValue_delete(MmsValue* self);
*
* \param self the MmsValue instance to be deleted.
*/
void
LIB61850_API void
MmsValue_deleteConditional(MmsValue* value);
/**
@ -771,7 +764,7 @@ MmsValue_deleteConditional(MmsValue* value);
*
* \param self the MmsValue instance to be deleted.
*/
void
LIB61850_API void
MmsValue_deleteIfNotNull(MmsValue* value);
/**
@ -784,7 +777,7 @@ MmsValue_deleteIfNotNull(MmsValue* value);
*
* \return new MmsValue instance of type MMS_VISIBLE_STRING
*/
MmsValue*
LIB61850_API MmsValue*
MmsValue_newVisibleString(const char* string);
/**
@ -798,7 +791,7 @@ MmsValue_newVisibleString(const char* string);
*
* \return new MmsValue instance of type MMS_VISIBLE_STRING
*/
MmsValue*
LIB61850_API MmsValue*
MmsValue_newVisibleStringWithSize(int size);
/**
@ -812,7 +805,7 @@ MmsValue_newVisibleStringWithSize(int size);
*
* \return new MmsValue instance of type MMS_STRING
*/
MmsValue*
LIB61850_API MmsValue*
MmsValue_newMmsStringWithSize(int size);
/**
@ -826,7 +819,7 @@ MmsValue_newMmsStringWithSize(int size);
*
* \return new MmsValue instance of type MMS_BINARYTIME
*/
MmsValue*
LIB61850_API MmsValue*
MmsValue_newBinaryTime(bool timeOfDay);
/**
@ -837,7 +830,7 @@ MmsValue_newBinaryTime(bool timeOfDay);
*
* \return new MmsValue instance of type MMS_VISIBLE_STRING
*/
MmsValue*
LIB61850_API MmsValue*
MmsValue_newVisibleStringFromByteArray(uint8_t* byteArray, int size);
/**
@ -848,7 +841,7 @@ MmsValue_newVisibleStringFromByteArray(uint8_t* byteArray, int size);
*
* \return new MmsValue instance of type MMS_STRING
*/
MmsValue*
LIB61850_API MmsValue*
MmsValue_newMmsStringFromByteArray(uint8_t* byteArray, int size);
/**
@ -858,10 +851,15 @@ MmsValue_newMmsStringFromByteArray(uint8_t* byteArray, int size);
*
* \return new MmsValue instance of type MMS_STRING
*/
MmsValue*
LIB61850_API MmsValue*
MmsValue_newMmsString(char* string);
void
/**
* \brief Set the value of MmsValue instance of type MMS_STRING
*
* \param string a text string that will be the new value of the instance
*/
LIB61850_API void
MmsValue_setMmsString(MmsValue* value, const char* string);
/**
@ -871,7 +869,7 @@ MmsValue_setMmsString(MmsValue* value, const char* string);
*
* \return new MmsValue instance of type MMS_UTCTIME
*/
MmsValue*
LIB61850_API MmsValue*
MmsValue_newUtcTime(uint32_t timeval);
/**
@ -881,14 +879,14 @@ MmsValue_newUtcTime(uint32_t timeval);
*
* \return new MmsValue instance of type MMS_UTCTIME
*/
MmsValue*
LIB61850_API MmsValue*
MmsValue_newUtcTimeByMsTime(uint64_t timeval);
void
LIB61850_API void
MmsValue_setDeletable(MmsValue* self);
void
LIB61850_API void
MmsValue_setDeletableRecursive(MmsValue* value);
/**
@ -902,7 +900,7 @@ MmsValue_setDeletableRecursive(MmsValue* value);
*
* \return 1 if deletable flag is set, otherwise 0
*/
int
LIB61850_API int
MmsValue_isDeletable(MmsValue* self);
/**
@ -910,7 +908,7 @@ MmsValue_isDeletable(MmsValue* self);
*
* \param self the MmsValue instance
*/
MmsType
LIB61850_API MmsType
MmsValue_getType(const MmsValue* self);
/**
@ -922,7 +920,7 @@ MmsValue_getType(const MmsValue* self);
*
* \return the sub elements MmsValue instance or NULL if the element does not exist
*/
MmsValue*
LIB61850_API MmsValue*
MmsValue_getSubElement(MmsValue* self, MmsVariableSpecification* varSpec, char* mmsPath);
/**
@ -932,7 +930,7 @@ MmsValue_getSubElement(MmsValue* self, MmsVariableSpecification* varSpec, char*
*
* \return the value type as a human readable string
*/
char*
LIB61850_API char*
MmsValue_getTypeString(MmsValue* self);
/**
@ -947,7 +945,7 @@ MmsValue_getTypeString(MmsValue* self);
*
* \return a pointer to the start of the buffer
*/
const char*
LIB61850_API const char*
MmsValue_printToBuffer(const MmsValue* self, char* buffer, int bufferSize);
/**
@ -962,7 +960,7 @@ MmsValue_printToBuffer(const MmsValue* self, char* buffer, int bufferSize);
*
* \return the MmsValue instance created from the buffer
*/
MmsValue*
LIB61850_API MmsValue*
MmsValue_decodeMmsData(uint8_t* buffer, int bufPos, int bufferLength, int* endBufPos);
/**
@ -976,7 +974,7 @@ MmsValue_decodeMmsData(uint8_t* buffer, int bufPos, int bufferLength, int* endBu
*
* \return the encoded length of the corresponding MMS data element
*/
int
LIB61850_API int
MmsValue_encodeMmsData(MmsValue* self, uint8_t* buffer, int bufPos, bool encode);
/**@}*/

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

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

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

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

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

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

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

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

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

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

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

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

@ -52,28 +52,28 @@ typedef struct {
/* include for MmsFileReadHandler definition */
#include "mms_client_connection.h"
bool
LIB61850_INTERNAL bool
mmsMsg_parseFileOpenResponse(uint8_t* buffer, int bufPos, int maxBufPos, int32_t* frsmId, uint32_t* fileSize, uint64_t* lastModified);
bool
LIB61850_INTERNAL bool
mmsMsg_parseFileReadResponse(uint8_t* buffer, int bufPos, int maxBufPos, bool* moreFollows, uint8_t** dataBuffer, int* dataLength);
void
LIB61850_INTERNAL void
mmsMsg_createFileReadResponse(int maxPduSize, uint32_t invokeId, ByteBuffer* response, MmsFileReadStateMachine* frsm);
void
LIB61850_INTERNAL void
mmsMsg_createFileCloseResponse(uint32_t invokeId, ByteBuffer* response);
void
LIB61850_INTERNAL void
mmsMsg_createFileOpenResponse(const char* basepath, uint32_t invokeId, ByteBuffer* response, char* fullPath, MmsFileReadStateMachine* frsm);
bool
LIB61850_INTERNAL bool
mmsMsg_parseFileName(char* filename, uint8_t* buffer, int* bufPos, int maxBufPos , uint32_t invokeId, ByteBuffer* response);
void
LIB61850_INTERNAL void
mmsMsg_createExtendedFilename(const char* basepath, char* extendedFileName, char* fileName);
FileHandle
LIB61850_INTERNAL FileHandle
mmsMsg_openFile(const char* basepath, char* fileName, bool readWrite);
#endif /* (MMS_FILE_SERVICE == 1) */
@ -84,34 +84,34 @@ typedef struct sMmsServiceError
} MmsServiceError;
void /* Confirmed service error (ServiceError) */
LIB61850_INTERNAL void /* Confirmed service error (ServiceError) */
mmsMsg_createServiceErrorPdu(uint32_t invokeId, ByteBuffer* response, MmsError errorType);
void
LIB61850_INTERNAL void
mmsMsg_createMmsRejectPdu(uint32_t* invokeId, int reason, ByteBuffer* response);
int
LIB61850_INTERNAL int
mmsMsg_parseConfirmedErrorPDU(uint8_t* buffer, int bufPos, int maxBufPos, uint32_t* invokeId, MmsServiceError* serviceError);
int
LIB61850_INTERNAL int
mmsMsg_parseRejectPDU(uint8_t* buffer, int bufPos, int maxBufPos, uint32_t* invokeId, int* rejectType, int* rejectReason);
MmsValue*
LIB61850_INTERNAL MmsValue*
mmsMsg_parseDataElement(Data_t* dataElement);
Data_t*
LIB61850_INTERNAL Data_t*
mmsMsg_createBasicDataElement(MmsValue* value);
AccessResult_t**
LIB61850_INTERNAL AccessResult_t**
mmsMsg_createAccessResultsList(MmsPdu_t* mmsPdu, int resultsCount);
char*
LIB61850_INTERNAL char*
mmsMsg_createStringFromAsnIdentifier(Identifier_t identifier);
void
LIB61850_INTERNAL void
mmsMsg_copyAsn1IdentifierToStringBuffer(Identifier_t identifier, char* buffer, int bufSize);
void
LIB61850_INTERNAL void
mmsMsg_deleteAccessResultList(AccessResult_t** accessResult, int variableCount);
#endif /* MMS_COMMON_INTERNAL */

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

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

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

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

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

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

@ -25,6 +25,7 @@
#define MMS_VALUE_INTERNAL_H_
#include "mms_value.h"
#include "ber_integer.h"
struct ATTRIBUTE_PACKED sMmsValue {
MmsType type;
@ -64,4 +65,10 @@ struct ATTRIBUTE_PACKED sMmsValue {
};
LIB61850_INTERNAL MmsValue*
MmsValue_newIntegerFromBerInteger(Asn1PrimitiveValue* berInteger);
LIB61850_INTERNAL MmsValue*
MmsValue_newUnsignedFromBerInteger(Asn1PrimitiveValue* berInteger);
#endif /* MMS_VALUE_INTERNAL_H_ */

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

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

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

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

@ -20,11 +20,11 @@ typedef struct BIT_STRING_s {
asn_struct_ctx_t _asn_ctx; /* Parsing across buffer boundaries */
} BIT_STRING_t;
extern asn_TYPE_descriptor_t asn_DEF_BIT_STRING;
LIB61850_INTERNAL extern asn_TYPE_descriptor_t asn_DEF_BIT_STRING;
asn_struct_print_f BIT_STRING_print; /* Human-readable output */
asn_constr_check_f BIT_STRING_constraint;
xer_type_encoder_f BIT_STRING_encode_xer;
LIB61850_INTERNAL asn_struct_print_f BIT_STRING_print; /* Human-readable output */
LIB61850_INTERNAL asn_constr_check_f BIT_STRING_constraint;
LIB61850_INTERNAL xer_type_encoder_f BIT_STRING_encode_xer;
#ifdef __cplusplus
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -32,13 +32,13 @@ typedef struct asn_INTEGER_specifics_s {
int strict_enumeration; /* Enumeration set is fixed */
} asn_INTEGER_specifics_t;
asn_struct_print_f INTEGER_print;
ber_type_decoder_f INTEGER_decode_ber;
der_type_encoder_f INTEGER_encode_der;
xer_type_decoder_f INTEGER_decode_xer;
xer_type_encoder_f INTEGER_encode_xer;
per_type_decoder_f INTEGER_decode_uper;
per_type_encoder_f INTEGER_encode_uper;
LIB61850_INTERNAL asn_struct_print_f INTEGER_print;
LIB61850_INTERNAL ber_type_decoder_f INTEGER_decode_ber;
LIB61850_INTERNAL der_type_encoder_f INTEGER_encode_der;
LIB61850_INTERNAL xer_type_decoder_f INTEGER_decode_xer;
LIB61850_INTERNAL xer_type_encoder_f INTEGER_encode_xer;
LIB61850_INTERNAL per_type_decoder_f INTEGER_decode_uper;
LIB61850_INTERNAL per_type_encoder_f INTEGER_encode_uper;
/***********************************
* Some handy conversion routines. *
@ -50,13 +50,13 @@ per_type_encoder_f INTEGER_encode_uper;
* -1/ERANGE: Value encoded is out of range for long representation
* -1/ENOMEM: Memory allocation failed (in asn_long2INTEGER()).
*/
int asn_INTEGER2long(const INTEGER_t *i, long *l);
int asn_long2INTEGER(INTEGER_t *i, long l);
LIB61850_INTERNAL int asn_INTEGER2long(const INTEGER_t *i, long *l);
LIB61850_INTERNAL int asn_long2INTEGER(INTEGER_t *i, long l);
/*
* Convert the integer value into the corresponding enumeration map entry.
*/
const asn_INTEGER_enum_map_t *INTEGER_map_value2enum(asn_INTEGER_specifics_t *specs, long value);
LIB61850_INTERNAL const asn_INTEGER_enum_map_t *INTEGER_map_value2enum(asn_INTEGER_specifics_t *specs, long value);
#ifdef __cplusplus
}

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

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

Loading…
Cancel
Save