libiec61850  1.6.0
iec61850_client.h
Go to the documentation of this file.
1 /*
2  * iec61850_client.h
3  *
4  * Copyright 2013-2023 Michael Zillgith
5  *
6  * This file is part of libIEC61850.
7  *
8  * libIEC61850 is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * libIEC61850 is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with libIEC61850. If not, see <http://www.gnu.org/licenses/>.
20  *
21  * See COPYING file for the complete license text.
22  */
23 
24 #ifndef IEC61850_CLIENT_H_
25 #define IEC61850_CLIENT_H_
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 #include "libiec61850_common_api.h"
32 #include "iec61850_common.h"
33 #include "mms_value.h"
34 #include "mms_client_connection.h"
35 #include "linked_list.h"
36 
43 typedef struct sClientDataSet* ClientDataSet;
44 
46 typedef struct sClientReport* ClientReport;
47 
49 typedef struct sClientReportControlBlock* ClientReportControlBlock;
50 
52 typedef struct sClientGooseControlBlock* ClientGooseControlBlock;
53 
61 typedef struct sIedConnection* IedConnection;
62 
64 typedef struct
65 {
66  int ctlNum;
70 
72 typedef enum
73 {
79 
81 typedef enum {
82  /* general errors */
83 
86 
89 
92 
95 
98 
101 
104 
105  /* client side errors */
106 
109 
111 
114 
117 
118  /* service error - error reported by server */
119 
122 
125 
128 
131 
134 
137 
140 
143 
146 
149 
152 
155 
158 
161 
164 
167 
170 
172  IED_ERROR_UNKNOWN = 99
174 
180 LIB61850_API const char*
182 
183 /**************************************************
184  * Connection creation and destruction
185  **************************************************/
186 
196 LIB61850_API IedConnection
198 
214 LIB61850_API IedConnection
215 IedConnection_createEx(TLSConfiguration tlsConfig, bool useThreads);
216 
231 LIB61850_API IedConnection
232 IedConnection_createWithTlsSupport(TLSConfiguration tlsConfig);
233 
242 LIB61850_API void
244 
254 LIB61850_API void
255 IedConnection_setLocalAddress(IedConnection self, const char* localIpAddress, int localPort);
256 
266 LIB61850_API void
267 IedConnection_setConnectTimeout(IedConnection self, uint32_t timeoutInMs);
268 
276 LIB61850_API void
278 
288 LIB61850_API void
289 IedConnection_setRequestTimeout(IedConnection self, uint32_t timeoutInMs);
290 
298 LIB61850_API uint32_t
300 
310 LIB61850_API void
311 IedConnection_setTimeQuality(IedConnection self, bool leapSecondKnown, bool clockFailure, bool clockNotSynchronized, int subsecondPrecision);
312 
325 LIB61850_API bool
327 
338 typedef void
339 (*IedConnection_GenericServiceHandler) (uint32_t invokeId, void* parameter, IedClientError err);
340 
341 /**************************************************
342  * Association service
343  **************************************************/
344 
355 LIB61850_API void
356 IedConnection_connect(IedConnection self, IedClientError* error, const char* hostname, int tcpPort);
357 
371 LIB61850_API void
372 IedConnection_connectAsync(IedConnection self, IedClientError* error, const char* hostname, int tcpPort);
373 
386 LIB61850_API void
388 
402 LIB61850_API void
404 
417 LIB61850_API void
419 
432 LIB61850_API void
434 
442 LIB61850_API void
444 
454 LIB61850_API IedConnectionState
456 
464 LIB61850_API LastApplError
466 
475 typedef void
476 (*IedConnectionClosedHandler) (void* parameter, IedConnection connection);
477 
487 LIB61850_API void
489  void* parameter);
490 
498 typedef void
499 (*IedConnection_StateChangedHandler) (void* parameter, IedConnection connection, IedConnectionState newState);
500 
508 LIB61850_API void
510 
521 LIB61850_API MmsConnection
523 
533 #define IEC61850_SV_OPT_REFRESH_TIME 1
534 
536 #define IEC61850_SV_OPT_SAMPLE_SYNC 2
537 
539 #define IEC61850_SV_OPT_SAMPLE_RATE 4
540 
542 #define IEC61850_SV_OPT_DATA_SET 8
543 
545 #define IEC61850_SV_OPT_SECURITY 16
546 
547 #define IEC61850_SV_SMPMOD_SAMPLES_PER_PERIOD 0
548 
549 #define IEC61850_SV_SMPMOD_SAMPLES_PER_SECOND 1
550 
551 #define IEC61850_SV_SMPMOD_SECONDS_PER_SAMPLE 2
552 
553 
555 typedef struct sClientSVControlBlock* ClientSVControlBlock;
556 
572 LIB61850_API ClientSVControlBlock
573 ClientSVControlBlock_create(IedConnection connection, const char* reference);
574 
580 LIB61850_API void
582 
590 LIB61850_API bool
592 
600 LIB61850_API IedClientError
602 
603 
604 LIB61850_API bool
606 
607 LIB61850_API bool
609 
610 LIB61850_API bool
612 
613 LIB61850_API bool
615 
616 LIB61850_API char*
618 
630 LIB61850_API char*
632 
633 LIB61850_API uint32_t
635 
636 LIB61850_API uint16_t
638 
639 
645 LIB61850_API PhyComAddress
647 
654 LIB61850_API int
656 
662 LIB61850_API uint8_t
664 
672 LIB61850_API int
674 
675 
684 /*********************************************************
685  * GOOSE services handling (MMS part)
686  ********************************************************/
687 
689 #define GOCB_ELEMENT_GO_ENA 1
690 
692 #define GOCB_ELEMENT_GO_ID 2
693 
695 #define GOCB_ELEMENT_DATSET 4
696 
698 #define GOCB_ELEMENT_CONF_REV 8
699 
701 #define GOCB_ELEMENT_NDS_COMM 16
702 
704 #define GOCB_ELEMENT_DST_ADDRESS 32
705 
707 #define GOCB_ELEMENT_MIN_TIME 64
708 
710 #define GOCB_ELEMENT_MAX_TIME 128
711 
713 #define GOCB_ELEMENT_FIXED_OFFS 256
714 
716 #define GOCB_ELEMENT_ALL 511
717 
718 
719 /**************************************************
720  * ClientGooseControlBlock class
721  **************************************************/
722 
723 LIB61850_API ClientGooseControlBlock
724 ClientGooseControlBlock_create(const char* dataAttributeReference);
725 
726 LIB61850_API void
728 
729 LIB61850_API bool
731 
732 LIB61850_API void
734 
735 LIB61850_API const char*
737 
738 LIB61850_API void
740 
741 LIB61850_API const char*
743 
744 LIB61850_API void
746 
747 LIB61850_API uint32_t
749 
750 LIB61850_API bool
752 
753 LIB61850_API uint32_t
755 
756 LIB61850_API uint32_t
758 
759 LIB61850_API bool
761 
762 LIB61850_API PhyComAddress
764 
765 LIB61850_API void
767 
768 LIB61850_API DEPRECATED MmsValue* /* MMS_OCTET_STRING */
770 
771 LIB61850_API DEPRECATED void
773 
774 LIB61850_API DEPRECATED uint8_t
776 
777 LIB61850_API DEPRECATED void
779 
780 LIB61850_API DEPRECATED uint16_t
782 
783 LIB61850_API DEPRECATED void
785 
786 LIB61850_API DEPRECATED uint16_t
788 
789 LIB61850_API DEPRECATED void
791 
792 
793 /*********************************************************
794  * GOOSE services (access to GOOSE Control Blocks (GoCB))
795  ********************************************************/
796 
825 LIB61850_API ClientGooseControlBlock
826 IedConnection_getGoCBValues(IedConnection self, IedClientError* error, const char* goCBReference, ClientGooseControlBlock updateGoCB);
827 
828 typedef void
829 (*IedConnection_GetGoCBValuesHandler) (uint32_t invokeId, void* parameter, IedClientError err, ClientGooseControlBlock goCB);
830 
860 LIB61850_API uint32_t
861 IedConnection_getGoCBValuesAsync(IedConnection self, IedClientError* error, const char* goCBReference, ClientGooseControlBlock updateGoCB,
862  IedConnection_GetGoCBValuesHandler handler, void* parameter);
863 
885 LIB61850_API void
887  uint32_t parametersMask, bool singleRequest);
888 
914 LIB61850_API uint32_t
916  uint32_t parametersMask, bool singleRequest, IedConnection_GenericServiceHandler handler, void* parameter);
917 
921 /****************************************
922  * Data model access services
923  ****************************************/
924 
941 LIB61850_API MmsValue*
942 IedConnection_readObject(IedConnection self, IedClientError* error, const char* dataAttributeReference, FunctionalConstraint fc);
943 
944 typedef void
945 (*IedConnection_ReadObjectHandler) (uint32_t invokeId, void* parameter, IedClientError err, MmsValue* value);
946 
959 LIB61850_API uint32_t
961  IedConnection_ReadObjectHandler handler, void* parameter);
962 
972 LIB61850_API void
973 IedConnection_writeObject(IedConnection self, IedClientError* error, const char* dataAttributeReference, FunctionalConstraint fc,
974  MmsValue* value);
975 
989 LIB61850_API uint32_t
990 IedConnection_writeObjectAsync(IedConnection self, IedClientError* error, const char* objectReference,
991  FunctionalConstraint fc, MmsValue* value, IedConnection_GenericServiceHandler handler, void* parameter);
992 
1001 LIB61850_API bool
1003 
1012 LIB61850_API float
1014 
1027 LIB61850_API char*
1029 
1040 LIB61850_API int32_t
1042 
1053 LIB61850_API int64_t
1055 
1066 LIB61850_API uint32_t
1068 
1084 LIB61850_API Timestamp*
1086  Timestamp* timeStamp);
1087 
1098 LIB61850_API Quality
1100 
1110 LIB61850_API void
1111 IedConnection_writeBooleanValue(IedConnection self, IedClientError* error, const char* objectReference,
1112  FunctionalConstraint fc, bool value);
1113 
1123 LIB61850_API void
1124 IedConnection_writeInt32Value(IedConnection self, IedClientError* error, const char* objectReference,
1125  FunctionalConstraint fc, int32_t value);
1126 
1136 LIB61850_API void
1137 IedConnection_writeUnsigned32Value(IedConnection self, IedClientError* error, const char* objectReference,
1138  FunctionalConstraint fc, uint32_t value);
1139 
1149 LIB61850_API void
1150 IedConnection_writeFloatValue(IedConnection self, IedClientError* error, const char* objectReference,
1151  FunctionalConstraint fc, float value);
1152 
1153 LIB61850_API void
1154 IedConnection_writeVisibleStringValue(IedConnection self, IedClientError* error, const char* objectReference,
1155  FunctionalConstraint fc, char* value);
1156 
1157 LIB61850_API void
1158 IedConnection_writeOctetString(IedConnection self, IedClientError* error, const char* objectReference,
1159  FunctionalConstraint fc, uint8_t* value, int valueLength);
1160 
1163 /********************************************
1164  * Reporting services
1165  ********************************************/
1166 
1206 LIB61850_API ClientReportControlBlock
1207 IedConnection_getRCBValues(IedConnection self, IedClientError* error, const char* rcbReference,
1208  ClientReportControlBlock updateRcb);
1209 
1210 typedef void
1211 (*IedConnection_GetRCBValuesHandler) (uint32_t invokeId, void* parameter, IedClientError err, ClientReportControlBlock rcb);
1212 
1213 LIB61850_API uint32_t
1215  IedConnection_GetRCBValuesHandler handler, void* parameter);
1216 
1219 
1221 #define IEC61850_REASON_NOT_INCLUDED 0
1222 
1224 #define IEC61850_REASON_DATA_CHANGE 1
1225 
1227 #define IEC61850_REASON_QUALITY_CHANGE 2
1228 
1230 #define IEC61850_REASON_DATA_UPDATE 4
1231 
1233 #define IEC61850_REASON_INTEGRITY 8
1234 
1236 #define IEC61850_REASON_GI 16
1237 
1239 #define IEC61850_REASON_UNKNOWN 32
1240 
1241 /* Element encoding mask values for ClientReportControlBlock */
1242 
1244 #define RCB_ELEMENT_RPT_ID 1
1245 
1247 #define RCB_ELEMENT_RPT_ENA 2
1248 
1250 #define RCB_ELEMENT_RESV 4
1251 
1253 #define RCB_ELEMENT_DATSET 8
1254 
1256 #define RCB_ELEMENT_CONF_REV 16
1257 
1259 #define RCB_ELEMENT_OPT_FLDS 32
1260 
1262 #define RCB_ELEMENT_BUF_TM 64
1263 
1265 #define RCB_ELEMENT_SQ_NUM 128
1266 
1268 #define RCB_ELEMENT_TRG_OPS 256
1269 
1271 #define RCB_ELEMENT_INTG_PD 512
1272 
1274 #define RCB_ELEMENT_GI 1024
1275 
1277 #define RCB_ELEMENT_PURGE_BUF 2048
1278 
1280 #define RCB_ELEMENT_ENTRY_ID 4096
1281 
1283 #define RCB_ELEMENT_TIME_OF_ENTRY 8192
1284 
1286 #define RCB_ELEMENT_RESV_TMS 16384
1287 
1289 #define RCB_ELEMENT_OWNER 32768
1290 
1312 LIB61850_API void
1314  uint32_t parametersMask, bool singleRequest);
1315 
1316 LIB61850_API uint32_t
1318  uint32_t parametersMask, bool singleRequest, IedConnection_GenericServiceHandler handler, void* parameter);
1319 
1326 typedef void (*ReportCallbackFunction) (void* parameter, ClientReport report);
1327 
1349 LIB61850_API void
1350 IedConnection_installReportHandler(IedConnection self, const char* rcbReference, const char* rptId, ReportCallbackFunction handler,
1351  void* handlerParameter);
1352 
1361 LIB61850_API void
1362 IedConnection_uninstallReportHandler(IedConnection self, const char* rcbReference);
1363 
1375 LIB61850_API void
1376 IedConnection_triggerGIReport(IedConnection self, IedClientError* error, const char* rcbReference);
1377 
1378 /****************************************
1379  * Access to received reports
1380  ****************************************/
1381 
1390 LIB61850_API const char*
1392 
1403 LIB61850_API MmsValue*
1405 
1412 LIB61850_API char*
1414 
1421 LIB61850_API char*
1423 
1432 LIB61850_API ReasonForInclusion
1434 
1444 LIB61850_API MmsValue*
1446 
1454 LIB61850_API bool
1456 
1464 LIB61850_API bool
1466 
1476 LIB61850_API uint16_t
1478 
1486 LIB61850_API bool
1488 
1496 LIB61850_API bool
1498 
1506 LIB61850_API bool
1508 
1518 LIB61850_API uint32_t
1520 
1528 LIB61850_API bool
1530 
1538 LIB61850_API bool
1540 
1548 LIB61850_API bool
1550 
1564 LIB61850_API const char*
1566 
1567 
1578 LIB61850_API uint64_t
1580 
1588 LIB61850_API bool
1590 
1601 LIB61850_API uint16_t
1603 
1614 LIB61850_API bool
1616 
1624 LIB61850_API char*
1626 
1627 /**************************************************
1628  * ClientReportControlBlock access class
1629  **************************************************/
1630 
1631 LIB61850_API ClientReportControlBlock
1632 ClientReportControlBlock_create(const char* rcbReference);
1633 
1634 LIB61850_API void
1636 
1637 LIB61850_API char*
1639 
1640 LIB61850_API bool
1642 
1643 LIB61850_API const char*
1645 
1646 LIB61850_API void
1648 
1649 LIB61850_API bool
1651 
1652 LIB61850_API void
1654 
1655 LIB61850_API bool
1657 
1658 LIB61850_API void
1660 
1661 LIB61850_API const char*
1663 
1680 LIB61850_API void
1682 
1683 LIB61850_API uint32_t
1685 
1693 LIB61850_API int
1695 
1702 LIB61850_API void
1704 
1713 LIB61850_API uint32_t
1715 
1725 LIB61850_API void
1727 
1728 LIB61850_API uint16_t
1730 
1731 LIB61850_API int
1733 
1734 LIB61850_API void
1736 
1737 LIB61850_API uint32_t
1739 
1740 LIB61850_API void
1742 
1743 LIB61850_API bool
1745 
1746 LIB61850_API void
1748 
1749 LIB61850_API bool
1751 
1759 LIB61850_API void
1761 
1767 LIB61850_API bool
1769 
1770 LIB61850_API int16_t
1772 
1773 LIB61850_API void
1775 
1776 LIB61850_API MmsValue* /* <MMS_OCTET_STRING> */
1778 
1779 LIB61850_API void
1781 
1782 LIB61850_API uint64_t
1784 
1785 LIB61850_API MmsValue* /* <MMS_OCTET_STRING> */
1787 
1788 
1791 /****************************************
1792  * Data set handling
1793  ****************************************/
1794 
1818 LIB61850_API ClientDataSet
1819 IedConnection_readDataSetValues(IedConnection self, IedClientError* error, const char* dataSetReference, ClientDataSet dataSet);
1820 
1821 typedef void
1822 (*IedConnection_ReadDataSetHandler) (uint32_t invokeId, void* parameter, IedClientError err, ClientDataSet dataSet);
1823 
1843 LIB61850_API uint32_t
1844 IedConnection_readDataSetValuesAsync(IedConnection self, IedClientError* error, const char* dataSetReference, ClientDataSet dataSet,
1845  IedConnection_ReadDataSetHandler handler, void* parameter);
1846 
1864 LIB61850_API void
1865 IedConnection_createDataSet(IedConnection self, IedClientError* error, const char* dataSetReference, LinkedList /* char* */ dataSetElements);
1866 
1888 LIB61850_API uint32_t
1889 IedConnection_createDataSetAsync(IedConnection self, IedClientError* error, const char* dataSetReference, LinkedList /* char* */ dataSetElements,
1890  IedConnection_GenericServiceHandler handler, void* parameter);
1891 
1905 LIB61850_API bool
1906 IedConnection_deleteDataSet(IedConnection self, IedClientError* error, const char* dataSetReference);
1907 
1925 LIB61850_API uint32_t
1926 IedConnection_deleteDataSetAsync(IedConnection self, IedClientError* error, const char* dataSetReference,
1927  IedConnection_GenericServiceHandler handler, void* parameter);
1928 
1943 LIB61850_API LinkedList /* <char*> */
1944 IedConnection_getDataSetDirectory(IedConnection self, IedClientError* error, const char* dataSetReference, bool* isDeletable);
1945 
1953 typedef void
1954 (*IedConnection_GetDataSetDirectoryHandler) (uint32_t invokeId, void* parameter, IedClientError err, LinkedList /* <char*> */ dataSetDirectory, bool isDeletable);
1955 
1970 LIB61850_API uint32_t
1971 IedConnection_getDataSetDirectoryAsync(IedConnection self, IedClientError* error, const char* dataSetReference,
1972  IedConnection_GetDataSetDirectoryHandler handler, void* parameter);
1973 
1989 LIB61850_API void
1990 IedConnection_writeDataSetValues(IedConnection self, IedClientError* error, const char* dataSetReference,
1991  LinkedList/*<MmsValue*>*/ values, /* OUTPUT */LinkedList* /* <MmsValue*> */accessResults);
1992 
2001 typedef void
2002 (*IedConnection_WriteDataSetHandler) (uint32_t invokeId, void* parameter, IedClientError err, LinkedList /* <MmsValue*> */accessResults);
2003 
2025 LIB61850_API uint32_t
2026 IedConnection_writeDataSetValuesAsync(IedConnection self, IedClientError* error, const char* dataSetReference,
2027  LinkedList/*<MmsValue*>*/ values, IedConnection_WriteDataSetHandler handler, void* parameter);
2028 
2029 
2030 /********************************************************
2031  * Data set object (local representation of a data set)
2032  *******************************************************/
2033 
2042 LIB61850_API void
2044 
2059 LIB61850_API MmsValue*
2061 
2069 LIB61850_API char*
2071 
2079 LIB61850_API int
2081 
2084 /************************************
2085  * Control service functions
2086  ************************************/
2087 
2094 typedef struct sControlObjectClient* ControlObjectClient;
2095 
2112 LIB61850_API ControlObjectClient
2113 ControlObjectClient_create(const char* objectReference, IedConnection connection);
2114 
2127 LIB61850_API ControlObjectClient
2128 ControlObjectClient_createEx(const char* objectReference, IedConnection connection, ControlModel ctlModel, MmsVariableSpecification* controlObjectSpec);
2129 
2135 LIB61850_API void
2137 
2141 typedef enum
2142 {
2147 
2164 typedef void
2165 (*ControlObjectClient_ControlActionHandler) (uint32_t invokeId, void* parameter, IedClientError err, ControlActionType type, bool success);
2166 
2174 LIB61850_API const char*
2176 
2184 LIB61850_API ControlModel
2186 
2195 LIB61850_API void
2197 
2207 LIB61850_API void
2209 
2220 LIB61850_API MmsType
2222 
2230 LIB61850_API IedClientError
2232 
2243 LIB61850_API bool
2245 
2256 LIB61850_API bool
2258 
2270 LIB61850_API bool
2272 
2283 LIB61850_API bool
2285 
2286 
2300 LIB61850_API uint32_t
2302  ControlObjectClient_ControlActionHandler handler, void* parameter);
2303 
2317 LIB61850_API uint32_t
2319 
2334 LIB61850_API uint32_t
2336  ControlObjectClient_ControlActionHandler handler, void* parameter);
2337 
2351 LIB61850_API uint32_t
2353 
2361 LIB61850_API LastApplError
2363 
2373 LIB61850_API void
2375 
2386 LIB61850_API void
2387 ControlObjectClient_setOrigin(ControlObjectClient self, const char* orIdent, int orCat);
2388 
2397 LIB61850_API void
2399 
2403 LIB61850_API DEPRECATED void
2405 
2409 LIB61850_API DEPRECATED void
2411 
2415 LIB61850_API DEPRECATED void
2417 
2424 LIB61850_API void
2426 
2433 LIB61850_API void
2435 
2436 
2454 typedef void (*CommandTerminationHandler) (void* parameter, ControlObjectClient controlClient);
2455 
2470 LIB61850_API void
2472  void* handlerParameter);
2473 
2476 /*************************************
2477  * Model discovery services
2478  ************************************/
2479 
2496 LIB61850_API void
2498 
2512 LIB61850_API LinkedList /*<char*>*/
2514 
2531 LIB61850_API LinkedList /*<char*>*/
2533 
2549 LIB61850_API LinkedList /*<char*>*/
2550 IedConnection_getLogicalDeviceDirectory(IedConnection self, IedClientError* error, const char* logicalDeviceName);
2551 
2567 LIB61850_API LinkedList /*<char*>*/
2569  const char* logicalNodeReference);
2570 
2587 LIB61850_API LinkedList /*<char*>*/
2589  const char* logicalNodeReference, ACSIClass acsiClass);
2590 
2606 LIB61850_API LinkedList /*<char*>*/
2607 IedConnection_getDataDirectory(IedConnection self, IedClientError* error, const char* dataReference);
2608 
2625 LIB61850_API LinkedList /*<char*>*/
2626 IedConnection_getDataDirectoryFC(IedConnection self, IedClientError* error, const char* dataReference);
2627 
2647 LIB61850_API LinkedList
2649 
2665 LIB61850_API MmsVariableSpecification*
2666 IedConnection_getVariableSpecification(IedConnection self, IedClientError* error, const char* dataAttributeReference,
2668 
2681 LIB61850_API LinkedList
2683 
2696 LIB61850_API LinkedList
2698 
2699 /*****************************************
2700  * Asynchronous model discovery functions
2701  *****************************************/
2702 
2703 typedef void
2704 (*IedConnection_GetNameListHandler) (uint32_t invokeId, void* parameter, IedClientError err, LinkedList nameList, bool moreFollows);
2705 
2718 LIB61850_API uint32_t
2719 IedConnection_getServerDirectoryAsync(IedConnection self, IedClientError* error, const char* continueAfter, LinkedList result,
2720  IedConnection_GetNameListHandler handler, void* parameter);
2721 
2738 LIB61850_API uint32_t
2739 IedConnection_getLogicalDeviceVariablesAsync(IedConnection self, IedClientError* error, const char* ldName, const char* continueAfter, LinkedList result,
2740  IedConnection_GetNameListHandler handler, void* parameter);
2741 
2758 LIB61850_API uint32_t
2759 IedConnection_getLogicalDeviceDataSetsAsync(IedConnection self, IedClientError* error, const char* ldName, const char* continueAfter, LinkedList result,
2760  IedConnection_GetNameListHandler handler, void* parameter);
2761 
2762 
2763 typedef void
2764 (*IedConnection_GetVariableSpecificationHandler) (uint32_t invokeId, void* parameter, IedClientError err, MmsVariableSpecification* spec);
2765 
2777 LIB61850_API uint32_t
2778 IedConnection_getVariableSpecificationAsync(IedConnection self, IedClientError* error, const char* dataAttributeReference,
2780 
2806 LIB61850_API LinkedList /* <MmsJournalEntry> */
2807 IedConnection_queryLogByTime(IedConnection self, IedClientError* error, const char* logReference,
2808  uint64_t startTime, uint64_t endTime, bool* moreFollows);
2809 
2827 LIB61850_API LinkedList /* <MmsJournalEntry> */
2828 IedConnection_queryLogAfter(IedConnection self, IedClientError* error, const char* logReference,
2829  MmsValue* entryID, uint64_t timeStamp, bool* moreFollows);
2830 
2831 
2832 typedef void
2833 (*IedConnection_QueryLogHandler) (uint32_t invokeId, void* parameter, IedClientError mmsError, LinkedList /* <MmsJournalEntry> */ journalEntries, bool moreFollows);
2834 
2835 LIB61850_API uint32_t
2836 IedConnection_queryLogByTimeAsync(IedConnection self, IedClientError* error, const char* logReference,
2837  uint64_t startTime, uint64_t endTime, IedConnection_QueryLogHandler handler, void* parameter);
2838 
2839 LIB61850_API uint32_t
2840 IedConnection_queryLogAfterAsync(IedConnection self, IedClientError* error, const char* logReference,
2841  MmsValue* entryID, uint64_t timeStamp, IedConnection_QueryLogHandler handler, void* parameter);
2842 
2851 typedef struct sFileDirectoryEntry* FileDirectoryEntry;
2852 
2856 LIB61850_API FileDirectoryEntry
2857 FileDirectoryEntry_create(const char* fileName, uint32_t fileSize, uint64_t lastModified);
2858 
2866 LIB61850_API void
2868 
2876 LIB61850_API const char*
2878 
2886 LIB61850_API uint32_t
2888 
2896 LIB61850_API uint64_t
2898 
2899 
2918 LIB61850_API LinkedList /*<FileDirectoryEntry>*/
2919 IedConnection_getFileDirectory(IedConnection self, IedClientError* error, const char* directoryName);
2920 
2921 
2949 LIB61850_API LinkedList /*<FileDirectoryEntry>*/
2950 IedConnection_getFileDirectoryEx(IedConnection self, IedClientError* error, const char* directoryName, const char* continueAfter,
2951  bool* moreFollows);
2952 
2977 typedef bool
2978 (*IedConnection_FileDirectoryEntryHandler) (uint32_t invokeId, void* parameter, IedClientError err, char* filename, uint32_t size, uint64_t lastModfified,
2979  bool moreFollows);
2980 
2999 LIB61850_API uint32_t
3000 IedConnection_getFileDirectoryAsyncEx(IedConnection self, IedClientError* error, const char* directoryName, const char* continueAfter,
3001  IedConnection_FileDirectoryEntryHandler handler, void* parameter);
3002 
3017 typedef bool
3018 (*IedClientGetFileHandler) (void* parameter, uint8_t* buffer, uint32_t bytesRead);
3019 
3031 LIB61850_API uint32_t
3033  void* handlerParameter);
3034 
3035 
3054 typedef bool
3055 (*IedConnection_GetFileAsyncHandler) (uint32_t invokeId, void* parameter, IedClientError err, uint32_t originalInvokeId,
3056  uint8_t* buffer, uint32_t bytesRead, bool moreFollows);
3057 
3058 
3075 LIB61850_API uint32_t
3077  void* parameter);
3078 
3089 LIB61850_API void
3091 
3102 LIB61850_API void
3103 IedConnection_setFile(IedConnection self, IedClientError* error, const char* sourceFilename, const char* destinationFilename);
3104 
3117 LIB61850_API uint32_t
3118 IedConnection_setFileAsync(IedConnection self, IedClientError* error, const char* sourceFilename, const char* destinationFilename,
3119  IedConnection_GenericServiceHandler handler, void* parameter);
3120 
3130 LIB61850_API void
3131 IedConnection_deleteFile(IedConnection self, IedClientError* error, const char* fileName);
3132 
3144 LIB61850_API uint32_t
3146  IedConnection_GenericServiceHandler handler, void* parameter);
3147 
3148 
3153 #ifdef __cplusplus
3154 }
3155 #endif
3156 
3157 
3158 #endif /* IEC61850_CLIENT_H_ */
ControlAddCause
Definition: iec61850_common.h:205
ControlLastApplError
Definition: iec61850_common.h:244
FunctionalConstraint
Definition: iec61850_common.h:260
LIB61850_API void ControlObjectClient_setInterlockCheck(ControlObjectClient self, bool value)
Set the value of the interlock check flag when a control command is sent.
LIB61850_API LastApplError ControlObjectClient_getLastApplError(ControlObjectClient self)
Get the last received control application error.
LIB61850_API MmsType ControlObjectClient_getCtlValType(ControlObjectClient self)
Get the type of ctlVal.
ControlActionType
Definition: iec61850_client.h:2142
LIB61850_API bool ControlObjectClient_selectWithValue(ControlObjectClient self, MmsValue *ctlVal)
Send an select with value command to the server.
LIB61850_API void ControlObjectClient_setSynchroCheck(ControlObjectClient self, bool value)
Set the value of the synchro check flag when a control command is sent.
void(* ControlObjectClient_ControlActionHandler)(uint32_t invokeId, void *parameter, IedClientError err, ControlActionType type, bool success)
A callback handler that is invoked when a command termination message is received.
Definition: iec61850_client.h:2165
struct sControlObjectClient * ControlObjectClient
Definition: iec61850_client.h:2094
LIB61850_API void ControlObjectClient_setTestMode(ControlObjectClient self, bool value)
Send commands in test mode.
LIB61850_API void ControlObjectClient_setOrigin(ControlObjectClient self, const char *orIdent, int orCat)
Set the origin parameter for control commands.
LIB61850_API void ControlObjectClient_changeServerControlModel(ControlObjectClient self, ControlModel ctlModel)
Change the control model of the server.
LIB61850_API uint32_t ControlObjectClient_operateAsync(ControlObjectClient self, IedClientError *err, MmsValue *ctlVal, uint64_t operTime, ControlObjectClient_ControlActionHandler handler, void *parameter)
Send an operate command to the server - async version.
LIB61850_API DEPRECATED void ControlObjectClient_setCtlNum(ControlObjectClient self, uint8_t ctlNum)
LIB61850_API IedClientError ControlObjectClient_getLastError(ControlObjectClient self)
Get the error code of the last synchronous control action (operate, select, select-with-value,...
LIB61850_API uint32_t ControlObjectClient_selectWithValueAsync(ControlObjectClient self, IedClientError *err, MmsValue *ctlVal, ControlObjectClient_ControlActionHandler handler, void *parameter)
Send a select-with-value command to the server - async version.
LIB61850_API void ControlObjectClient_setCommandTerminationHandler(ControlObjectClient self, CommandTerminationHandler handler, void *handlerParameter)
Set the command termination callback handler for this control object.
LIB61850_API void ControlObjectClient_destroy(ControlObjectClient self)
Destroy the client control object instance and release all related resources.
LIB61850_API uint32_t ControlObjectClient_selectAsync(ControlObjectClient self, IedClientError *err, ControlObjectClient_ControlActionHandler handler, void *parameter)
Send a select command to the server - async version.
LIB61850_API ControlObjectClient ControlObjectClient_create(const char *objectReference, IedConnection connection)
Create a new client control object.
LIB61850_API DEPRECATED void ControlObjectClient_enableInterlockCheck(ControlObjectClient self)
LIB61850_API void ControlObjectClient_setControlModel(ControlObjectClient self, ControlModel ctlModel)
Set the applied control model.
LIB61850_API const char * ControlObjectClient_getObjectReference(ControlObjectClient self)
Get the object reference of the control data object.
LIB61850_API DEPRECATED void ControlObjectClient_enableSynchroCheck(ControlObjectClient self)
LIB61850_API ControlModel ControlObjectClient_getControlModel(ControlObjectClient self)
Get the current control model (local representation) applied to the control object.
LIB61850_API bool ControlObjectClient_cancel(ControlObjectClient self)
Send a cancel command to the server.
void(* CommandTerminationHandler)(void *parameter, ControlObjectClient controlClient)
A callback handler that is invoked when a command termination message is received.
Definition: iec61850_client.h:2454
LIB61850_API bool ControlObjectClient_operate(ControlObjectClient self, MmsValue *ctlVal, uint64_t operTime)
Send an operate command to the server.
LIB61850_API bool ControlObjectClient_select(ControlObjectClient self)
Send a select command to the server.
LIB61850_API uint32_t ControlObjectClient_cancelAsync(ControlObjectClient self, IedClientError *err, ControlObjectClient_ControlActionHandler handler, void *parameter)
Send a cancel command to the server - async version.
LIB61850_API void ControlObjectClient_useConstantT(ControlObjectClient self, bool useConstantT)
Use a constant T parameter for all command (select, operate, cancel) of a single control sequence.
LIB61850_API ControlObjectClient ControlObjectClient_createEx(const char *objectReference, IedConnection connection, ControlModel ctlModel, MmsVariableSpecification *controlObjectSpec)
Create a new client control object - doesn't send requests to the server (doesn't block)
@ CONTROL_ACTION_TYPE_CANCEL
Definition: iec61850_client.h:2145
@ CONTROL_ACTION_TYPE_OPERATE
Definition: iec61850_client.h:2144
@ CONTROL_ACTION_TYPE_SELECT
Definition: iec61850_client.h:2143
LIB61850_API void IedConnection_writeBooleanValue(IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc, bool value)
write a functional constrained data attribute (FCDA) of type boolean
LIB61850_API void IedConnection_writeObject(IedConnection self, IedClientError *error, const char *dataAttributeReference, FunctionalConstraint fc, MmsValue *value)
write a functional constrained data attribute (FCDA) or functional constrained data (FCD).
LIB61850_API void IedConnection_writeFloatValue(IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc, float value)
write a functional constrained data attribute (FCDA) of type float
LIB61850_API void IedConnection_writeInt32Value(IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc, int32_t value)
write a functional constrained data attribute (FCDA) of type integer
LIB61850_API bool IedConnection_readBooleanValue(IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc)
read a functional constrained data attribute (FCDA) of type boolean
LIB61850_API void IedConnection_writeVisibleStringValue(IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc, char *value)
LIB61850_API Quality IedConnection_readQualityValue(IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc)
read a functional constrained data attribute (FCDA) of type Quality
LIB61850_API MmsValue * IedConnection_readObject(IedConnection self, IedClientError *error, const char *dataAttributeReference, FunctionalConstraint fc)
read a functional constrained data attribute (FCDA) or functional constrained data (FCD).
LIB61850_API Timestamp * IedConnection_readTimestampValue(IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc, Timestamp *timeStamp)
read a functional constrained data attribute (FCDA) of type Timestamp (UTC Time)
LIB61850_API int32_t IedConnection_readInt32Value(IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc)
read a functional constrained data attribute (FCDA) of type Integer or Unsigned and return the result...
void(* IedConnection_ReadObjectHandler)(uint32_t invokeId, void *parameter, IedClientError err, MmsValue *value)
Definition: iec61850_client.h:945
LIB61850_API uint32_t IedConnection_writeObjectAsync(IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc, MmsValue *value, IedConnection_GenericServiceHandler handler, void *parameter)
write a functional constrained data attribute (FCDA) or functional constrained data (FCD) - async ver...
LIB61850_API float IedConnection_readFloatValue(IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc)
read a functional constrained data attribute (FCDA) of type float
LIB61850_API void IedConnection_writeOctetString(IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc, uint8_t *value, int valueLength)
LIB61850_API uint32_t IedConnection_readObjectAsync(IedConnection self, IedClientError *error, const char *objRef, FunctionalConstraint fc, IedConnection_ReadObjectHandler handler, void *parameter)
read a functional constrained data attribute (FCDA) or functional constrained data (FCD) - async vers...
LIB61850_API char * IedConnection_readStringValue(IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc)
read a functional constrained data attribute (FCDA) of type VisibleString or MmsString
LIB61850_API void IedConnection_writeUnsigned32Value(IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc, uint32_t value)
write a functional constrained data attribute (FCDA) of type unsigned (integer)
LIB61850_API int64_t IedConnection_readInt64Value(IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc)
read a functional constrained data attribute (FCDA) of type Integer or Unsigned and return the result...
LIB61850_API uint32_t IedConnection_readUnsigned32Value(IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc)
read a functional constrained data attribute (FCDA) of type Integer or Unsigned and return the result...
LIB61850_API char * ClientDataSet_getReference(ClientDataSet self)
Get the object reference of the data set.
LIB61850_API uint32_t IedConnection_readDataSetValuesAsync(IedConnection self, IedClientError *error, const char *dataSetReference, ClientDataSet dataSet, IedConnection_ReadDataSetHandler handler, void *parameter)
get data set values from the server - async version
LIB61850_API void IedConnection_writeDataSetValues(IedConnection self, IedClientError *error, const char *dataSetReference, LinkedList values, LinkedList *accessResults)
Write the data set values to the server.
LIB61850_API uint32_t IedConnection_getDataSetDirectoryAsync(IedConnection self, IedClientError *error, const char *dataSetReference, IedConnection_GetDataSetDirectoryHandler handler, void *parameter)
read the data set directory - asynchronous version
LIB61850_API void IedConnection_createDataSet(IedConnection self, IedClientError *error, const char *dataSetReference, LinkedList dataSetElements)
create a new data set at the connected server device
LIB61850_API int ClientDataSet_getDataSetSize(ClientDataSet self)
get the size of the data set (number of members)
LIB61850_API uint32_t IedConnection_writeDataSetValuesAsync(IedConnection self, IedClientError *error, const char *dataSetReference, LinkedList values, IedConnection_WriteDataSetHandler handler, void *parameter)
Write the data set values to the server - async version.
LIB61850_API uint32_t IedConnection_deleteDataSetAsync(IedConnection self, IedClientError *error, const char *dataSetReference, IedConnection_GenericServiceHandler handler, void *parameter)
delete a deletable data set at the connected server device - asynchronous version
LIB61850_API ClientDataSet IedConnection_readDataSetValues(IedConnection self, IedClientError *error, const char *dataSetReference, ClientDataSet dataSet)
get data set values from the server
void(* IedConnection_WriteDataSetHandler)(uint32_t invokeId, void *parameter, IedClientError err, LinkedList accessResults)
Callback handler for asynchronous write data set values services (set data set)
Definition: iec61850_client.h:2002
LIB61850_API uint32_t IedConnection_createDataSetAsync(IedConnection self, IedClientError *error, const char *dataSetReference, LinkedList dataSetElements, IedConnection_GenericServiceHandler handler, void *parameter)
create a new data set at the connected server device
void(* IedConnection_GetDataSetDirectoryHandler)(uint32_t invokeId, void *parameter, IedClientError err, LinkedList dataSetDirectory, bool isDeletable)
GetDataSetDirectory response or timeout callback.
Definition: iec61850_client.h:1954
LIB61850_API LinkedList IedConnection_getDataSetDirectory(IedConnection self, IedClientError *error, const char *dataSetReference, bool *isDeletable)
read the data set directory
LIB61850_API bool IedConnection_deleteDataSet(IedConnection self, IedClientError *error, const char *dataSetReference)
delete a deletable data set at the connected server device
LIB61850_API void ClientDataSet_destroy(ClientDataSet self)
destroy an ClientDataSet instance. Has to be called by the application.
LIB61850_API MmsValue * ClientDataSet_getValues(ClientDataSet self)
get the data set values locally stored in the ClientDataSet instance.
void(* IedConnection_ReadDataSetHandler)(uint32_t invokeId, void *parameter, IedClientError err, ClientDataSet dataSet)
Definition: iec61850_client.h:1822
LIB61850_API uint32_t FileDirectoryEntry_getFileSize(FileDirectoryEntry self)
Get the file size in bytes.
LIB61850_API uint32_t IedConnection_setFileAsync(IedConnection self, IedClientError *error, const char *sourceFilename, const char *destinationFilename, IedConnection_GenericServiceHandler handler, void *parameter)
Implementation of the SetFile ACSI service - asynchronous version.
LIB61850_API uint32_t IedConnection_getFileAsync(IedConnection self, IedClientError *error, const char *fileName, IedConnection_GetFileAsyncHandler handler, void *parameter)
Implementation of the GetFile ACSI service - asynchronous version.
struct sFileDirectoryEntry * FileDirectoryEntry
Definition: iec61850_client.h:2851
LIB61850_API LinkedList IedConnection_getFileDirectoryEx(IedConnection self, IedClientError *error, const char *directoryName, const char *continueAfter, bool *moreFollows)
returns the directory entries of the specified file directory returned by a single file directory req...
LIB61850_API void IedConnection_setFile(IedConnection self, IedClientError *error, const char *sourceFilename, const char *destinationFilename)
Implementation of the SetFile ACSI service.
LIB61850_API uint32_t IedConnection_getFileDirectoryAsyncEx(IedConnection self, IedClientError *error, const char *directoryName, const char *continueAfter, IedConnection_FileDirectoryEntryHandler handler, void *parameter)
Get file directory (single request) - asynchronous version.
LIB61850_API LinkedList IedConnection_getFileDirectory(IedConnection self, IedClientError *error, const char *directoryName)
returns the directory entries of the specified file directory.
LIB61850_API uint32_t IedConnection_deleteFileAsync(IedConnection self, IedClientError *error, const char *fileName, IedConnection_GenericServiceHandler handler, void *parameter)
Implementation of the DeleteFile ACSI service - asynchronous version.
LIB61850_API void FileDirectoryEntry_destroy(FileDirectoryEntry self)
Destroy a FileDirectoryEntry object (free all resources)
LIB61850_API void IedConnection_setFilestoreBasepath(IedConnection, const char *basepath)
Set the virtual filestore basepath for the setFile service.
LIB61850_API FileDirectoryEntry FileDirectoryEntry_create(const char *fileName, uint32_t fileSize, uint64_t lastModified)
LIB61850_API const char * FileDirectoryEntry_getFileName(FileDirectoryEntry self)
Get the name of the file.
LIB61850_API uint32_t IedConnection_getFile(IedConnection self, IedClientError *error, const char *fileName, IedClientGetFileHandler handler, void *handlerParameter)
Implementation of the GetFile ACSI service.
bool(* IedClientGetFileHandler)(void *parameter, uint8_t *buffer, uint32_t bytesRead)
user provided handler to receive the data of the GetFile request
Definition: iec61850_client.h:3018
bool(* IedConnection_FileDirectoryEntryHandler)(uint32_t invokeId, void *parameter, IedClientError err, char *filename, uint32_t size, uint64_t lastModfified, bool moreFollows)
Callback handler for the get file directory service.
Definition: iec61850_client.h:2978
LIB61850_API uint64_t FileDirectoryEntry_getLastModified(FileDirectoryEntry self)
Get the timestamp of last modification of the file.
bool(* IedConnection_GetFileAsyncHandler)(uint32_t invokeId, void *parameter, IedClientError err, uint32_t originalInvokeId, uint8_t *buffer, uint32_t bytesRead, bool moreFollows)
User provided handler to receive the data of the asynchronous GetFile request.
Definition: iec61850_client.h:3055
LIB61850_API void IedConnection_deleteFile(IedConnection self, IedClientError *error, const char *fileName)
Implementation of the DeleteFile ACSI service.
LIB61850_API IedConnection IedConnection_createEx(TLSConfiguration tlsConfig, bool useThreads)
create a new IedConnection instance (extended version)
LIB61850_API IedConnection IedConnection_createWithTlsSupport(TLSConfiguration tlsConfig)
create a new IedConnection instance that has support for TLS
LIB61850_API void IedConnection_setLocalAddress(IedConnection self, const char *localIpAddress, int localPort)
Set the local IP address and port to be used by the client.
LIB61850_API void IedConnection_installStateChangedHandler(IedConnection self, IedConnection_StateChangedHandler handler, void *parameter)
Install a handler function that is called when the connection state changes.
LIB61850_API void IedConnection_close(IedConnection self)
Close the connection.
LIB61850_API void IedConnection_setRequestTimeout(IedConnection self, uint32_t timeoutInMs)
set the request timeout in ms
LIB61850_API LastApplError IedConnection_getLastApplError(IedConnection self)
Access to last application error received by the client connection.
LIB61850_API void IedConnection_setMaxOutstandingCalls(IedConnection self, int calling, int called)
Set the maximum number outstanding calls allowed for this connection.
LIB61850_API void IedConnection_release(IedConnection self, IedClientError *error)
Release the connection.
LIB61850_API void IedConnection_installConnectionClosedHandler(IedConnection self, IedConnectionClosedHandler handler, void *parameter)
Install a handler function that is called when the connection is lost/closed.
LIB61850_API const char * IedClientError_toString(IedClientError err)
Convert error value to string.
void(* IedConnection_StateChangedHandler)(void *parameter, IedConnection connection, IedConnectionState newState)
Callback handler that is invoked whenever the connection state (IedConnectionState) changes.
Definition: iec61850_client.h:499
IedConnectionState
Definition: iec61850_client.h:73
LIB61850_API void IedConnection_connect(IedConnection self, IedClientError *error, const char *hostname, int tcpPort)
Connect to a server.
LIB61850_API void IedConnection_setConnectTimeout(IedConnection self, uint32_t timeoutInMs)
set the connect timeout in ms
void(* IedConnectionClosedHandler)(void *parameter, IedConnection connection)
Callback handler that is invoked when the connection is closed.
Definition: iec61850_client.h:476
IedClientError
Definition: iec61850_client.h:81
LIB61850_API void IedConnection_destroy(IedConnection self)
destroy an IedConnection instance.
LIB61850_API void IedConnection_setTimeQuality(IedConnection self, bool leapSecondKnown, bool clockFailure, bool clockNotSynchronized, int subsecondPrecision)
Set the time quality for all timestamps generated by this IedConnection instance.
LIB61850_API MmsConnection IedConnection_getMmsConnection(IedConnection self)
get a handle to the underlying MmsConnection
struct sIedConnection * IedConnection
Definition: iec61850_client.h:61
LIB61850_API IedConnectionState IedConnection_getState(IedConnection self)
return the state of the connection.
LIB61850_API bool IedConnection_tick(IedConnection self)
Perform MMS message handling and house-keeping tasks (for non-thread mode only)
LIB61850_API IedConnection IedConnection_create(void)
create a new IedConnection instance
LIB61850_API void IedConnection_abortAsync(IedConnection self, IedClientError *error)
Asynchronously abort the connection.
LIB61850_API void IedConnection_connectAsync(IedConnection self, IedClientError *error, const char *hostname, int tcpPort)
Asynchronously connect to a server.
LIB61850_API void IedConnection_releaseAsync(IedConnection self, IedClientError *error)
Asynchronously release the connection.
void(* IedConnection_GenericServiceHandler)(uint32_t invokeId, void *parameter, IedClientError err)
Generic serivce callback handler.
Definition: iec61850_client.h:339
LIB61850_API uint32_t IedConnection_getRequestTimeout(IedConnection self)
get the request timeout in ms for this connection
LIB61850_API void IedConnection_abort(IedConnection self, IedClientError *error)
Abort the connection.
@ IED_STATE_CONNECTED
Definition: iec61850_client.h:76
@ IED_STATE_CONNECTING
Definition: iec61850_client.h:75
@ IED_STATE_CLOSING
Definition: iec61850_client.h:77
@ IED_STATE_CLOSED
Definition: iec61850_client.h:74
@ IED_ERROR_ACCESS_DENIED
Definition: iec61850_client.h:124
@ IED_ERROR_ENABLE_REPORT_FAILED_DATASET_MISMATCH
Definition: iec61850_client.h:110
@ IED_ERROR_NOT_CONNECTED
Definition: iec61850_client.h:88
@ IED_ERROR_TYPE_UNSUPPORTED
Definition: iec61850_client.h:151
@ IED_ERROR_MALFORMED_MESSAGE
Definition: iec61850_client.h:163
@ IED_ERROR_OBJECT_VALUE_INVALID
Definition: iec61850_client.h:157
@ IED_ERROR_USER_PROVIDED_INVALID_ARGUMENT
Definition: iec61850_client.h:108
@ IED_ERROR_ALREADY_CONNECTED
Definition: iec61850_client.h:91
@ IED_ERROR_HARDWARE_FAULT
Definition: iec61850_client.h:148
@ IED_ERROR_TYPE_INCONSISTENT
Definition: iec61850_client.h:136
@ IED_ERROR_OK
Definition: iec61850_client.h:85
@ IED_ERROR_OBJECT_ATTRIBUTE_INCONSISTENT
Definition: iec61850_client.h:154
@ IED_ERROR_OBJECT_REFERENCE_INVALID
Definition: iec61850_client.h:113
@ IED_ERROR_OUTSTANDING_CALL_LIMIT_REACHED
Definition: iec61850_client.h:103
@ IED_ERROR_INVALID_ADDRESS
Definition: iec61850_client.h:145
@ IED_ERROR_UNKNOWN
Definition: iec61850_client.h:172
@ IED_ERROR_OBJECT_UNDEFINED
Definition: iec61850_client.h:142
@ IED_ERROR_SERVICE_NOT_SUPPORTED
Definition: iec61850_client.h:97
@ IED_ERROR_OBJECT_ACCESS_UNSUPPORTED
Definition: iec61850_client.h:133
@ IED_ERROR_OBJECT_DOES_NOT_EXIST
Definition: iec61850_client.h:127
@ IED_ERROR_CONNECTION_LOST
Definition: iec61850_client.h:94
@ IED_ERROR_OBJECT_INVALIDATED
Definition: iec61850_client.h:160
@ IED_ERROR_UNEXPECTED_VALUE_RECEIVED
Definition: iec61850_client.h:116
@ IED_ERROR_OBJECT_CONSTRAINT_CONFLICT
Definition: iec61850_client.h:166
@ IED_ERROR_OBJECT_EXISTS
Definition: iec61850_client.h:130
@ IED_ERROR_SERVICE_NOT_IMPLEMENTED
Definition: iec61850_client.h:169
@ IED_ERROR_TIMEOUT
Definition: iec61850_client.h:121
@ IED_ERROR_TEMPORARILY_UNAVAILABLE
Definition: iec61850_client.h:139
@ IED_ERROR_CONNECTION_REJECTED
Definition: iec61850_client.h:100
LIB61850_API ClientGooseControlBlock ClientGooseControlBlock_create(const char *dataAttributeReference)
LIB61850_API uint32_t IedConnection_getGoCBValuesAsync(IedConnection self, IedClientError *error, const char *goCBReference, ClientGooseControlBlock updateGoCB, IedConnection_GetGoCBValuesHandler handler, void *parameter)
Read access to attributes of a GOOSE control block (GoCB) at the connected server (async version)
LIB61850_API bool ClientGooseControlBlock_getNdsComm(ClientGooseControlBlock self)
LIB61850_API DEPRECATED uint16_t ClientGooseControlBlock_getDstAddress_appid(ClientGooseControlBlock self)
LIB61850_API const char * ClientGooseControlBlock_getGoID(ClientGooseControlBlock self)
LIB61850_API void ClientGooseControlBlock_setDstAddress(ClientGooseControlBlock self, PhyComAddress value)
LIB61850_API const char * ClientGooseControlBlock_getDatSet(ClientGooseControlBlock self)
LIB61850_API void ClientGooseControlBlock_setDatSet(ClientGooseControlBlock self, const char *datSet)
LIB61850_API DEPRECATED void ClientGooseControlBlock_setDstAddress_appid(ClientGooseControlBlock self, uint16_t appidValue)
LIB61850_API DEPRECATED MmsValue * ClientGooseControlBlock_getDstAddress_addr(ClientGooseControlBlock self)
LIB61850_API void ClientGooseControlBlock_destroy(ClientGooseControlBlock self)
LIB61850_API bool ClientGooseControlBlock_getFixedOffs(ClientGooseControlBlock self)
LIB61850_API DEPRECATED uint16_t ClientGooseControlBlock_getDstAddress_vid(ClientGooseControlBlock self)
LIB61850_API bool ClientGooseControlBlock_getGoEna(ClientGooseControlBlock self)
LIB61850_API uint32_t ClientGooseControlBlock_getMaxTime(ClientGooseControlBlock self)
LIB61850_API DEPRECATED uint8_t ClientGooseControlBlock_getDstAddress_priority(ClientGooseControlBlock self)
LIB61850_API DEPRECATED void ClientGooseControlBlock_setDstAddress_priority(ClientGooseControlBlock self, uint8_t priorityValue)
LIB61850_API uint32_t ClientGooseControlBlock_getMinTime(ClientGooseControlBlock self)
LIB61850_API void IedConnection_setGoCBValues(IedConnection self, IedClientError *error, ClientGooseControlBlock goCB, uint32_t parametersMask, bool singleRequest)
Write access to attributes of a GOOSE control block (GoCB) at the connected server.
LIB61850_API PhyComAddress ClientGooseControlBlock_getDstAddress(ClientGooseControlBlock self)
LIB61850_API DEPRECATED void ClientGooseControlBlock_setDstAddress_addr(ClientGooseControlBlock self, MmsValue *macAddr)
LIB61850_API uint32_t IedConnection_setGoCBValuesAsync(IedConnection self, IedClientError *error, ClientGooseControlBlock goCB, uint32_t parametersMask, bool singleRequest, IedConnection_GenericServiceHandler handler, void *parameter)
Write access to attributes of a GOOSE control block (GoCB) at the connected server (async version)
LIB61850_API void ClientGooseControlBlock_setGoEna(ClientGooseControlBlock self, bool goEna)
LIB61850_API DEPRECATED void ClientGooseControlBlock_setDstAddress_vid(ClientGooseControlBlock self, uint16_t vidValue)
LIB61850_API ClientGooseControlBlock IedConnection_getGoCBValues(IedConnection self, IedClientError *error, const char *goCBReference, ClientGooseControlBlock updateGoCB)
Read access to attributes of a GOOSE control block (GoCB) at the connected server.
void(* IedConnection_GetGoCBValuesHandler)(uint32_t invokeId, void *parameter, IedClientError err, ClientGooseControlBlock goCB)
Definition: iec61850_client.h:829
LIB61850_API void ClientGooseControlBlock_setGoID(ClientGooseControlBlock self, const char *goID)
LIB61850_API uint32_t ClientGooseControlBlock_getConfRev(ClientGooseControlBlock self)
LIB61850_API uint32_t IedConnection_queryLogByTimeAsync(IedConnection self, IedClientError *error, const char *logReference, uint64_t startTime, uint64_t endTime, IedConnection_QueryLogHandler handler, void *parameter)
LIB61850_API LinkedList IedConnection_queryLogAfter(IedConnection self, IedClientError *error, const char *logReference, MmsValue *entryID, uint64_t timeStamp, bool *moreFollows)
Implementation of the QueryLogAfter ACSI service.
void(* IedConnection_QueryLogHandler)(uint32_t invokeId, void *parameter, IedClientError mmsError, LinkedList journalEntries, bool moreFollows)
Definition: iec61850_client.h:2833
LIB61850_API LinkedList IedConnection_queryLogByTime(IedConnection self, IedClientError *error, const char *logReference, uint64_t startTime, uint64_t endTime, bool *moreFollows)
Implementation of the QueryLogByTime ACSI service.
LIB61850_API uint32_t IedConnection_queryLogAfterAsync(IedConnection self, IedClientError *error, const char *logReference, MmsValue *entryID, uint64_t timeStamp, IedConnection_QueryLogHandler handler, void *parameter)
LIB61850_API LinkedList IedConnection_getLogicalNodeDirectory(IedConnection self, IedClientError *error, const char *logicalNodeReference, ACSIClass acsiClass)
returns the directory of the given logical node (LN) containing elements of the specified ACSI class
void(* IedConnection_GetVariableSpecificationHandler)(uint32_t invokeId, void *parameter, IedClientError err, MmsVariableSpecification *spec)
Definition: iec61850_client.h:2764
LIB61850_API LinkedList IedConnection_getDataDirectoryFC(IedConnection self, IedClientError *error, const char *dataReference)
returns the directory of the given data object (DO)
LIB61850_API LinkedList IedConnection_getDataDirectoryByFC(IedConnection self, IedClientError *error, const char *dataReference, FunctionalConstraint fc)
returns the directory of the given data object/data attribute with the given FC
LIB61850_API LinkedList IedConnection_getLogicalDeviceDataSets(IedConnection self, IedClientError *error, const char *ldName)
Get the data set names of the logical device.
LIB61850_API LinkedList IedConnection_getServerDirectory(IedConnection self, IedClientError *error, bool getFileNames)
Get the list of logical devices or files available at the server.
LIB61850_API LinkedList IedConnection_getLogicalDeviceList(IedConnection self, IedClientError *error)
Get the list of logical devices available at the server (DEPRECATED)
LIB61850_API uint32_t IedConnection_getLogicalDeviceDataSetsAsync(IedConnection self, IedClientError *error, const char *ldName, const char *continueAfter, LinkedList result, IedConnection_GetNameListHandler handler, void *parameter)
Get the data set names in the logical device - asynchronous version.
void(* IedConnection_GetNameListHandler)(uint32_t invokeId, void *parameter, IedClientError err, LinkedList nameList, bool moreFollows)
Definition: iec61850_client.h:2704
LIB61850_API void IedConnection_getDeviceModelFromServer(IedConnection self, IedClientError *error)
Retrieve the device model from the server.
LIB61850_API LinkedList IedConnection_getDataDirectory(IedConnection self, IedClientError *error, const char *dataReference)
returns the directory of the given data object (DO)
LIB61850_API MmsVariableSpecification * IedConnection_getVariableSpecification(IedConnection self, IedClientError *error, const char *dataAttributeReference, FunctionalConstraint fc)
return the MMS variable type specification of the data attribute referenced by dataAttributeReference...
LIB61850_API uint32_t IedConnection_getVariableSpecificationAsync(IedConnection self, IedClientError *error, const char *dataAttributeReference, FunctionalConstraint fc, IedConnection_GetVariableSpecificationHandler handler, void *parameter)
Get the specification of a variable (data attribute or functional constraint data object) - asynchron...
LIB61850_API uint32_t IedConnection_getServerDirectoryAsync(IedConnection self, IedClientError *error, const char *continueAfter, LinkedList result, IedConnection_GetNameListHandler handler, void *parameter)
Get the server directory (logical devices name) - asynchronous version.
LIB61850_API LinkedList IedConnection_getLogicalNodeVariables(IedConnection self, IedClientError *error, const char *logicalNodeReference)
returns a list of all MMS variables that are children of the given logical node
LIB61850_API uint32_t IedConnection_getLogicalDeviceVariablesAsync(IedConnection self, IedClientError *error, const char *ldName, const char *continueAfter, LinkedList result, IedConnection_GetNameListHandler handler, void *parameter)
Get the variables in the logical device - asynchronous version.
LIB61850_API LinkedList IedConnection_getLogicalDeviceVariables(IedConnection self, IedClientError *error, const char *ldName)
Get all variables of the logical device.
LIB61850_API LinkedList IedConnection_getLogicalDeviceDirectory(IedConnection self, IedClientError *error, const char *logicalDeviceName)
Get the list of logical nodes (LN) of a logical device.
LIB61850_API bool ClientReportControlBlock_hasResvTms(ClientReportControlBlock self)
Check if optional attribute "ResvTms" is present in BRCB.
LIB61850_API char * ClientReport_getRcbReference(ClientReport self)
return reference (name) of the server RCB associated with this ClientReport object
LIB61850_API void ClientReportControlBlock_setIntgPd(ClientReportControlBlock self, uint32_t intgPd)
LIB61850_API int ClientReportControlBlock_getOptFlds(ClientReportControlBlock self)
Gets the OptFlds parameter of the RCB (decides what information to include in a report)
LIB61850_API uint32_t ClientReportControlBlock_getIntgPd(ClientReportControlBlock self)
LIB61850_API char * ClientReportControlBlock_getObjectReference(ClientReportControlBlock self)
LIB61850_API void ClientReportControlBlock_setBufTm(ClientReportControlBlock self, uint32_t bufTm)
Set the BufTm (buffer time) parameter of the RCB.
LIB61850_API bool ClientReport_hasReasonForInclusion(ClientReport self)
determine if the last received report contains reason-for-inclusion information
void(* IedConnection_GetRCBValuesHandler)(uint32_t invokeId, void *parameter, IedClientError err, ClientReportControlBlock rcb)
Definition: iec61850_client.h:1211
LIB61850_API bool ClientReport_hasDataSetName(ClientReport self)
determine if the last received report contains the data set name
LIB61850_API bool ClientReport_hasTimestamp(ClientReport self)
determine if the last received report contains a timestamp
LIB61850_API bool ClientReport_hasBufOvfl(ClientReport self)
indicates if the report contains the bufOvfl (buffer overflow) flag
LIB61850_API uint64_t ClientReport_getTimestamp(ClientReport self)
get the timestamp of the report
LIB61850_API void IedConnection_uninstallReportHandler(IedConnection self, const char *rcbReference)
uninstall a report handler function for the specified report control block (RCB)
LIB61850_API MmsValue * ClientReport_getDataSetValues(ClientReport self)
return the received data set values of the report
LIB61850_API void ClientReportControlBlock_setPurgeBuf(ClientReportControlBlock self, bool purgeBuf)
Set the "PurgeBuf" attribute value (only BRCB)
LIB61850_API uint64_t ClientReportControlBlock_getEntryTime(ClientReportControlBlock self)
LIB61850_API uint32_t ClientReportControlBlock_getConfRev(ClientReportControlBlock self)
LIB61850_API void ClientReportControlBlock_setEntryId(ClientReportControlBlock self, MmsValue *entryId)
LIB61850_API void ClientReportControlBlock_setDataSetReference(ClientReportControlBlock self, const char *dataSetReference)
set the data set to be observed by the RCB
LIB61850_API bool ClientReport_hasDataReference(ClientReport self)
indicates if the report contains data references for the reported data set members
LIB61850_API ReasonForInclusion ClientReport_getReasonForInclusion(ClientReport self, int elementIndex)
get the reason code (reason for inclusion) for a specific report data set element
LIB61850_API void ClientReportControlBlock_setTrgOps(ClientReportControlBlock self, int trgOps)
LIB61850_API void IedConnection_setRCBValues(IedConnection self, IedClientError *error, ClientReportControlBlock rcb, uint32_t parametersMask, bool singleRequest)
Write access to attributes of a report control block (RCB) at the connected server.
int ReasonForInclusion
Definition: iec61850_client.h:1218
LIB61850_API bool ClientReport_getBufOvfl(ClientReport self)
get the value of the bufOvfl flag
LIB61850_API void ClientReportControlBlock_setRptId(ClientReportControlBlock self, const char *rptId)
LIB61850_API bool ClientReportControlBlock_isBuffered(ClientReportControlBlock self)
LIB61850_API bool ClientReportControlBlock_getPurgeBuf(ClientReportControlBlock self)
LIB61850_API char * ClientReport_getRptId(ClientReport self)
return RptId of the server RCB associated with this ClientReport object
LIB61850_API uint16_t ClientReportControlBlock_getSqNum(ClientReportControlBlock self)
LIB61850_API void ClientReportControlBlock_setOptFlds(ClientReportControlBlock self, int optFlds)
Set the OptFlds parameter of the RCB (decides what information to include in a report)
LIB61850_API uint32_t ClientReportControlBlock_getBufTm(ClientReportControlBlock self)
Get the BufTm (buffer time) parameter of the RCB.
LIB61850_API const char * ClientReportControlBlock_getRptId(ClientReportControlBlock self)
LIB61850_API void ClientReportControlBlock_setResvTms(ClientReportControlBlock self, int16_t resvTms)
LIB61850_API bool ClientReport_hasSeqNum(ClientReport self)
determine if the last received report contains a sequence number
LIB61850_API bool ClientReport_hasSubSeqNum(ClientReport self)
indicates if the report contains a sub sequence number and a more segments follow flags (for segmente...
LIB61850_API void IedConnection_installReportHandler(IedConnection self, const char *rcbReference, const char *rptId, ReportCallbackFunction handler, void *handlerParameter)
Install a report handler function for the specified report control block (RCB)
LIB61850_API uint16_t ClientReport_getSeqNum(ClientReport self)
get the value of the sequence number
LIB61850_API ClientReportControlBlock ClientReportControlBlock_create(const char *rcbReference)
LIB61850_API void ClientReportControlBlock_setResv(ClientReportControlBlock self, bool resv)
LIB61850_API uint16_t ClientReport_getSubSeqNum(ClientReport self)
get the sub sequence number of the report (for segmented reporting)
LIB61850_API int ClientReportControlBlock_getTrgOps(ClientReportControlBlock self)
LIB61850_API MmsValue * ClientReportControlBlock_getOwner(ClientReportControlBlock self)
LIB61850_API bool ClientReport_getMoreSeqmentsFollow(ClientReport self)
get the more segments follow flag of the received report segment (for segmented reporting)
LIB61850_API uint32_t IedConnection_setRCBValuesAsync(IedConnection self, IedClientError *error, ClientReportControlBlock rcb, uint32_t parametersMask, bool singleRequest, IedConnection_GenericServiceHandler handler, void *parameter)
LIB61850_API const char * ClientReport_getDataSetName(ClientReport self)
get the name of the report data set
LIB61850_API bool ClientReport_hasConfRev(ClientReport self)
determine if the last received report contains the configuration revision
LIB61850_API const char * ClientReportControlBlock_getDataSetReference(ClientReportControlBlock self)
LIB61850_API uint32_t IedConnection_getRCBValuesAsync(IedConnection self, IedClientError *error, const char *rcbReference, ClientReportControlBlock updateRcb, IedConnection_GetRCBValuesHandler handler, void *parameter)
LIB61850_API void ClientReportControlBlock_destroy(ClientReportControlBlock self)
LIB61850_API bool ClientReportControlBlock_getRptEna(ClientReportControlBlock self)
LIB61850_API int16_t ClientReportControlBlock_getResvTms(ClientReportControlBlock self)
LIB61850_API void ClientReportControlBlock_setRptEna(ClientReportControlBlock self, bool rptEna)
LIB61850_API bool ClientReportControlBlock_getResv(ClientReportControlBlock self)
LIB61850_API const char * ClientReport_getDataReference(ClientReport self, int elementIndex)
get the data-reference of the element of the report data set
LIB61850_API ClientReportControlBlock IedConnection_getRCBValues(IedConnection self, IedClientError *error, const char *rcbReference, ClientReportControlBlock updateRcb)
Read access to attributes of a report control block (RCB) at the connected server.
LIB61850_API MmsValue * ClientReportControlBlock_getEntryId(ClientReportControlBlock self)
void(* ReportCallbackFunction)(void *parameter, ClientReport report)
Callback function for receiving reports.
Definition: iec61850_client.h:1326
LIB61850_API bool ClientReportControlBlock_getGI(ClientReportControlBlock self)
LIB61850_API char * ReasonForInclusion_getValueAsString(ReasonForInclusion reasonCode)
get the reason for inclusion of as a human readable string
LIB61850_API void ClientReportControlBlock_setGI(ClientReportControlBlock self, bool gi)
LIB61850_API void IedConnection_triggerGIReport(IedConnection self, IedClientError *error, const char *rcbReference)
trigger a general interrogation (GI) report for the specified report control block (RCB)
LIB61850_API uint32_t ClientReport_getConfRev(ClientReport self)
get the value of the configuration revision
LIB61850_API MmsValue * ClientReport_getEntryId(ClientReport self)
get the entry ID of the report
LIB61850_API bool ClientSVControlBlock_setSvEna(ClientSVControlBlock self, bool value)
LIB61850_API bool ClientSVControlBlock_getResv(ClientSVControlBlock self)
LIB61850_API ClientSVControlBlock ClientSVControlBlock_create(IedConnection connection, const char *reference)
Create a new ClientSVControlBlock instance.
LIB61850_API uint32_t ClientSVControlBlock_getConfRev(ClientSVControlBlock self)
LIB61850_API char * ClientSVControlBlock_getMsvID(ClientSVControlBlock self)
LIB61850_API uint8_t ClientSVControlBlock_getSmpMod(ClientSVControlBlock self)
returns number of sample mode of the SV publisher
LIB61850_API bool ClientSVControlBlock_setResv(ClientSVControlBlock self, bool value)
LIB61850_API int ClientSVControlBlock_getOptFlds(ClientSVControlBlock self)
Gets the OptFlds parameter of the RCB (decides what information to include in a report)
LIB61850_API IedClientError ClientSVControlBlock_getLastComError(ClientSVControlBlock self)
Return the error code of the last write or write acccess to the SVCB.
LIB61850_API char * ClientSVControlBlock_getDatSet(ClientSVControlBlock self)
Get the (MMS) reference to the data set.
LIB61850_API int ClientSVControlBlock_getNoASDU(ClientSVControlBlock self)
returns number of ASDUs included in the SV message
LIB61850_API bool ClientSVControlBlock_getSvEna(ClientSVControlBlock self)
LIB61850_API bool ClientSVControlBlock_isMulticast(ClientSVControlBlock self)
Test if this SVCB is multicast.
LIB61850_API uint16_t ClientSVControlBlock_getSmpRate(ClientSVControlBlock self)
LIB61850_API PhyComAddress ClientSVControlBlock_getDstAddress(ClientSVControlBlock self)
returns the destination address of the SV publisher
LIB61850_API void ClientSVControlBlock_destroy(ClientSVControlBlock self)
Free all resources related to the ClientSVControlBlock instance.
struct sClientSVControlBlock * ClientSVControlBlock
Definition: iec61850_client.h:555
struct sMmsValue MmsValue
Definition: mms_value.h:68
uint16_t Quality
Definition: iec61850_common.h:326
MmsType
Definition: mms_common.h:106
struct sClientReportControlBlock * ClientReportControlBlock
Definition: iec61850_client.h:49
struct sClientGooseControlBlock * ClientGooseControlBlock
Definition: iec61850_client.h:52
struct sClientReport * ClientReport
Definition: iec61850_client.h:46
struct sClientDataSet * ClientDataSet
Definition: iec61850_client.h:43
ACSIClass
Definition: iec61850_common.h:59
ControlModel
Control model (represented by "ctlModel" attribute)
Definition: iec61850_common.h:76
struct sMmsConnection * MmsConnection
Definition: mms_client_connection.h:75
#define DEPRECATED
Definition: sv_publisher.h:423
Definition: iec61850_client.h:65
ControlAddCause addCause
Definition: iec61850_client.h:68
int ctlNum
Definition: iec61850_client.h:66
ControlLastApplError error
Definition: iec61850_client.h:67
Definition: iec61850_common.h:51
Definition: iec61850_common.h:417