12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158 |
- /*
- * iec61850_client.h
- *
- * Copyright 2013-2023 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 IEC61850_CLIENT_H_
- #define IEC61850_CLIENT_H_
- #ifdef __cplusplus
- extern "C" {
- #endif
- #include "libiec61850_common_api.h"
- #include "iec61850_common.h"
- #include "mms_value.h"
- #include "mms_client_connection.h"
- #include "linked_list.h"
- /**
- * * \defgroup iec61850_client_api_group IEC 61850/MMS client API
- */
- /**@{*/
- /** an opaque handle to the instance data of a ClientDataSet object */
- typedef struct sClientDataSet* ClientDataSet;
- /** an opaque handle to the instance data of a ClientReport object */
- typedef struct sClientReport* ClientReport;
- /** an opaque handle to the instance data of a ClientReportControlBlock object */
- typedef struct sClientReportControlBlock* ClientReportControlBlock;
- /** an opaque handle to the instance data of a ClientGooseControlBlock object */
- typedef struct sClientGooseControlBlock* ClientGooseControlBlock;
- /**
- * @defgroup IEC61850_CLIENT_GENERAL General client side connection handling functions and data types
- *
- * @{
- */
- /** An opaque handle to the instance data of the IedConnection object */
- typedef struct sIedConnection* IedConnection;
- /** Detailed description of the last application error of the client connection instance */
- typedef struct
- {
- int ctlNum;
- ControlLastApplError error;
- ControlAddCause addCause;
- } LastApplError;
- /** Connection state of the IedConnection instance - either closed(idle), connecting, connected, or closing) */
- typedef enum
- {
- IED_STATE_CLOSED = 0,
- IED_STATE_CONNECTING,
- IED_STATE_CONNECTED,
- IED_STATE_CLOSING
- } IedConnectionState;
- /** used to describe the error reason for most client side service functions */
- typedef enum {
- /* general errors */
- /** No error occurred - service request has been successful */
- IED_ERROR_OK = 0,
- /** The service request can not be executed because the client is not yet connected */
- IED_ERROR_NOT_CONNECTED = 1,
- /** Connect service not execute because the client is already connected */
- IED_ERROR_ALREADY_CONNECTED = 2,
- /** The service request can not be executed caused by a loss of connection */
- IED_ERROR_CONNECTION_LOST = 3,
- /** The service or some given parameters are not supported by the client stack or by the server */
- IED_ERROR_SERVICE_NOT_SUPPORTED = 4,
- /** Connection rejected by server */
- IED_ERROR_CONNECTION_REJECTED = 5,
- /** Cannot send request because outstanding call limit is reached */
- IED_ERROR_OUTSTANDING_CALL_LIMIT_REACHED = 6,
- /* client side errors */
- /** API function has been called with an invalid argument */
- IED_ERROR_USER_PROVIDED_INVALID_ARGUMENT = 10,
- IED_ERROR_ENABLE_REPORT_FAILED_DATASET_MISMATCH = 11,
- /** The object provided object reference is invalid (there is a syntactical error). */
- IED_ERROR_OBJECT_REFERENCE_INVALID = 12,
- /** Received object is of unexpected type */
- IED_ERROR_UNEXPECTED_VALUE_RECEIVED = 13,
- /* service error - error reported by server */
- /** The communication to the server failed with a timeout */
- IED_ERROR_TIMEOUT = 20,
- /** The server rejected the access to the requested object/service due to access control */
- IED_ERROR_ACCESS_DENIED = 21,
- /** The server reported that the requested object does not exist (returned by server) */
- IED_ERROR_OBJECT_DOES_NOT_EXIST = 22,
- /** The server reported that the requested object already exists */
- IED_ERROR_OBJECT_EXISTS = 23,
- /** The server does not support the requested access method (returned by server) */
- IED_ERROR_OBJECT_ACCESS_UNSUPPORTED = 24,
- /** The server expected an object of another type (returned by server) */
- IED_ERROR_TYPE_INCONSISTENT = 25,
- /** The object or service is temporarily unavailable (returned by server) */
- IED_ERROR_TEMPORARILY_UNAVAILABLE = 26,
- /** The specified object is not defined in the server (returned by server) */
- IED_ERROR_OBJECT_UNDEFINED = 27,
- /** The specified address is invalid (returned by server) */
- IED_ERROR_INVALID_ADDRESS = 28,
- /** Service failed due to a hardware fault (returned by server) */
- IED_ERROR_HARDWARE_FAULT = 29,
- /** The requested data type is not supported by the server (returned by server) */
- IED_ERROR_TYPE_UNSUPPORTED = 30,
- /** The provided attributes are inconsistent (returned by server) */
- IED_ERROR_OBJECT_ATTRIBUTE_INCONSISTENT = 31,
- /** The provided object value is invalid (returned by server) */
- IED_ERROR_OBJECT_VALUE_INVALID = 32,
- /** The object is invalidated (returned by server) */
- IED_ERROR_OBJECT_INVALIDATED = 33,
- /** Received an invalid response message from the server */
- IED_ERROR_MALFORMED_MESSAGE = 34,
- /** Service was not executed because required resource is still in use */
- IED_ERROR_OBJECT_CONSTRAINT_CONFLICT = 35,
- /** Service not implemented */
- IED_ERROR_SERVICE_NOT_IMPLEMENTED = 98,
- /** unknown error */
- IED_ERROR_UNKNOWN = 99
- } IedClientError;
- /**
- * \brief Convert error value to string
- *
- * \return string constant representing the error
- */
- LIB61850_API const char*
- IedClientError_toString(IedClientError err);
- /**************************************************
- * Connection creation and destruction
- **************************************************/
- /**
- * \brief create a new IedConnection instance
- *
- * This function creates a new IedConnection instance that is used to handle a connection to an IED.
- * It allocated all required resources. The new connection is in the "CLOSED" state. Before it can be used
- * the connect method has to be called. The connection will be in non-TLS and thread mode.
- *
- * \return the new IedConnection instance
- */
- LIB61850_API IedConnection
- IedConnection_create(void);
- /**
- * \brief create a new IedConnection instance (extended version)
- *
- * This function creates a new IedConnection instance that is used to handle a connection to an IED.
- * It allocated all required resources. The new connection is in the "CLOSED" state. Before it can be used
- * the \ref IedConnection_connect or \ref IedConnection_connectAsync method has to be called.
- * The connection will use TLS when a TLSConfiguration object is provided. The useThread is false the
- * IedConnection is in non-thread mode and the IedConnection_tick function has to be called periodically to
- * receive messages and perform the house-keeping tasks.
- *
- * \param tlsConfig the TLS configuration to be used, or NULL for non-TLS connection
- * \param useThreads when true, the IedConnection is in thread mode
- *
- * \return the new IedConnection instance
- */
- LIB61850_API IedConnection
- IedConnection_createEx(TLSConfiguration tlsConfig, bool useThreads);
- /**
- * \brief create a new IedConnection instance that has support for TLS
- *
- * This function creates a new IedConnection instance that is used to handle a connection to an IED.
- * It allocated all required resources. The new connection is in the "CLOSED" state. Before it can be used
- * the \ref IedConnection_connect or \ref IedConnection_connectAsync method has to be called.
- * The connection will use TLS when a TLSConfiguration object is provided. The connection will be in thread mode.
- *
- * \deprecated Use \ref IedConnection_createEx instead
- *
- * \param tlsConfig the TLS configuration to be used
- *
- * \return the new IedConnection instance
- */
- LIB61850_API IedConnection
- IedConnection_createWithTlsSupport(TLSConfiguration tlsConfig);
- /**
- * \brief destroy an IedConnection instance.
- *
- * The connection will be closed if it is in "connected" state. All allocated resources of the connection
- * will be freed.
- *
- * \param self the connection object
- */
- LIB61850_API void
- IedConnection_destroy(IedConnection self);
- /**
- * \brief Set the local IP address and port to be used by the client
- *
- * NOTE: This function is optional. When not used the OS decides what IP address and TCP port to use.
- *
- * \param self IedConnection instance
- * \param localIpAddress the local IP address or hostname as C string
- * \param localPort the local TCP port to use. When < 1 the OS will chose the TCP port to use.
- */
- LIB61850_API void
- IedConnection_setLocalAddress(IedConnection self, const char* localIpAddress, int localPort);
- /**
- * \brief set the connect timeout in ms
- *
- * Set the connect timeout for this connection. This function has to be called before IedConnection_connect
- * is called.
- *
- * \param self the connection object
- * \param timoutInMs the connection timeout in ms
- */
- LIB61850_API void
- IedConnection_setConnectTimeout(IedConnection self, uint32_t timeoutInMs);
- /**
- * \brief Set the maximum number outstanding calls allowed for this connection
- *
- * \param self the connection object
- * \param calling the maximum outstanding calls allowed by the caller (client)
- * \param called the maximum outstanding calls allowed by the called endpoint (server)
- */
- LIB61850_API void
- IedConnection_setMaxOutstandingCalls(IedConnection self, int calling, int called);
- /**
- * \brief set the request timeout in ms
- *
- * Set the request timeout for this connection. You can call this function any time to adjust
- * timeout behavior.
- *
- * \param self the connection object
- * \param timoutInMs the connection timeout in ms
- */
- LIB61850_API void
- IedConnection_setRequestTimeout(IedConnection self, uint32_t timeoutInMs);
- /**
- * \brief get the request timeout in ms for this connection
- *
- * \param self the connection object
- *
- * \return request timeout in milliseconds
- */
- LIB61850_API uint32_t
- IedConnection_getRequestTimeout(IedConnection self);
- /**
- * \brief Set the time quality for all timestamps generated by this IedConnection instance
- *
- * \param self the connection object
- * \param leapSecondKnown set/unset leap seconds known flag
- * \param clockFailure set/unset clock failure flag
- * \param clockNotSynchronized set/unset clock not synchronized flag
- * \param subsecondPrecision set the subsecond precision (number of significant bits of the fractionOfSecond part of the time stamp)
- */
- LIB61850_API void
- IedConnection_setTimeQuality(IedConnection self, bool leapSecondKnown, bool clockFailure, bool clockNotSynchronized, int subsecondPrecision);
- /**
- * \brief Perform MMS message handling and house-keeping tasks (for non-thread mode only)
- *
- * This function has to be called periodically by the user application in non-thread mode. The return
- * value helps to decide when the stack has nothing to do and other tasks can be executed.
- *
- * NOTE: When using non-thread mode you should NOT use the synchronous (blocking) API functions. The
- * synchronous functions will block forever when IedConnection_tick is not called in a separate thread.
- *
- * \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.
- */
- LIB61850_API bool
- IedConnection_tick(IedConnection self);
- /**
- * \brief Generic serivce callback handler
- *
- * NOTE: This callback handler is used by several asynchronous service functions that require
- * only a simple feedback in form of a success (IED_ERROR_OK) or failure (other \ref err value).
- *
- * \param invokeId the invoke ID used by the related service request
- * \param parameter user provided parameter
- * \param err the result code. IED_ERROR_OK indicates success.
- */
- typedef void
- (*IedConnection_GenericServiceHandler) (uint32_t invokeId, void* parameter, IedClientError err);
- /**************************************************
- * Association service
- **************************************************/
- /**
- * \brief Connect to a server
- *
- * NOTE: Function will block until connection is up or timeout happened.
- *
- * \param self the connection object
- * \param error the error code if an error occurs
- * \param hostname the host name or IP address of the server to connect to
- * \param tcpPort the TCP port number of the server to connect to
- */
- LIB61850_API void
- IedConnection_connect(IedConnection self, IedClientError* error, const char* hostname, int tcpPort);
- /**
- * \brief Asynchronously connect to a server
- *
- * The function will return immediately. No error doesn't indicate that the
- * connection is established. The current connection state has to be tracked
- * by polling the \ref IedConnection_getState function or by using
- * \ref IedConnection_StateChangedHandler
- *
- * \param self the connection object
- * \param error the error code if an error occurs
- * \param hostname the host name or IP address of the server to connect to
- * \param tcpPort the TCP port number of the server to connect to
- */
- LIB61850_API void
- IedConnection_connectAsync(IedConnection self, IedClientError* error, const char* hostname, int tcpPort);
- /**
- * \brief Abort the connection
- *
- * This will close the MMS association by sending an ACSE abort message to the server.
- * After sending the abort message the connection is closed immediately.
- * The client can assume the connection to be closed when the function returns and the
- * destroy method can be called. If the connection is not in "connected" state an
- * IED_ERROR_NOT_CONNECTED error will be reported.
- *
- * \param self the connection object
- * \param error the error code if an error occurs
- */
- LIB61850_API void
- IedConnection_abort(IedConnection self, IedClientError* error);
- /**
- * \brief Asynchronously abort the connection
- *
- * This will close the MMS association by sending an ACSE abort message to the server.
- * After sending the abort message the connection is closed immediately.
- * If the connection is not in "connected" state an IED_ERROR_NOT_CONNECTED error will be reported.
- *
- * NOTE: This function works asynchronously. The IedConnection object should not be destroyed before the
- * connection state changes to IED_STATE_CLOSED.
- *
- * \param self the connection object
- * \param error the error code if an error occurs
- */
- LIB61850_API void
- IedConnection_abortAsync(IedConnection self, IedClientError* error);
- /**
- * \brief Release the connection
- *
- * This will release the MMS association by sending an MMS conclude message to the server.
- * The client can NOT assume the connection to be closed when the function returns, It can
- * also fail if the server returns with a negative response. To be sure that the connection
- * will be close the close or abort methods should be used. If the connection is not in "connected" state an
- * IED_ERROR_NOT_CONNECTED error will be reported.
- *
- * \param self the connection object
- * \param error the error code if an error occurs
- */
- LIB61850_API void
- IedConnection_release(IedConnection self, IedClientError* error);
- /**
- * \brief Asynchronously release the connection
- *
- * This will release the MMS association by sending an MMS conclude message to the server.
- * The client can NOT assume the connection to be closed when the function returns, It can
- * also fail if the server returns with a negative response. To be sure that the connection
- * will be close the close or abort methods should be used. If the connection is not in "connected" state an
- * IED_ERROR_NOT_CONNECTED error will be reported.
- *
- * \param self the connection object
- * \param error the error code if an error occurs
- */
- LIB61850_API void
- IedConnection_releaseAsync(IedConnection self, IedClientError* error);
- /**
- * \brief Close the connection
- *
- * This will close the MMS association and the underlying TCP connection.
- *
- * \param self the connection object
- */
- LIB61850_API void
- IedConnection_close(IedConnection self);
- /**
- * \brief return the state of the connection.
- *
- * This function can be used to determine if the connection is established or closed.
- *
- * \param self the connection object
- *
- * \return the connection state
- */
- LIB61850_API IedConnectionState
- IedConnection_getState(IedConnection self);
- /**
- * \brief Access to last application error received by the client connection
- *
- * \param self the connection object
- *
- * \return the LastApplError value
- */
- LIB61850_API LastApplError
- IedConnection_getLastApplError(IedConnection self);
- /**
- * \brief Callback handler that is invoked when the connection is closed
- *
- * \deprecated Use \ref IedConnection_StateChangedHandler instead
- *
- * \param user provided parameter
- * \param connection the connection object of the closed connection
- */
- typedef void
- (*IedConnectionClosedHandler) (void* parameter, IedConnection connection);
- /**
- * \brief Install a handler function that is called when the connection is lost/closed.
- *
- * \deprecated Use \ref IedConnection_StateChangedHandler instead
- *
- * \param self the connection object
- * \param handler that callback function
- * \param parameter the user provided parameter that is handed over to the callback function
- */
- LIB61850_API void
- IedConnection_installConnectionClosedHandler(IedConnection self, IedConnectionClosedHandler handler,
- void* parameter);
- /**
- * \brief Callback handler that is invoked whenever the connection state (\ref IedConnectionState) changes
- *
- * \param user provided parameter
- * \param connection the related connection
- * \param newState the new state of the connection
- */
- typedef void
- (*IedConnection_StateChangedHandler) (void* parameter, IedConnection connection, IedConnectionState newState);
- /**
- * \brief Install a handler function that is called when the connection state changes
- *
- * \param self the connection object
- * \param handler that callback function
- * \param parameter the user provided parameter that is handed over to the callback function
- */
- LIB61850_API void
- IedConnection_installStateChangedHandler(IedConnection self, IedConnection_StateChangedHandler handler, void* parameter);
- /**
- * \brief get a handle to the underlying MmsConnection
- *
- * Get access to the underlying MmsConnection instance used by this IedConnection.
- * This can be used to set/change specific MmsConnection parameters or to call low-level MMS services/functions.
- *
- * \param self the connection object
- *
- * \return the MmsConnection instance used by this IedConnection.
- */
- LIB61850_API MmsConnection
- IedConnection_getMmsConnection(IedConnection self);
- /** @} */
- /**
- * @defgroup IEC61850_CLIENT_SV Client side SV control block handling functions
- *
- * @{
- */
- /** SV ASDU contains attribute RefrTm */
- #define IEC61850_SV_OPT_REFRESH_TIME 1
- /** SV ASDU contains attribute SmpSynch */
- #define IEC61850_SV_OPT_SAMPLE_SYNC 2
- /** SV ASDU contains attribute SmpRate */
- #define IEC61850_SV_OPT_SAMPLE_RATE 4
- /** SV ASDU contains attribute DatSet */
- #define IEC61850_SV_OPT_DATA_SET 8
- /** SV ASDU contains attribute Security */
- #define IEC61850_SV_OPT_SECURITY 16
- #define IEC61850_SV_SMPMOD_SAMPLES_PER_PERIOD 0
- #define IEC61850_SV_SMPMOD_SAMPLES_PER_SECOND 1
- #define IEC61850_SV_SMPMOD_SECONDS_PER_SAMPLE 2
- /** an opaque handle to the instance data of a ClientSVControlBlock object */
- typedef struct sClientSVControlBlock* ClientSVControlBlock;
- /**
- * \brief Create a new ClientSVControlBlock instance
- *
- * This function simplifies client side access to server MSV/USV control blocks
- * NOTE: Do not use the functions after the IedConnection object is invalidated!
- *
- * The access functions cause synchronous read/write calls to the server. For asynchronous
- * access use the \ref IedConnection_readObjectAsync and \ref IedConnection_writeObjectAsync
- * functions.
- *
- * \param connection the IedConnection object with a valid connection to the server.
- * \param reference the object reference of the control block
- *
- * \return the new instance
- */
- LIB61850_API ClientSVControlBlock
- ClientSVControlBlock_create(IedConnection connection, const char* reference);
- /**
- * \brief Free all resources related to the ClientSVControlBlock instance.
- *
- * \param self the ClientSVControlBlock instance to operate on
- */
- LIB61850_API void
- ClientSVControlBlock_destroy(ClientSVControlBlock self);
- /**
- * \brief Test if this SVCB is multicast
- *
- * \param self the ClientSVControlBlock instance to operate on
- *
- * \return true if multicast SCVB, false otherwise (unicast)
- */
- LIB61850_API bool
- ClientSVControlBlock_isMulticast(ClientSVControlBlock self);
- /**
- * \brief Return the error code of the last write or write acccess to the SVCB
- *
- * \param self the ClientSVControlBlock instance to operate on
- *
- * \return the error code of the last read or write access
- */
- LIB61850_API IedClientError
- ClientSVControlBlock_getLastComError(ClientSVControlBlock self);
- LIB61850_API bool
- ClientSVControlBlock_setSvEna(ClientSVControlBlock self, bool value);
- LIB61850_API bool
- ClientSVControlBlock_getSvEna(ClientSVControlBlock self);
- LIB61850_API bool
- ClientSVControlBlock_setResv(ClientSVControlBlock self, bool value);
- LIB61850_API bool
- ClientSVControlBlock_getResv(ClientSVControlBlock self);
- LIB61850_API char*
- ClientSVControlBlock_getMsvID(ClientSVControlBlock self);
- /**
- * \brief Get the (MMS) reference to the data set
- *
- * NOTE: the returned string is dynamically allocated with the
- * GLOBAL_MALLOC macro. The application is responsible to release
- * the memory when the string is no longer needed.
- *
- * \param self the ClientSVControlBlock instance to operate on
- *
- * \return the data set reference as a NULL terminated string
- */
- LIB61850_API char*
- ClientSVControlBlock_getDatSet(ClientSVControlBlock self);
- LIB61850_API uint32_t
- ClientSVControlBlock_getConfRev(ClientSVControlBlock self);
- LIB61850_API uint16_t
- ClientSVControlBlock_getSmpRate(ClientSVControlBlock self);
- /**
- * \brief returns the destination address of the SV publisher
- *
- * \param self the ClientSVControlBlock instance to operate on
- */
- LIB61850_API PhyComAddress
- ClientSVControlBlock_getDstAddress(ClientSVControlBlock self);
- /**
- * \brief Gets the OptFlds parameter of the RCB (decides what information to include in a report)
- *
- * \param self the RCB instance
- * \return bit field representing the optional fields of a report (uses flags from \ref REPORT_OPTIONS)
- */
- LIB61850_API int
- ClientSVControlBlock_getOptFlds(ClientSVControlBlock self);
- /**
- * \brief returns number of sample mode of the SV publisher
- *
- * \param self the ClientSVControlBlock instance to operate on
- */
- LIB61850_API uint8_t
- ClientSVControlBlock_getSmpMod(ClientSVControlBlock self);
- /**
- * \brief returns number of ASDUs included in the SV message
- *
- * \param self the ClientSVControlBlock instance to operate on
- *
- * \return the number of ASDU included in a single SV message
- */
- LIB61850_API int
- ClientSVControlBlock_getNoASDU(ClientSVControlBlock self);
- /** @} */
- /**
- * @defgroup IEC61850_CLIENT_GOOSE Client side GOOSE control block handling functions
- *
- * @{
- */
- /*********************************************************
- * GOOSE services handling (MMS part)
- ********************************************************/
- /** Enable GOOSE publisher GoCB block element */
- #define GOCB_ELEMENT_GO_ENA 1
- /** GOOSE ID GoCB block element */
- #define GOCB_ELEMENT_GO_ID 2
- /** Data set GoCB block element */
- #define GOCB_ELEMENT_DATSET 4
- /** Configuration revision GoCB block element (this is usually read-only) */
- #define GOCB_ELEMENT_CONF_REV 8
- /** Need commission GoCB block element (read-only according to 61850-7-2) */
- #define GOCB_ELEMENT_NDS_COMM 16
- /** Destination address GoCB block element (read-only according to 61850-7-2) */
- #define GOCB_ELEMENT_DST_ADDRESS 32
- /** Minimum time GoCB block element (read-only according to 61850-7-2) */
- #define GOCB_ELEMENT_MIN_TIME 64
- /** Maximum time GoCB block element (read-only according to 61850-7-2) */
- #define GOCB_ELEMENT_MAX_TIME 128
- /** Fixed offsets GoCB block element (read-only according to 61850-7-2) */
- #define GOCB_ELEMENT_FIXED_OFFS 256
- /** select all elements of the GoCB */
- #define GOCB_ELEMENT_ALL 511
- /**************************************************
- * ClientGooseControlBlock class
- **************************************************/
- LIB61850_API ClientGooseControlBlock
- ClientGooseControlBlock_create(const char* dataAttributeReference);
- LIB61850_API void
- ClientGooseControlBlock_destroy(ClientGooseControlBlock self);
- LIB61850_API bool
- ClientGooseControlBlock_getGoEna(ClientGooseControlBlock self);
- LIB61850_API void
- ClientGooseControlBlock_setGoEna(ClientGooseControlBlock self, bool goEna);
- LIB61850_API const char*
- ClientGooseControlBlock_getGoID(ClientGooseControlBlock self);
- LIB61850_API void
- ClientGooseControlBlock_setGoID(ClientGooseControlBlock self, const char* goID);
- LIB61850_API const char*
- ClientGooseControlBlock_getDatSet(ClientGooseControlBlock self);
- LIB61850_API void
- ClientGooseControlBlock_setDatSet(ClientGooseControlBlock self, const char* datSet);
- LIB61850_API uint32_t
- ClientGooseControlBlock_getConfRev(ClientGooseControlBlock self);
- LIB61850_API bool
- ClientGooseControlBlock_getNdsComm(ClientGooseControlBlock self);
- LIB61850_API uint32_t
- ClientGooseControlBlock_getMinTime(ClientGooseControlBlock self);
- LIB61850_API uint32_t
- ClientGooseControlBlock_getMaxTime(ClientGooseControlBlock self);
- LIB61850_API bool
- ClientGooseControlBlock_getFixedOffs(ClientGooseControlBlock self);
- LIB61850_API PhyComAddress
- ClientGooseControlBlock_getDstAddress(ClientGooseControlBlock self);
- LIB61850_API void
- ClientGooseControlBlock_setDstAddress(ClientGooseControlBlock self, PhyComAddress value);
- LIB61850_API DEPRECATED MmsValue* /* MMS_OCTET_STRING */
- ClientGooseControlBlock_getDstAddress_addr(ClientGooseControlBlock self);
- LIB61850_API DEPRECATED void
- ClientGooseControlBlock_setDstAddress_addr(ClientGooseControlBlock self, MmsValue* macAddr);
- LIB61850_API DEPRECATED uint8_t
- ClientGooseControlBlock_getDstAddress_priority(ClientGooseControlBlock self);
- LIB61850_API DEPRECATED void
- ClientGooseControlBlock_setDstAddress_priority(ClientGooseControlBlock self, uint8_t priorityValue);
- LIB61850_API DEPRECATED uint16_t
- ClientGooseControlBlock_getDstAddress_vid(ClientGooseControlBlock self);
- LIB61850_API DEPRECATED void
- ClientGooseControlBlock_setDstAddress_vid(ClientGooseControlBlock self, uint16_t vidValue);
- LIB61850_API DEPRECATED uint16_t
- ClientGooseControlBlock_getDstAddress_appid(ClientGooseControlBlock self);
- LIB61850_API DEPRECATED void
- ClientGooseControlBlock_setDstAddress_appid(ClientGooseControlBlock self, uint16_t appidValue);
- /*********************************************************
- * GOOSE services (access to GOOSE Control Blocks (GoCB))
- ********************************************************/
- /**
- * \brief Read access to attributes of a GOOSE control block (GoCB) at the connected server.
- *
- * A GoCB contains the configuration values for a single GOOSE publisher.
- *
- * The requested GoCB has to be specified by its object IEC 61850 ACSI object reference. E.g.
- *
- * "simpleIOGernericIO/LLN0.gcbEvents"
- *
- * This function is used to perform the actual read service for the GoCB values.
- * To access the received values the functions of ClientGooseControlBlock have to be used.
- *
- * If called with a NULL argument for the updateGoCB parameter a new ClientGooseControlBlock instance is created
- * and populated with the values received by the server. It is up to the user to release this object by
- * calling the ClientGooseControlBlock_destroy function when the object is no longer needed. If called with a reference
- * to an existing ClientGooseControlBlock instance the values of the attributes will be updated and no new instance
- * will be created.
- *
- * Note: This function maps to a single MMS read request to retrieve the complete GoCB at once.
- *
- * \param connection the connection object
- * \param error the error code if an error occurs
- * \param goCBReference IEC 61850-7-2 ACSI object reference of the GOOSE control block
- * \param updateRcb a reference to an existing ClientGooseControlBlock instance or NULL
- *
- * \return new ClientGooseControlBlock instance or the instance provided by the user with
- * the updateRcb parameter.
- */
- LIB61850_API ClientGooseControlBlock
- IedConnection_getGoCBValues(IedConnection self, IedClientError* error, const char* goCBReference, ClientGooseControlBlock updateGoCB);
- typedef void
- (*IedConnection_GetGoCBValuesHandler) (uint32_t invokeId, void* parameter, IedClientError err, ClientGooseControlBlock goCB);
- /**
- * \brief Read access to attributes of a GOOSE control block (GoCB) at the connected server (async version)
- *
- * A GoCB contains the configuration values for a single GOOSE publisher.
- *
- * The requested GoCB has to be specified by its object IEC 61850 ACSI object reference. E.g.
- *
- * "simpleIOGernericIO/LLN0.gcbEvents"
- *
- * This function is used to perform the actual read service for the GoCB values.
- * To access the received values the functions of ClientGooseControlBlock have to be used.
- *
- * If called with a NULL argument for the updateGoCB parameter a new ClientGooseControlBlock instance is created
- * and populated with the values received by the server. It is up to the user to release this object by
- * calling the ClientGooseControlBlock_destroy function when the object is no longer needed. If called with a reference
- * to an existing ClientGooseControlBlock instance the values of the attributes will be updated and no new instance
- * will be created.
- *
- * Note: This function maps to a single MMS read request to retrieve the complete GoCB at once.
- *
- * \param connection the connection object
- * \param error the error code if an error occurs
- * \param goCBReference IEC 61850-7-2 ACSI object reference of the GOOSE control block
- * \param updateRcb a reference to an existing ClientGooseControlBlock instance or NULL
- * \param handler the user callback that is called when the service is completed or timed out
- * \param parameter user provided parameter that is passed to the callback handler
- *
- * \return the invoke ID of the request
- */
- LIB61850_API uint32_t
- IedConnection_getGoCBValuesAsync(IedConnection self, IedClientError* error, const char* goCBReference, ClientGooseControlBlock updateGoCB,
- IedConnection_GetGoCBValuesHandler handler, void* parameter);
- /**
- * \brief Write access to attributes of a GOOSE control block (GoCB) at the connected server
- *
- * The GoCB and the values to be written are specified with the goCB parameter.
- *
- * The parametersMask parameter specifies which attributes of the remote GoCB have to be set by this request.
- * You can specify multiple attributes by ORing the defined bit values. If all attributes have to be written
- * GOCB_ELEMENT_ALL can be used.
- *
- * The singleRequest parameter specifies the mapping to the corresponding MMS write request. Standard compliant
- * servers should accept both variants. But some server accept only one variant. Then the value of this parameter
- * will be of relevance.
- *
- * \param connection the connection object
- * \param error the error code if an error occurs
- * \param goCB ClientGooseControlBlock instance that actually holds the parameter
- * values to be written.
- * \param parametersMask specifies the parameters contained in the setGoCBValues request.
- * \param singleRequest specifies if the seGoCBValues services is mapped to a single MMS write request containing
- * multiple variables or to multiple MMS write requests.
- */
- LIB61850_API void
- IedConnection_setGoCBValues(IedConnection self, IedClientError* error, ClientGooseControlBlock goCB,
- uint32_t parametersMask, bool singleRequest);
- /**
- * \brief Write access to attributes of a GOOSE control block (GoCB) at the connected server (async version)
- *
- * The GoCB and the values to be written are specified with the goCB parameter.
- *
- * The parametersMask parameter specifies which attributes of the remote GoCB have to be set by this request.
- * You can specify multiple attributes by ORing the defined bit values. If all attributes have to be written
- * GOCB_ELEMENT_ALL can be used.
- *
- * The singleRequest parameter specifies the mapping to the corresponding MMS write request. Standard compliant
- * servers should accept both variants. But some server accept only one variant. Then the value of this parameter
- * will be of relevance.
- *
- * \param connection the connection object
- * \param error the error code if an error occurs
- * \param goCB ClientGooseControlBlock instance that actually holds the parameter
- * values to be written.
- * \param parametersMask specifies the parameters contained in the setGoCBValues request.
- * \param singleRequest specifies if the seGoCBValues services is mapped to a single MMS write request containing
- * multiple variables or to multiple MMS write requests.
- * \param handler the user callback that is called when the service is completed or timed out
- * \param parameter user provided parameter that is passed to the callback handler
- *
- * \return the invoke ID of the request
- */
- LIB61850_API uint32_t
- IedConnection_setGoCBValuesAsync(IedConnection self, IedClientError* error, ClientGooseControlBlock goCB,
- uint32_t parametersMask, bool singleRequest, IedConnection_GenericServiceHandler handler, void* parameter);
- /** @} */
- /****************************************
- * Data model access services
- ****************************************/
- /**
- * @defgroup IEC61850_CLIENT_DATA_ACCESS Client side data access (read/write) service functions
- *
- * @{
- */
- /**
- * \brief read a functional constrained data attribute (FCDA) or functional constrained data (FCD).
- *
- * \param self the connection object to operate on
- * \param error the error code if an error occurs
- * \param object reference of the object/attribute to read
- * \param fc the functional constraint of the data attribute or data object to read
- *
- * \return the MmsValue instance of the received value or NULL if the request failed
- */
- LIB61850_API MmsValue*
- IedConnection_readObject(IedConnection self, IedClientError* error, const char* dataAttributeReference, FunctionalConstraint fc);
- typedef void
- (*IedConnection_ReadObjectHandler) (uint32_t invokeId, void* parameter, IedClientError err, MmsValue* value);
- /**
- * \brief read a functional constrained data attribute (FCDA) or functional constrained data (FCD) - async version
- *
- * \param self the connection object to operate on
- * \param error the error code if an error occurs
- * \param object reference of the object/attribute to read
- * \param fc the functional constraint of the data attribute or data object to read
- * \param handler the user provided callback handler
- * \param parameter user provided parameter that is passed to the callback handler
- *
- * \return the invoke ID of the request
- */
- LIB61850_API uint32_t
- IedConnection_readObjectAsync(IedConnection self, IedClientError* error, const char* objRef, FunctionalConstraint fc,
- IedConnection_ReadObjectHandler handler, void* parameter);
- /**
- * \brief write a functional constrained data attribute (FCDA) or functional constrained data (FCD).
- *
- * \param self the connection object to operate on
- * \param error the error code if an error occurs
- * \param object reference of the object/attribute to write
- * \param fc the functional constraint of the data attribute or data object to write
- * \param value the MmsValue to write (has to be of the correct type - MMS_STRUCTURE for FCD)
- */
- LIB61850_API void
- IedConnection_writeObject(IedConnection self, IedClientError* error, const char* dataAttributeReference, FunctionalConstraint fc,
- MmsValue* value);
- /**
- * \brief write a functional constrained data attribute (FCDA) or functional constrained data (FCD) - async version
- *
- * \param self the connection object to operate on
- * \param error the error code if an error occurs
- * \param object reference of the object/attribute to write
- * \param fc the functional constraint of the data attribute or data object to write
- * \param value the MmsValue to write (has to be of the correct type - MMS_STRUCTURE for FCD)
- * \param handler the user provided callback handler
- * \param parameter user provided parameter that is passed to the callback handler
- *
- * \return the invoke ID of the request
- */
- LIB61850_API uint32_t
- IedConnection_writeObjectAsync(IedConnection self, IedClientError* error, const char* objectReference,
- FunctionalConstraint fc, MmsValue* value, IedConnection_GenericServiceHandler handler, void* parameter);
- /**
- * \brief read a functional constrained data attribute (FCDA) of type boolean
- *
- * \param self the connection object to operate on
- * \param error the error code if an error occurs
- * \param object reference of the data attribute to read
- * \param fc the functional constraint of the data attribute to read
- */
- LIB61850_API bool
- IedConnection_readBooleanValue(IedConnection self, IedClientError* error, const char* objectReference, FunctionalConstraint fc);
- /**
- * \brief read a functional constrained data attribute (FCDA) of type float
- *
- * \param self the connection object to operate on
- * \param error the error code if an error occurs
- * \param object reference of the data attribute to read
- * \param fc the functional constraint of the data attribute to read
- */
- LIB61850_API float
- IedConnection_readFloatValue(IedConnection self, IedClientError* error, const char* objectReference, FunctionalConstraint fc);
- /**
- * \brief read a functional constrained data attribute (FCDA) of type VisibleString or MmsString
- *
- * NOTE: the returned char buffer is dynamically allocated and has to be freed by the caller!
- *
- * \param self the connection object to operate on
- * \param error the error code if an error occurs
- * \param object reference of the data attribute to read
- * \param fc the functional constraint of the data attribute to read
- *
- * \return a C string representation of the value. Has to be freed by the caller!
- */
- LIB61850_API char*
- IedConnection_readStringValue(IedConnection self, IedClientError* error, const char* objectReference, FunctionalConstraint fc);
- /**
- * \brief read a functional constrained data attribute (FCDA) of type Integer or Unsigned and return the result as int32_t
- *
- * \param self the connection object to operate on
- * \param error the error code if an error occurs
- * \param object reference of the data attribute to read
- * \param fc the functional constraint of the data attribute to read
- *
- * \return an int32_t value of the read data attributes
- */
- LIB61850_API int32_t
- IedConnection_readInt32Value(IedConnection self, IedClientError* error, const char* objectReference, FunctionalConstraint fc);
- /**
- * \brief read a functional constrained data attribute (FCDA) of type Integer or Unsigned and return the result as int64_t
- *
- * \param self the connection object to operate on
- * \param error the error code if an error occurs
- * \param object reference of the data attribute to read
- * \param fc the functional constraint of the data attribute to read
- *
- * \return an int64_t value of the read data attributes
- */
- LIB61850_API int64_t
- IedConnection_readInt64Value(IedConnection self, IedClientError* error, const char* objectReference, FunctionalConstraint fc);
- /**
- * \brief read a functional constrained data attribute (FCDA) of type Integer or Unsigned and return the result as uint32_t
- *
- * \param self the connection object to operate on
- * \param error the error code if an error occurs
- * \param object reference of the data attribute to read
- * \param fc the functional constraint of the data attribute to read
- *
- * \return an uint32_t value of the read data attributes
- */
- LIB61850_API uint32_t
- IedConnection_readUnsigned32Value(IedConnection self, IedClientError* error, const char* objectReference, FunctionalConstraint fc);
- /**
- * \brief read a functional constrained data attribute (FCDA) of type Timestamp (UTC Time)
- *
- * NOTE: If the timestamp parameter is set to NULL the function allocates a new timestamp instance. Otherwise the
- * return value is a pointer to the user provided timestamp instance. The new timestamp instance has to be freed by
- * the caller of the function.
- *
- * \param self the connection object to operate on
- * \param error the error code if an error occurs
- * \param object reference of the data attribute to read
- * \param fc the functional constraint of the data attribute to read
- * \param timestamp a pointer to a user provided timestamp instance or NULL
- *
- * \return the timestamp value
- */
- LIB61850_API Timestamp*
- IedConnection_readTimestampValue(IedConnection self, IedClientError* error, const char* objectReference, FunctionalConstraint fc,
- Timestamp* timeStamp);
- /**
- * \brief read a functional constrained data attribute (FCDA) of type Quality
- *
- * \param self the connection object to operate on
- * \param error the error code if an error occurs
- * \param object reference of the data attribute to read
- * \param fc the functional constraint of the data attribute to read
- *
- * \return the timestamp value
- */
- LIB61850_API Quality
- IedConnection_readQualityValue(IedConnection self, IedClientError* error, const char* objectReference, FunctionalConstraint fc);
- /**
- * \brief write a functional constrained data attribute (FCDA) of type boolean
- *
- * \param self the connection object to operate on
- * \param error the error code if an error occurs
- * \param object reference of the data attribute to read
- * \param fc the functional constraint of the data attribute or data object to write
- * \param value the boolean value to write
- */
- LIB61850_API void
- IedConnection_writeBooleanValue(IedConnection self, IedClientError* error, const char* objectReference,
- FunctionalConstraint fc, bool value);
- /**
- * \brief write a functional constrained data attribute (FCDA) of type integer
- *
- * \param self the connection object to operate on
- * \param error the error code if an error occurs
- * \param object reference of the data attribute to read
- * \param fc the functional constraint of the data attribute or data object to write
- * \param value the int32_t value to write
- */
- LIB61850_API void
- IedConnection_writeInt32Value(IedConnection self, IedClientError* error, const char* objectReference,
- FunctionalConstraint fc, int32_t value);
- /**
- * \brief write a functional constrained data attribute (FCDA) of type unsigned (integer)
- *
- * \param self the connection object to operate on
- * \param error the error code if an error occurs
- * \param object reference of the data attribute to read
- * \param fc the functional constraint of the data attribute or data object to write
- * \param value the uint32_t value to write
- */
- LIB61850_API void
- IedConnection_writeUnsigned32Value(IedConnection self, IedClientError* error, const char* objectReference,
- FunctionalConstraint fc, uint32_t value);
- /**
- * \brief write a functional constrained data attribute (FCDA) of type float
- *
- * \param self the connection object to operate on
- * \param error the error code if an error occurs
- * \param object reference of the data attribute to read
- * \param fc the functional constraint of the data attribute or data object to write
- * \param value the float value to write
- */
- LIB61850_API void
- IedConnection_writeFloatValue(IedConnection self, IedClientError* error, const char* objectReference,
- FunctionalConstraint fc, float value);
- LIB61850_API void
- IedConnection_writeVisibleStringValue(IedConnection self, IedClientError* error, const char* objectReference,
- FunctionalConstraint fc, char* value);
- LIB61850_API void
- IedConnection_writeOctetString(IedConnection self, IedClientError* error, const char* objectReference,
- FunctionalConstraint fc, uint8_t* value, int valueLength);
- /** @} */
- /********************************************
- * Reporting services
- ********************************************/
- /**
- * @defgroup IEC61850_CLIENT_REPORTS Client side report handling services, functions, and data types
- *
- * @{
- */
- /**
- * \brief Read access to attributes of a report control block (RCB) at the connected server
- *
- * The requested RCB has to be specified by its object reference. E.g.
- *
- * "simpleIOGenericIO/LLN0.RP.EventsRCB01"
- *
- * or
- *
- * "simpleIOGenericIO/LLN0.BR.EventsBRCB01"
- *
- * Report control blocks have either "RP" or "BR" as part of their name following the logical node part.
- * "RP" is part of the name of unbuffered RCBs whilst "BR" is part of the name of buffered RCBs.
- *
- * This function is used to perform the actual read service. To access the received values the functions
- * of ClientReportControlBlock have to be used.
- *
- * If called with a NULL argument for the updateRcb parameter a new ClientReportControlBlock instance is created
- * and populated with the values received by the server. It is up to the user to release this object by
- * calling the ClientReportControlBlock_destroy function when the object is no longer needed. If called with a reference
- * to an existing ClientReportControlBlock instance the values of the attributes will be updated and no new instance
- * will be created.
- *
- * Note: This function maps to a single MMS read request to retrieve the complete RCB at once.
- *
- * \param connection the connection object
- * \param error the error code if an error occurs
- * \param rcbReference object reference of the report control block
- * \param updateRcb a reference to an existing ClientReportControlBlock instance or NULL
- *
- * \return new ClientReportControlBlock instance or the instance provided by the user with
- * the updateRcb parameter.
- */
- LIB61850_API ClientReportControlBlock
- IedConnection_getRCBValues(IedConnection self, IedClientError* error, const char* rcbReference,
- ClientReportControlBlock updateRcb);
- typedef void
- (*IedConnection_GetRCBValuesHandler) (uint32_t invokeId, void* parameter, IedClientError err, ClientReportControlBlock rcb);
- LIB61850_API uint32_t
- IedConnection_getRCBValuesAsync(IedConnection self, IedClientError* error, const char* rcbReference, ClientReportControlBlock updateRcb,
- IedConnection_GetRCBValuesHandler handler, void* parameter);
- /** Describes the reason for the inclusion of the element in the report */
- typedef int ReasonForInclusion;
- /** the element is not included in the received report */
- #define IEC61850_REASON_NOT_INCLUDED 0
- /** the element is included due to a change of the data value */
- #define IEC61850_REASON_DATA_CHANGE 1
- /** the element is included due to a change in the quality of data */
- #define IEC61850_REASON_QUALITY_CHANGE 2
- /** the element is included due to an update of the data value */
- #define IEC61850_REASON_DATA_UPDATE 4
- /** the element is included due to a periodic integrity report task */
- #define IEC61850_REASON_INTEGRITY 8
- /** the element is included due to a general interrogation by the client */
- #define IEC61850_REASON_GI 16
- /** the reason for inclusion is unknown (e.g. report is not configured to include reason-for-inclusion) */
- #define IEC61850_REASON_UNKNOWN 32
- /* Element encoding mask values for ClientReportControlBlock */
- /** include the report ID into the setRCB request */
- #define RCB_ELEMENT_RPT_ID 1
- /** include the report enable element into the setRCB request */
- #define RCB_ELEMENT_RPT_ENA 2
- /** include the reservation element into the setRCB request (only available in unbuffered RCBs!) */
- #define RCB_ELEMENT_RESV 4
- /** include the data set element into the setRCB request */
- #define RCB_ELEMENT_DATSET 8
- /** include the configuration revision element into the setRCB request */
- #define RCB_ELEMENT_CONF_REV 16
- /** include the option fields element into the setRCB request */
- #define RCB_ELEMENT_OPT_FLDS 32
- /** include the bufTm (event buffering time) element into the setRCB request */
- #define RCB_ELEMENT_BUF_TM 64
- /** include the sequence number element into the setRCB request (should be used!) */
- #define RCB_ELEMENT_SQ_NUM 128
- /** include the trigger options element into the setRCB request */
- #define RCB_ELEMENT_TRG_OPS 256
- /** include the integrity period element into the setRCB request */
- #define RCB_ELEMENT_INTG_PD 512
- /** include the GI (general interrogation) element into the setRCB request */
- #define RCB_ELEMENT_GI 1024
- /** include the purge buffer element into the setRCB request (only available in buffered RCBs) */
- #define RCB_ELEMENT_PURGE_BUF 2048
- /** include the entry ID element into the setRCB request (only available in buffered RCBs) */
- #define RCB_ELEMENT_ENTRY_ID 4096
- /** include the time of entry element into the setRCB request (only available in buffered RCBs) */
- #define RCB_ELEMENT_TIME_OF_ENTRY 8192
- /** include the reservation time element into the setRCB request (only available in buffered RCBs) */
- #define RCB_ELEMENT_RESV_TMS 16384
- /** include the owner element into the setRCB request */
- #define RCB_ELEMENT_OWNER 32768
- /**
- * \brief Write access to attributes of a report control block (RCB) at the connected server
- *
- * The requested RCB has to be specified by its object reference (see also IedConnection_getRCBValues).
- * The object reference for the referenced RCB is contained in the provided ClientReportControlBlock instance.
- *
- * The parametersMask parameter specifies which attributes of the remote RCB have to be set by this request.
- * You can specify multiple attributes by ORing the defined bit values.
- *
- * The singleRequest parameter specifies the mapping to the corresponding MMS write request. Standard compliant
- * servers should accept both variants. But some server accept only one variant. Then the value of this parameter
- * will be of relevance.
- *
- * \param connection the connection object
- * \param error the error code if an error occurs
- * \param rcb object reference of the ClientReportControlBlock instance that actually holds the parameter
- * values to be written.
- * \param parametersMask specifies the parameters contained in the setRCBValues request.
- * \param singleRequest specifies if the setRCBValues services is mapped to a single MMS write request containing
- * multiple variables or to multiple MMS write requests.
- */
- LIB61850_API void
- IedConnection_setRCBValues(IedConnection self, IedClientError* error, ClientReportControlBlock rcb,
- uint32_t parametersMask, bool singleRequest);
- LIB61850_API uint32_t
- IedConnection_setRCBValuesAsync(IedConnection self, IedClientError* error, ClientReportControlBlock rcb,
- uint32_t parametersMask, bool singleRequest, IedConnection_GenericServiceHandler handler, void* parameter);
- /**
- * \brief Callback function for receiving reports
- *
- * \param parameter a user provided parameter that is handed to the callback function
- * \param report a ClientReport instance that holds the informations contained in the received report
- */
- typedef void (*ReportCallbackFunction) (void* parameter, ClientReport report);
- /**
- * \brief Install a report handler function for the specified report control block (RCB)
- *
- * This function will replace a report handler set earlier for the specified RCB. The report handler
- * will be called whenever a report for the specified RCB is received.
- * Please note that this function should be called whenever the RCB data set is changed or updated.
- * Otherwise the internal data structures storing the received data set values will not be updated
- * correctly.
- *
- * \note Replacing a report handler you only have to call this function. There is no separate call to
- * IedConnection_uninstallReportHandler() required.
- *
- * \note Do not call this function inside of the ReportCallbackFunction. Doing so will cause a deadlock.
- *
- * \param self the connection object
- * \param rcbReference object reference of the report control block
- * \param rptId a string that identifies the report. If the rptId is not available then the
- * rcbReference is used to identify the report.
- * \param handler user provided callback function to be invoked when a report is received.
- * \param handlerParameter user provided parameter that will be passed to the callback function
- */
- LIB61850_API void
- IedConnection_installReportHandler(IedConnection self, const char* rcbReference, const char* rptId, ReportCallbackFunction handler,
- void* handlerParameter);
- /**
- * \brief uninstall a report handler function for the specified report control block (RCB)
- *
- * \note Do not call this function inside of the ReportCallbackFunction. Doing so will cause a deadlock.
- *
- * \param self the connection object
- * \param rcbReference object reference of the report control block
- */
- LIB61850_API void
- IedConnection_uninstallReportHandler(IedConnection self, const char* rcbReference);
- /**
- * \brief trigger a general interrogation (GI) report for the specified report control block (RCB)
- *
- * The RCB must have been enabled and GI set as trigger option before this command can be performed.
- *
- * \deprecated Use ClientReportControlBlock_setGI instead
- *
- * \param connection the connection object
- * \param error the error code if an error occurs
- * \param rcbReference object reference of the report control block
- */
- LIB61850_API void
- IedConnection_triggerGIReport(IedConnection self, IedClientError* error, const char* rcbReference);
- /****************************************
- * Access to received reports
- ****************************************/
- /**
- * \brief get the name of the report data set
- *
- * NOTE: the returned string is only valid as long as the ClientReport instance exists!
- *
- * \param self the ClientReport instance
- * \return report data set name as 0 terminated string
- */
- LIB61850_API const char*
- ClientReport_getDataSetName(ClientReport self);
- /**
- * \brief return the received data set values of the report
- *
- * NOTE: The returned MmsValue instance is handled by the library and only valid as long as the
- * ClientReport instance exists! It should not be used outside the report callback handler to
- * avoid concurrency issues.
- *
- * \param self the ClientReport instance
- * \return an MmsValue array instance containing the data set values
- */
- LIB61850_API MmsValue*
- ClientReport_getDataSetValues(ClientReport self);
- /**
- * \brief return reference (name) of the server RCB associated with this ClientReport object
- *
- * \param self the ClientReport instance
- * \return report control block reference as string
- */
- LIB61850_API char*
- ClientReport_getRcbReference(ClientReport self);
- /**
- * \brief return RptId of the server RCB associated with this ClientReport object
- *
- * \param self the ClientReport instance
- * \return report control block reference as string
- */
- LIB61850_API char*
- ClientReport_getRptId(ClientReport self);
- /**
- * \brief get the reason code (reason for inclusion) for a specific report data set element
- *
- * \param self the ClientReport instance
- * \param elementIndex index of the data set element (starting with 0)
- *
- * \return reason code for the inclusion of the specified element
- */
- LIB61850_API ReasonForInclusion
- ClientReport_getReasonForInclusion(ClientReport self, int elementIndex);
- /**
- * \brief get the entry ID of the report
- *
- * Returns the entryId of the report if included in the report. Otherwise returns NULL.
- *
- * \param self the ClientReport instance
- *
- * \return entryId or NULL
- */
- LIB61850_API MmsValue*
- ClientReport_getEntryId(ClientReport self);
- /**
- * \brief determine if the last received report contains a timestamp
- *
- * \param self the ClientReport instance
- *
- * \return true if the report contains a timestamp, false otherwise
- */
- LIB61850_API bool
- ClientReport_hasTimestamp(ClientReport self);
- /**
- * \brief determine if the last received report contains a sequence number
- *
- * \param self the ClientReport instance
- *
- * \return true if the report contains a sequence number, false otherwise
- */
- LIB61850_API bool
- ClientReport_hasSeqNum(ClientReport self);
- /**
- * \brief get the value of the sequence number
- *
- * NOTE: The returned value is undefined if the sequence number is not present in report
- *
- * \param self the ClientReport instance
- *
- * \returns the number of the sequence number when present
- */
- LIB61850_API uint16_t
- ClientReport_getSeqNum(ClientReport self);
- /**
- * \brief determine if the last received report contains the data set name
- *
- * \param self the ClientReport instance
- *
- * \return true if the report contains the data set name, false otherwise
- */
- LIB61850_API bool
- ClientReport_hasDataSetName(ClientReport self);
- /**
- * \brief determine if the last received report contains reason-for-inclusion information
- *
- * \param self the ClientReport instance
- *
- * \return true if the report contains reason-for-inclusion information, false otherwise
- */
- LIB61850_API bool
- ClientReport_hasReasonForInclusion(ClientReport self);
- /**
- * \brief determine if the last received report contains the configuration revision
- *
- * \param self the ClientReport instance
- *
- * \return true if the report contains the configuration revision, false otherwise
- */
- LIB61850_API bool
- ClientReport_hasConfRev(ClientReport self);
- /**
- * \brief get the value of the configuration revision
- *
- * NOTE: The returned value is undefined if configuration revision is not present in report
- *
- * \param self the ClientReport instance
- *
- * \returns the number of the configuration revision
- */
- LIB61850_API uint32_t
- ClientReport_getConfRev(ClientReport self);
- /**
- * \brief indicates if the report contains the bufOvfl (buffer overflow) flag
- *
- * \param self the ClientReport instance
- *
- * \returns true if the report contains the bufOvfl flag, false otherwise
- */
- LIB61850_API bool
- ClientReport_hasBufOvfl(ClientReport self);
- /**
- * \brief get the value of the bufOvfl flag
- *
- * \param self the ClientReport instance
- *
- * \returns true if bufOvfl is set, false otherwise
- */
- LIB61850_API bool
- ClientReport_getBufOvfl(ClientReport self);
- /**
- * \brief indicates if the report contains data references for the reported data set members
- *
- * \param self the ClientReport instance
- *
- * \returns true if the report contains data-references, false otherwise
- */
- LIB61850_API bool
- ClientReport_hasDataReference(ClientReport self);
- /**
- * \brief get the data-reference of the element of the report data set
- *
- * This function will only return a non-NULL value if the received report contains data-references.
- * This can be determined by the ClientReport_hasDataReference function.
- * NOTE: The returned string is allocated and hold by the ClientReport instance and is only valid until
- * the ClientReport instance exists!
- *
- * \param self the ClientReport instance
- * \param elementIndex index of the data set element (starting with 0)
- *
- * \param the data reference as string as provided by the report or NULL if the data reference is not available
- */
- LIB61850_API const char*
- ClientReport_getDataReference(ClientReport self, int elementIndex);
- /**
- * \brief get the timestamp of the report
- *
- * Returns the timestamp of the report if included in the report. Otherwise the value is undefined.
- * Use the ClientReport_hasTimestamp function first to figure out if the timestamp is valid
- *
- * \param self the ClientReport instance
- *
- * \return the timestamp as milliseconds since 1.1.1970 UTC
- */
- LIB61850_API uint64_t
- ClientReport_getTimestamp(ClientReport self);
- /**
- * \brief indicates if the report contains a sub sequence number and a more segments follow flags (for segmented reporting)
- *
- * \param self the ClientReport instance
- *
- * \returns true if the report contains sub-sequence-number and more-follows-flag, false otherwise
- */
- LIB61850_API bool
- ClientReport_hasSubSeqNum(ClientReport self);
- /**
- * \brief get the sub sequence number of the report (for segmented reporting)
- *
- * Returns the sub sequence number of the report. This is 0 for the first report of a segmented report and
- * will be increased by one for each report segment.
- *
- * \param self the ClientReport instance
- *
- * \return the sub sequence number of the last received report message.
- */
- LIB61850_API uint16_t
- ClientReport_getSubSeqNum(ClientReport self);
- /**
- * \brief get the more segments follow flag of the received report segment (for segmented reporting)
- *
- * Will return true in case this is part of a segmented report and more report segments will follow or false, if
- * the current report is not a segmented report or is the last segment of a segmented report.
- *
- * \param self the ClientReport instance
- *
- * \return true when more segments of the current report will follow, false otherwise
- */
- LIB61850_API bool
- ClientReport_getMoreSeqmentsFollow(ClientReport self);
- /**
- * \brief get the reason for inclusion of as a human readable string
- *
- * \param reasonCode
- *
- * \return the reason for inclusion as static human readable string
- */
- LIB61850_API char*
- ReasonForInclusion_getValueAsString(ReasonForInclusion reasonCode);
- /**************************************************
- * ClientReportControlBlock access class
- **************************************************/
- LIB61850_API ClientReportControlBlock
- ClientReportControlBlock_create(const char* rcbReference);
- LIB61850_API void
- ClientReportControlBlock_destroy(ClientReportControlBlock self);
- LIB61850_API char*
- ClientReportControlBlock_getObjectReference(ClientReportControlBlock self);
- LIB61850_API bool
- ClientReportControlBlock_isBuffered(ClientReportControlBlock self);
- LIB61850_API const char*
- ClientReportControlBlock_getRptId(ClientReportControlBlock self);
- LIB61850_API void
- ClientReportControlBlock_setRptId(ClientReportControlBlock self, const char* rptId);
- LIB61850_API bool
- ClientReportControlBlock_getRptEna(ClientReportControlBlock self);
- LIB61850_API void
- ClientReportControlBlock_setRptEna(ClientReportControlBlock self, bool rptEna);
- LIB61850_API bool
- ClientReportControlBlock_getResv(ClientReportControlBlock self);
- LIB61850_API void
- ClientReportControlBlock_setResv(ClientReportControlBlock self, bool resv);
- LIB61850_API const char*
- ClientReportControlBlock_getDataSetReference(ClientReportControlBlock self);
- /**
- * \brief set the data set to be observed by the RCB
- *
- * The data set reference is a mixture of MMS and IEC 61850 syntax! In general the reference has
- * the form:
- * LDName/LNName$DataSetName
- *
- * e.g. "simpleIOGenericIO/LLN0$Events"
- *
- * It is standard that data sets are defined in LN0 logical nodes. But this is not mandatory.
- *
- * Note: As a result of changing the data set the server will increase the confRev attribute of the RCB.
- *
- * \param self the RCB instance
- * \param dataSetReference the reference of the data set
- */
- LIB61850_API void
- ClientReportControlBlock_setDataSetReference(ClientReportControlBlock self, const char* dataSetReference);
- LIB61850_API uint32_t
- ClientReportControlBlock_getConfRev(ClientReportControlBlock self);
- /**
- * \brief Gets the OptFlds parameter of the RCB (decides what information to include in a report)
- *
- * \param self the RCB instance
- *
- * \return bit field representing the optional fields of a report (uses flags from \ref REPORT_OPTIONS)
- */
- LIB61850_API int
- ClientReportControlBlock_getOptFlds(ClientReportControlBlock self);
- /**
- * \brief Set the OptFlds parameter of the RCB (decides what information to include in a report)
- *
- * \param self the RCB instance
- * \param optFlds bit field representing the optional fields of a report (use flags from \ref REPORT_OPTIONS)
- */
- LIB61850_API void
- ClientReportControlBlock_setOptFlds(ClientReportControlBlock self, int optFlds);
- /**
- * \brief Get the BufTm (buffer time) parameter of the RCB
- *
- * The buffer time is the time to wait after a triggering event before the report is actually sent.
- * It is used to be able to collect events that happen in a short time period and send them in a single report.
- *
- * \param self the RCB instance
- */
- LIB61850_API uint32_t
- ClientReportControlBlock_getBufTm(ClientReportControlBlock self);
- /**
- * \brief Set the BufTm (buffer time) parameter of the RCB
- *
- * The buffer time is the time to wait after a triggering event before the report is actually sent.
- * It is used to be able to collect events that happen in a short time period and send them in a single report.
- *
- * \param self the RCB instance
- * \param bufTm the buffer time in ms
- */
- LIB61850_API void
- ClientReportControlBlock_setBufTm(ClientReportControlBlock self, uint32_t bufTm);
- LIB61850_API uint16_t
- ClientReportControlBlock_getSqNum(ClientReportControlBlock self);
- LIB61850_API int
- ClientReportControlBlock_getTrgOps(ClientReportControlBlock self);
- LIB61850_API void
- ClientReportControlBlock_setTrgOps(ClientReportControlBlock self, int trgOps);
- LIB61850_API uint32_t
- ClientReportControlBlock_getIntgPd(ClientReportControlBlock self);
- LIB61850_API void
- ClientReportControlBlock_setIntgPd(ClientReportControlBlock self, uint32_t intgPd);
- LIB61850_API bool
- ClientReportControlBlock_getGI(ClientReportControlBlock self);
- LIB61850_API void
- ClientReportControlBlock_setGI(ClientReportControlBlock self, bool gi);
- LIB61850_API bool
- ClientReportControlBlock_getPurgeBuf(ClientReportControlBlock self);
- /**
- * \brief Set the "PurgeBuf" attribute value (only BRCB)
- *
- * When set to true the report buffer will be cleared.
- *
- * \param purgeBuf attribute value
- */
- LIB61850_API void
- ClientReportControlBlock_setPurgeBuf(ClientReportControlBlock self, bool purgeBuf);
- /**
- * \brief Check if optional attribute "ResvTms" is present in BRCB
- *
- * \return true when present, false otherwise
- */
- LIB61850_API bool
- ClientReportControlBlock_hasResvTms(ClientReportControlBlock self);
- LIB61850_API int16_t
- ClientReportControlBlock_getResvTms(ClientReportControlBlock self);
- LIB61850_API void
- ClientReportControlBlock_setResvTms(ClientReportControlBlock self, int16_t resvTms);
- LIB61850_API MmsValue* /* <MMS_OCTET_STRING> */
- ClientReportControlBlock_getEntryId(ClientReportControlBlock self);
- LIB61850_API void
- ClientReportControlBlock_setEntryId(ClientReportControlBlock self, MmsValue* entryId);
- LIB61850_API uint64_t
- ClientReportControlBlock_getEntryTime(ClientReportControlBlock self);
- LIB61850_API MmsValue* /* <MMS_OCTET_STRING> */
- ClientReportControlBlock_getOwner(ClientReportControlBlock self);
- /** @} */
- /****************************************
- * Data set handling
- ****************************************/
- /**
- * @defgroup IEC61850_CLIENT_DATA_SET Client side data set service functions and data types
- *
- * @{
- */
- /**
- * \brief get data set values from the server
- *
- * The parameter dataSetReference is the name of the data set to read. It is either in the form LDName/LNodeName.dataSetName
- * for permanent domain or VMD scope data sets or @dataSetName for an association specific data set.
- * If the LDName part of the reference is missing the resulting data set will be of VMD scope.
- * The received data set values are stored in a container object of type ClientDataSet that can be reused in a further
- * read request.
- *
- * \param connection the connection object
- * \param error the error code if an error occurs
- * \param dataSetReference object reference of the data set
- * \param dataSet a data set instance where to store the retrieved values or NULL if a new instance
- * shall be created.
- *
- * \return data set instance with retrieved values of NULL if an error occurred.
- */
- LIB61850_API ClientDataSet
- IedConnection_readDataSetValues(IedConnection self, IedClientError* error, const char* dataSetReference, ClientDataSet dataSet);
- typedef void
- (*IedConnection_ReadDataSetHandler) (uint32_t invokeId, void* parameter, IedClientError err, ClientDataSet dataSet);
- /**
- * \brief get data set values from the server - async version
- *
- * The parameter dataSetReference is the name of the data set to read. It is either in the form LDName/LNodeName.dataSetName
- * for permanent domain or VMD scope data sets or @dataSetName for an association specific data set.
- * If the LDName part of the reference is missing the resulting data set will be of VMD scope.
- * The received data set values are stored in a container object of type ClientDataSet that can be reused in a further
- * service request.
- *
- * \param connection the connection object
- * \param error the error code if an error occurs
- * \param dataSetReference object reference of the data set
- * \param dataSet a data set instance where to store the retrieved values or NULL if a new instance
- * shall be created.
- * \param handler the user provided callback handler
- * \param parameter user provided parameter that is passed to the callback handler
- *
- * \return the invoke ID of the request
- */
- LIB61850_API uint32_t
- IedConnection_readDataSetValuesAsync(IedConnection self, IedClientError* error, const char* dataSetReference, ClientDataSet dataSet,
- IedConnection_ReadDataSetHandler handler, void* parameter);
- /**
- * \brief create a new data set at the connected server device
- *
- * This function creates a new data set at the server. The parameter dataSetReference is the name of the new data set
- * to create. It is either in the form LDName/LNodeName.dataSetName for permanent domain or VMD scope data sets or
- * @dataSetName for an association specific data set. If the LDName part of the reference is missing the resulting
- * data set will be of VMD scope.
- *
- * The dataSetElements parameter contains a linked list containing the object references of FCDs or FCDAs. The format of
- * this object references is LDName/LNodeName.item(arrayIndex)component[FC].
- *
- * \param connection the connection object
- * \param error the error code if an error occurs
- * \param dataSetReference object reference of the data set
- * \param dataSetElements a list of object references defining the members of the new data set
- *
- */
- LIB61850_API void
- IedConnection_createDataSet(IedConnection self, IedClientError* error, const char* dataSetReference, LinkedList /* char* */ dataSetElements);
- /**
- * \brief create a new data set at the connected server device
- *
- * This function creates a new data set at the server. The parameter dataSetReference is the name of the new data set
- * to create. It is either in the form LDName/LNodeName.dataSetName for permanent domain or VMD scope data sets or
- * @dataSetName for an association specific data set. If the LDName part of the reference is missing the resulting
- * data set will be of VMD scope.
- *
- * The dataSetElements parameter contains a linked list containing the object references of FCDs or FCDAs. The format of
- * this object references is LDName/LNodeName.item(arrayIndex)component[FC].
- *
- * \param connection the connection object
- * \param error the error code if an error occurs
- * \param dataSetReference object reference of the data set
- * \param dataSetElements a list of object references defining the members of the new data set
- *
- * \param handler the callback handler that is called when the response is received or timeout
- * \param parameter user provided parameter that is passed to the callback handler
- *
- * \return the invoke ID of the request
- */
- LIB61850_API uint32_t
- IedConnection_createDataSetAsync(IedConnection self, IedClientError* error, const char* dataSetReference, LinkedList /* char* */ dataSetElements,
- IedConnection_GenericServiceHandler handler, void* parameter);
- /**
- * \brief delete a deletable data set at the connected server device
- *
- * This function deletes a data set at the server. The parameter dataSetReference is the name of the data set
- * to delete. It is either in the form LDName/LNodeName.dataSetName or @dataSetName for an association specific data set.
- *
- *
- * \param connection the connection object
- * \param error the error code if an error occurs
- * \param dataSetReference object reference of the data set
- *
- * \return true if data set has been deleted, false otherwise
- */
- LIB61850_API bool
- IedConnection_deleteDataSet(IedConnection self, IedClientError* error, const char* dataSetReference);
- /**
- * \brief delete a deletable data set at the connected server device - asynchronous version
- *
- * This function deletes a data set at the server. The parameter dataSetReference is the name of the data set
- * to delete. It is either in the form LDName/LNodeName.dataSetName or @dataSetName for an association specific data set.
- *
- * The data set was deleted successfully when the callback parameter "error" is IED_ERROR_OK. Otherwise the "error"
- * parameter contains a particular error code.
- *
- * \param connection the connection object
- * \param error the error code if an error occurs
- * \param dataSetReference object reference of the data set
- * \param handler the callback handler that is called when the response is received or timeout
- * \param parameter user provided parameter that is passed to the callback handler
- *
- * \return the invoke ID of the request
- */
- LIB61850_API uint32_t
- IedConnection_deleteDataSetAsync(IedConnection self, IedClientError* error, const char* dataSetReference,
- IedConnection_GenericServiceHandler handler, void* parameter);
- /**
- * \brief read the data set directory
- *
- * The return value contains a linked list containing the object references of FCDs or FCDAs. The format of
- * this object references is LDName/LNodeName.item(arrayIndex)component[FC].
- *
- * \param connection the connection object
- * \param[out] error the error code if an error occurs
- * \param dataSetReference object reference of the data set
- * \param[out] isDeletable this is an output parameter indicating that the requested data set is deletable by clients.
- * If this information is not required a NULL pointer can be used.
- *
- * \return LinkedList containing the data set elements as char* strings.
- */
- LIB61850_API LinkedList /* <char*> */
- IedConnection_getDataSetDirectory(IedConnection self, IedClientError* error, const char* dataSetReference, bool* isDeletable);
- /**
- * \brief GetDataSetDirectory response or timeout callback
- *
- * \param dataSetDirectory a linked list containing the object references of FCDs or FCDAs. The format of
- * this object references is LDName/LNodeName.item(arrayIndex)component[FC].
- * \param isDeletable this is an output parameter indicating that the requested data set is deletable by clients.
- */
- typedef void
- (*IedConnection_GetDataSetDirectoryHandler) (uint32_t invokeId, void* parameter, IedClientError err, LinkedList /* <char*> */ dataSetDirectory, bool isDeletable);
- /**
- * \brief read the data set directory - asynchronous version
- *
- * The result data is a linked list containing the object references of FCDs or FCDAs. The format of
- * this object references is LDName/LNodeName.item(arrayIndex)component[FC].
- *
- * \param connection the connection object
- * \param[out] error the error code if an error occurs
- * \param dataSetReference object reference of the data set
- * \param handler the callback handler that is called when the response is received or timeout
- * \param parameter user provided parameter that is passed to the callback handler
- *
- * \return the invoke ID of the request
- */
- LIB61850_API uint32_t
- IedConnection_getDataSetDirectoryAsync(IedConnection self, IedClientError* error, const char* dataSetReference,
- IedConnection_GetDataSetDirectoryHandler handler, void* parameter);
- /**
- * \brief Write the data set values to the server
- *
- * The parameter dataSetReference is the name of the data set to write. It is either in the form LDName/LNodeName.dataSetName
- * for permanent domain or VMD scope data sets or @dataSetName for an association specific data set.
- * If the LDName part of the reference is missing the resulting data set will be of VMD scope.
- * The values parameter has to be the same number of elements as are members in the data set. The accessResult return parameter
- * contains a value for each data set member.
- *
- * \param connection the connection object
- * \param[out] error the error code if an error occurs
- * \param dataSetReference object reference of the data set
- * \param values the new data set values
- * \param[out] accessResults the access results for each data set member
- */
- LIB61850_API void
- IedConnection_writeDataSetValues(IedConnection self, IedClientError* error, const char* dataSetReference,
- LinkedList/*<MmsValue*>*/ values, /* OUTPUT */LinkedList* /* <MmsValue*> */accessResults);
- /**
- * \brief Callback handler for asynchronous write data set values services (set data set)
- *
- * \param invokeId the invoke ID of the service request
- * \param parameter used provided parameter
- * \param err the error code if an error occurs
- * \param accessResults the list of access results for the data set entries.
- */
- typedef void
- (*IedConnection_WriteDataSetHandler) (uint32_t invokeId, void* parameter, IedClientError err, LinkedList /* <MmsValue*> */accessResults);
- /**
- * \brief Write the data set values to the server - async version
- *
- * The parameter dataSetReference is the name of the data set to write. It is either in the form LDName/LNodeName.dataSetName
- * for permanent domain or VMD scope data sets or @dataSetName for an association specific data set.
- * If the LDName part of the reference is missing the resulting data set will be of VMD scope.
- * The values parameter has to be the same number of elements as are members in the data set.
- *
- * When the service call had been successful the \ref IedConnection_WriteDataSetHandler is called with an error value of
- * IED_ERROR_OK and a list of MmsValue instances of type data access error. These describe the access results of the individual
- * data set entries.
- *
- * \param connection the connection object
- * \param[out] error the error code if an error occurs
- * \param dataSetReference object reference of the data set
- * \param values the new data set values
- * \param handler the user provided callback handler
- * \param parameter user provided parameter that is passed to the callback handler
- *
- * \return the invoke ID of the request
- */
- LIB61850_API uint32_t
- IedConnection_writeDataSetValuesAsync(IedConnection self, IedClientError* error, const char* dataSetReference,
- LinkedList/*<MmsValue*>*/ values, IedConnection_WriteDataSetHandler handler, void* parameter);
- /********************************************************
- * Data set object (local representation of a data set)
- *******************************************************/
- /**
- * \brief destroy an ClientDataSet instance. Has to be called by the application.
- *
- * Note: A ClientDataSet cannot be created directly by the application but only by the IedConnection_readDataSetValues
- * function. Therefore there is no public ClientDataSet_create function.
- *
- * \param self the ClientDataSet instance
- */
- LIB61850_API void
- ClientDataSet_destroy(ClientDataSet self);
- /**
- * \brief get the data set values locally stored in the ClientDataSet instance.
- *
- * This function returns a pointer to the locally stored MmsValue instance of this
- * ClientDataSet instance. The MmsValue instance is of type MMS_ARRAY and contains one
- * array element for each data set member.
- * Note: This call does not invoke any interaction with the associated server. It will
- * only provide access to already stored value. To update the values with the current values
- * of the server the IecConnection_readDataSetValues function has to be called!
- *
- * \param self the ClientDataSet instance
- *
- * \return the locally stored data set values as MmsValue object of type MMS_ARRAY.
- */
- LIB61850_API MmsValue*
- ClientDataSet_getValues(ClientDataSet self);
- /**
- * \brief Get the object reference of the data set.
- *
- * \param self the ClientDataSet instance
- *
- * \return the object reference of the data set.
- */
- LIB61850_API char*
- ClientDataSet_getReference(ClientDataSet self);
- /**
- * \brief get the size of the data set (number of members)
- *
- * \param self the ClientDataSet instance
- *
- * \return the number of member contained in the data set.
- */
- LIB61850_API int
- ClientDataSet_getDataSetSize(ClientDataSet self);
- /** @} */
- /************************************
- * Control service functions
- ************************************/
- /**
- * @defgroup IEC61850_CLIENT_CONTROL Client side control service functions
- *
- * @{
- */
- typedef struct sControlObjectClient* ControlObjectClient;
- /**
- * \brief Create a new client control object
- *
- * A client control object is used to handle all client side functions of a controllable
- * data object. A controllable data object is an instance of a controllable CDC like e.g.
- * SPC, DPC, APC, ...
- *
- * NOTE: This function will synchronously request information about the control object
- * (like ctlModel) from the server. The function will block until these requests return
- * or time-out.
- *
- * \param objectReference the reference of the controllable data object
- * \param connection the connection instance where the control object has to be reached
- *
- * \return the newly created instance or NULL if the creation failed
- */
- LIB61850_API ControlObjectClient
- ControlObjectClient_create(const char* objectReference, IedConnection connection);
- /**
- * \brief Create a new client control object - doesn't send requests to the server (doesn't block)
- *
- * A client control object is used to handle all client side functions of a controllable
- * data object. A controllable data object is an instance of a controllable CDC like e.g.
- * SPC, DPC, APC, ...
- *
- * \param objectReference the reference of the controllable data object
- * \param connection the connection instance where the control object has to be reached
- * \param ctlModel the control model used by the controllable data object
- * \param controlObjectSpec specification of the controllable data objects - used to derive required information to handle the control object
- */
- LIB61850_API ControlObjectClient
- ControlObjectClient_createEx(const char* objectReference, IedConnection connection, ControlModel ctlModel, MmsVariableSpecification* controlObjectSpec);
- /**
- * \brief Destroy the client control object instance and release all related resources
- *
- * \param self the control object instance to use
- */
- LIB61850_API void
- ControlObjectClient_destroy(ControlObjectClient self);
- /**
- * Cause of the \ref ControlObjectClient_ControlActionHandler invocation
- */
- typedef enum
- {
- CONTROL_ACTION_TYPE_SELECT = 0, /** < callback was invoked because of a select command */
- CONTROL_ACTION_TYPE_OPERATE = 1, /** < callback was invoked because of an operate command */
- CONTROL_ACTION_TYPE_CANCEL = 2 /** < callback was invoked because of a cancel command */
- } ControlActionType;
- /**
- * \brief A callback handler that is invoked when a command termination message is received.
- *
- * This callback is invoked whenever a CommandTermination+ or CommandTermination- message is received.
- * To distinguish between a CommandTermination+ and CommandTermination- please use the
- * ControlObjectClient_getLastApplError function.
- *
- * NOTE: Do not call \ref ControlObjectClient_destroy inside of this callback! Doing so will cause a dead-lock.
- *
- * \param invokeId invoke ID of the command sent by the client
- * \param parameter the user parameter that is passed to the callback function
- * \param err the error code when an error occurred, or IED_ERROR_OK
- * \param type control action type that caused the callback
- * \param success true, when the command was successful, false otherwise
- *
- */
- typedef void
- (*ControlObjectClient_ControlActionHandler) (uint32_t invokeId, void* parameter, IedClientError err, ControlActionType type, bool success);
- /**
- * \brief Get the object reference of the control data object
- *
- * \param self the control object instance to use
- *
- * \return the object reference (string is valid only as long as the \ref ControlObjectClient instance exists).
- */
- LIB61850_API const char*
- ControlObjectClient_getObjectReference(ControlObjectClient self);
- /**
- * \brief Get the current control model (local representation) applied to the control object
- *
- * \param self the control object instance to use
- *
- * \return the current applied control model (\ref ControlModel)
- */
- LIB61850_API ControlModel
- ControlObjectClient_getControlModel(ControlObjectClient self);
- /**
- * \brief Set the applied control model
- *
- * NOTE: This function call will not change the server control model.
- *
- * \param self the control object instance to use
- * \param ctlModel the new control model to apply
- */
- LIB61850_API void
- ControlObjectClient_setControlModel(ControlObjectClient self, ControlModel ctlModel);
- /**
- * \brief Change the control model of the server.
- *
- * NOTE: Not supported by all servers. Information can be found in the PIXIT of the server.
- * Also sets the applied control model for this client control instance.
- *
- * \param self the control object instance to use
- * \param ctlModel the new control model
- */
- LIB61850_API void
- ControlObjectClient_changeServerControlModel(ControlObjectClient self, ControlModel ctlModel);
- /**
- * \brief Get the type of ctlVal.
- *
- * This type is required for the ctlVal parameter of the \ref ControlObjectClient_operate
- * and \ref ControlObjectClient_selectWithValue functions.
- *
- * \param self the control object instance to use
- *
- * \return MmsType required for the ctlVal value.
- */
- LIB61850_API MmsType
- ControlObjectClient_getCtlValType(ControlObjectClient self);
- /**
- * \brief Get the error code of the last synchronous control action (operate, select, select-with-value, cancel)
- *
- * \param self the control object instance to use
- *
- * \return the client error code
- */
- LIB61850_API IedClientError
- ControlObjectClient_getLastError(ControlObjectClient self);
- /**
- * \brief Send an operate command to the server
- *
- * \param self the control object instance to use
- * \param ctlVal the control value (for APC the value may be either AnalogueValue (MMS_STRUCT) or MMS_FLOAT/MMS_INTEGER
- * \param operTime the time when the command has to be executed (for time activated control). The value represents the local time of the
- * server in milliseconds since epoch. If this value is 0 the command will be executed instantly.
- *
- * \return true if operation has been successful, false otherwise.
- */
- LIB61850_API bool
- ControlObjectClient_operate(ControlObjectClient self, MmsValue* ctlVal, uint64_t operTime);
- /**
- * \brief Send a select command to the server
- *
- * The select command is only used for the control model "select-before-operate with normal security"
- * (CONTROL_MODEL_SBO_NORMAL). The select command has to be sent before the operate command can be used.
- *
- * \param self the control object instance to use
- *
- * \return true if operation has been successful, false otherwise.
- */
- LIB61850_API bool
- ControlObjectClient_select(ControlObjectClient self);
- /**
- * \brief Send an select with value command to the server
- *
- * The select-with-value command is only used for the control model "select-before-operate with enhanced security"
- * (CONTROL_MODEL_SBO_ENHANCED). The select-with-value command has to be sent before the operate command can be used.
- *
- * \param self the control object instance to use
- * \param ctlVal the control value (for APC the value may be either AnalogueValue (MMS_STRUCT) or MMS_FLOAT/MMS_INTEGER
- *
- * \return true if select has been successful, false otherwise.
- */
- LIB61850_API bool
- ControlObjectClient_selectWithValue(ControlObjectClient self, MmsValue* ctlVal);
- /**
- * \brief Send a cancel command to the server
- *
- * The cancel command can be used to stop an ongoing operation (when the server and application
- * support this) and to cancel a former select command.
- *
- * \param self the control object instance to use
- *
- * \return true if operation has been successful, false otherwise.
- */
- LIB61850_API bool
- ControlObjectClient_cancel(ControlObjectClient self);
- /**
- * \brief Send an operate command to the server - async version
- *
- * \param self the control object instance to use
- * \param[out] err error code
- * \param ctlVal the control value (for APC the value may be either AnalogueValue (MMS_STRUCT) or MMS_FLOAT/MMS_INTEGER
- * \param operTime the time when the command has to be executed (for time activated control). The value represents the local time of the
- * server in milliseconds since epoch. If this value is 0 the command will be executed instantly.
- * \param handler the user provided callback handler
- * \param parameter user provided parameter that is passed to the callback handler
- *
- * \return the invoke ID of the request
- */
- LIB61850_API uint32_t
- ControlObjectClient_operateAsync(ControlObjectClient self, IedClientError* err, MmsValue* ctlVal, uint64_t operTime,
- ControlObjectClient_ControlActionHandler handler, void* parameter);
- /**
- * \brief Send a select command to the server - async version
- *
- * The select command is only used for the control model "select-before-operate with normal security"
- * (CONTROL_MODEL_SBO_NORMAL). The select command has to be sent before the operate command can be used.
- *
- * \param self the control object instance to use
- * \param[out] err error code
- * \param handler the user provided callback handler
- * \param parameter user provided parameter that is passed to the callback handler
- *
- * \return the invoke ID of the request
- */
- LIB61850_API uint32_t
- ControlObjectClient_selectAsync(ControlObjectClient self, IedClientError* err, ControlObjectClient_ControlActionHandler handler, void* parameter);
- /**
- * \brief Send a select-with-value command to the server - async version
- *
- * The select-with-value command is only used for the control model "select-before-operate with enhanced security"
- * (CONTROL_MODEL_SBO_ENHANCED). The select-with-value command has to be sent before the operate command can be used.
- *
- * \param self the control object instance to use
- * \param[out] err error code
- * \param ctlVal the control value (for APC the value may be either AnalogueValue (MMS_STRUCT) or MMS_FLOAT/MMS_INTEGER
- * \param handler the user provided callback handler
- * \param parameter user provided parameter that is passed to the callback handler
- *
- * \return the invoke ID of the request
- */
- LIB61850_API uint32_t
- ControlObjectClient_selectWithValueAsync(ControlObjectClient self, IedClientError* err, MmsValue* ctlVal,
- ControlObjectClient_ControlActionHandler handler, void* parameter);
- /**
- * \brief Send a cancel command to the server - async version
- *
- * The cancel command can be used to stop an ongoing operation (when the server and application
- * support this) and to cancel a former select command.
- *
- * \param self the control object instance to use
- * \param[out] err error code
- * \param handler the user provided callback handler
- * \param parameter user provided parameter that is passed to the callback handler
- *
- * \return the invoke ID of the request
- */
- LIB61850_API uint32_t
- ControlObjectClient_cancelAsync(ControlObjectClient self, IedClientError* err, ControlObjectClient_ControlActionHandler handler, void* parameter);
- /**
- * \brief Get the last received control application error
- *
- * NOTE: this is the content of the "LastApplError" message received from the server.
- *
- * \return the value of the last received application error
- */
- LIB61850_API LastApplError
- ControlObjectClient_getLastApplError(ControlObjectClient self);
- /**
- * \brief Send commands in test mode.
- *
- * When the server supports test mode the commands that are sent with the test flag set
- * are not executed (will have no effect on the attached physical process).
- *
- * \param self the control object instance to use
- * \param value value if the test flag (true = test mode).
- */
- LIB61850_API void
- ControlObjectClient_setTestMode(ControlObjectClient self, bool value);
- /**
- * \brief Set the origin parameter for control commands
- *
- * The origin parameter is used to identify the client/application that sent a control
- * command. It is intended for later analysis.
- *
- * \param self the ControlObjectClient instance
- * \param orIdent originator identification can be an arbitrary string
- * \param orCat originator category (see \ref ORIGINATOR_CATEGORIES)
- */
- LIB61850_API void
- ControlObjectClient_setOrigin(ControlObjectClient self, const char* orIdent, int orCat);
- /**
- * \brief Use a constant T parameter for all command (select, operate, cancel) of a single control sequence
- *
- * NOTE: Some non-standard compliant servers may require this to accept oper/cancel requests
- *
- * \param self the ControlObjectClient instance
- * \param useContantT enable this behavior with true, disable with false
- */
- LIB61850_API void
- ControlObjectClient_useConstantT(ControlObjectClient self, bool useConstantT);
- /**
- * \deprecated use ControlObjectClient_setInterlockCheck instead
- */
- LIB61850_API DEPRECATED void
- ControlObjectClient_enableInterlockCheck(ControlObjectClient self);
- /**
- * \deprecated use ControlObjectClient_setSynchroCheck instead
- */
- LIB61850_API DEPRECATED void
- ControlObjectClient_enableSynchroCheck(ControlObjectClient self);
- /**
- * \deprecated Do not use (ctlNum is handled automatically by the library)! Intended for test purposes only.
- */
- LIB61850_API DEPRECATED void
- ControlObjectClient_setCtlNum(ControlObjectClient self, uint8_t ctlNum);
- /**
- * \brief Set the value of the interlock check flag when a control command is sent
- *
- * \param self the ControlObjectClient instance
- * \param value if true the server will perform a interlock check if supported
- */
- LIB61850_API void
- ControlObjectClient_setInterlockCheck(ControlObjectClient self, bool value);
- /**
- * \brief Set the value of the synchro check flag when a control command is sent
- *
- * \param self the ControlObjectClient instance
- * \param value if true the server will perform a synchro check if supported
- */
- LIB61850_API void
- ControlObjectClient_setSynchroCheck(ControlObjectClient self, bool value);
- /**
- * \brief A callback handler that is invoked when a command termination message is received.
- *
- * This callback is invoked whenever a CommandTermination+ or CommandTermination- message is received.
- * To distinguish between a CommandTermination+ and CommandTermination- please use the
- * \ref ControlObjectClient_getLastApplError function.
- *
- * In case of CommandTermination+ the return value
- * of \ref ControlObjectClient_getLastApplError has error=CONTROL_ERROR_NO_ERROR and
- * addCause=ADD_CAUSE_UNKNOWN set. When addCause is different from ADD_CAUSE_UNKNOWN then the client
- * received a CommandTermination- message.
- *
- * NOTE: Do not call \ref ControlObjectClient_destroy inside of this callback! Doing so will cause a dead-lock.
- *
- * \param parameter the user parameter that is passed to the callback function
- * \param controlClient the ControlObjectClient instance
- */
- typedef void (*CommandTerminationHandler) (void* parameter, ControlObjectClient controlClient);
- /**
- * \brief Set the command termination callback handler for this control object
- *
- * This callback is invoked whenever a CommandTermination+ or CommandTermination- message is received.
- * To distinguish between a CommandTermination+ and CommandTermination- please use the
- * \ref ControlObjectClient_getLastApplError function. In case of CommandTermination+ the return value
- * of \ref ControlObjectClient_getLastApplError has error=CONTROL_ERROR_NO_ERROR and
- * addCause=ADD_CAUSE_UNKNOWN set. When addCause is different from ADD_CAUSE_UNKNOWN then the client
- * received a CommandTermination- message.
- *
- * \param self the ControlObjectClient instance
- * \param handler the callback function to be used
- * \param handlerParameter a user parameter that is passed to the handler
- */
- LIB61850_API void
- ControlObjectClient_setCommandTerminationHandler(ControlObjectClient self, CommandTerminationHandler handler,
- void* handlerParameter);
- /** @} */
- /*************************************
- * Model discovery services
- ************************************/
- /**
- * @defgroup IEC61850_CLIENT_MODEL_DISCOVERY Model discovery services
- *
- * @{
- */
- /**
- * \brief Retrieve the device model from the server
- *
- * This function retrieves the complete device model from the server. The model is buffered an can be browsed
- * by subsequent API calls. This API call is mapped to multiple ACSI services.
- *
- * \param self the connection object
- * \param error the error code if an error occurs
- *
- */
- LIB61850_API void
- IedConnection_getDeviceModelFromServer(IedConnection self, IedClientError* error);
- /**
- * \brief Get the list of logical devices available at the server (DEPRECATED)
- *
- * This function is mapped to the GetServerDirectory(LD) ACSI service.
- *
- * NOTE: This function will call \ref IedConnection_getDeviceModelFromServer if no buffered data model
- * information is available. Otherwise it will use the buffered information.
- *
- * \param self the connection object
- * \param error the error code if an error occurs
- *
- * \return LinkedList with string elements representing the logical device names
- */
- LIB61850_API LinkedList /*<char*>*/
- IedConnection_getLogicalDeviceList(IedConnection self, IedClientError* error);
- /**
- * \brief Get the list of logical devices or files available at the server
- *
- * GetServerDirectory ACSI service implementation. This function will either return the list of
- * logical devices (LD) present at the server or the list of available files.
- *
- * NOTE: When getFIleNames is false zhis function will call
- * \ref IedConnection_getDeviceModelFromServer if no buffered data model
- * information is available. Otherwise it will use the buffered information.
- *
- * \param self the connection object
- * \param error the error code if an error occurs
- * \param getFileNames get list of files instead of logical device names (TO BE IMPLEMENTED)
- *
- * \return LinkedList with string elements representing the logical device names or file names
- */
- LIB61850_API LinkedList /*<char*>*/
- IedConnection_getServerDirectory(IedConnection self, IedClientError* error, bool getFileNames);
- /**
- * \brief Get the list of logical nodes (LN) of a logical device
- *
- * GetLogicalDeviceDirectory ACSI service implementation. Returns the list of logical nodes names present
- * in a logical device. The list is returned as a linked list of type LinkedList with c style string elements.
- *
- * NOTE: This function will call \ref IedConnection_getDeviceModelFromServer if no buffered data model
- * information is available. Otherwise it will use the buffered information.
- *
- * \param self the connection object
- * \param error the error code if an error occurs
- * \param logicalDeviceName the name of the logical device (LD) of interest
- *
- * \return LinkedList with string elements representing the logical node names
- */
- LIB61850_API LinkedList /*<char*>*/
- IedConnection_getLogicalDeviceDirectory(IedConnection self, IedClientError* error, const char* logicalDeviceName);
- /**
- * \brief returns a list of all MMS variables that are children of the given logical node
- *
- * This function cannot be mapped to any ACSI service. It is a convenience function for generic clients that
- * wants to show a list of all available children of the MMS named variable representing the logical node.
- *
- * NOTE: This function will call \ref IedConnection_getDeviceModelFromServer if no buffered data model
- * information is available. Otherwise it will use the buffered information.
- *
- * \param self the connection object
- * \param error the error code if an error occurs
- * \param logicalNodeReference string that represents the LN reference
- *
- * \return the list of all MMS named variables as C strings in a LinkedList type
- */
- LIB61850_API LinkedList /*<char*>*/
- IedConnection_getLogicalNodeVariables(IedConnection self, IedClientError* error,
- const char* logicalNodeReference);
- /**
- * \brief returns the directory of the given logical node (LN) containing elements of the specified ACSI class
- *
- * Implementation of the GetLogicalNodeDirectory ACSI service. In contrast to the ACSI description this
- * function does not always creates a request to the server. For most ACSI classes it simply accesses the
- * data model that was retrieved before or calls \ref IedConnection_getDeviceModelFromServer if no buffered data model
- * information is available. An exception to this rule are the ACSI classes ACSI_CLASS_DATASET and
- * ACSI_CLASS_LOG. Both always perform a request to the server.
- *
- * \param self the connection object
- * \param error the error code if an error occurs
- * \param logicalNodeReference string that represents the LN reference
- * \param acsiClass specifies the ACSI class
- *
- * \return list of all logical node elements of the specified ACSI class type as C strings in a LinkedList
- */
- LIB61850_API LinkedList /*<char*>*/
- IedConnection_getLogicalNodeDirectory(IedConnection self, IedClientError* error,
- const char* logicalNodeReference, ACSIClass acsiClass);
- /**
- * \brief returns the directory of the given data object (DO)
- *
- * Implementation of the GetDataDirectory ACSI service. This will return the list of
- * all data attributes or sub data objects.
- *
- * NOTE: This function will call \ref IedConnection_getDeviceModelFromServer if no buffered data model
- * information is available. Otherwise it will use the buffered information.
- *
- * \param self the connection object
- * \param error the error code if an error occurs
- * \param dataReference string that represents the DO reference
- *
- * \return list of all data attributes or sub data objects as C strings in a LinkedList
- */
- LIB61850_API LinkedList /*<char*>*/
- IedConnection_getDataDirectory(IedConnection self, IedClientError* error, const char* dataReference);
- /**
- * \brief returns the directory of the given data object (DO)
- *
- * Implementation of the GetDataDirectory ACSI service. This will return the list of
- * C strings with all data attributes or sub data objects as elements. The returned
- * strings will contain the functional constraint appended in square brackets when appropriate.
- *
- * NOTE: This function will call \ref IedConnection_getDeviceModelFromServer if no buffered data model
- * information is available. Otherwise it will use the buffered information.
- *
- * \param self the connection object
- * \param error the error code if an error occurs
- * \param dataReference string that represents the DO reference
- *
- * \return list of all data attributes or sub data objects as C strings in a LinkedList
- */
- LIB61850_API LinkedList /*<char*>*/
- IedConnection_getDataDirectoryFC(IedConnection self, IedClientError* error, const char* dataReference);
- /**
- * \brief returns the directory of the given data object/data attribute with the given FC
- *
- * Implementation of the GetDataDirectory ACSI service. This will return the list of
- * C strings with all data attributes or sub data objects as elements.
- *
- * NOTE: This function will call \ref IedConnection_getDeviceModelFromServer if no buffered data model
- * information is available. Otherwise it will use the buffered information.
- *
- * WARNING: Starting with version 1.0.3 the functional constraint will no longer be appended to
- * the name string.
- *
- * \param self the connection object
- * \param error the error code if an error occurs
- * \param dataReference string that represents the DO reference
- * \param fc the functional constraint
- *
- * \return list of all data attributes or sub data objects as C strings in a LinkedList
- */
- LIB61850_API LinkedList
- IedConnection_getDataDirectoryByFC(IedConnection self, IedClientError* error, const char* dataReference, FunctionalConstraint fc);
- /**
- * \brief return the MMS variable type specification of the data attribute referenced by dataAttributeReference and function constraint fc.
- *
- * This function can be used to get the MMS variable type specification for an IEC 61850 data attribute. It is an extension
- * of the ACSI that may be required by generic client applications.
- *
- * NOTE: API user is responsible to free the resources (see \ref MmsVariableSpecification_destroy)
- *
- * \param self the connection object
- * \param error the error code if an error occurs
- * \param dataAttributeReference string that represents the DA reference
- * \param fc functional constraint of the DA
- *
- * \return MmsVariableSpecification of the data attribute.
- */
- LIB61850_API MmsVariableSpecification*
- IedConnection_getVariableSpecification(IedConnection self, IedClientError* error, const char* dataAttributeReference,
- FunctionalConstraint fc);
- /**
- * \brief Get all variables of the logical device
- *
- * NOTE: This function will return all MMS variables of the logical device (MMS domain). The result will be in the
- * MMS notation (like "GGIO1$ST$Ind1$stVal") and also contain the variables of control blocks.
- *
- * \param[in] self the connection object
- * \param[out] error the error code if an error occurs
- * \param[in] ldName the logical device name
- *
- * \return a \ref LinkedList with the MMS variable names as string. Has to be released by the caller
- */
- LIB61850_API LinkedList
- IedConnection_getLogicalDeviceVariables(IedConnection self, IedClientError* error, const char* ldName);
- /**
- * \brief Get the data set names of the logical device
- *
- * NOTE: This function will return all data set names (MMS named variable lists) of the logical device (MMS domain). The result will be in the
- * MMS notation (like "LLN0$dataset1").
- *
- * \param[in] self the connection object
- * \param[out] error the error code if an error occurs
- * \param[in] ldName the logical device name
- *
- * \return a \ref LinkedList with data set names as string. Has to be released by the caller.
- */
- LIB61850_API LinkedList
- IedConnection_getLogicalDeviceDataSets(IedConnection self, IedClientError* error, const char* ldName);
- /*****************************************
- * Asynchronous model discovery functions
- *****************************************/
- typedef void
- (*IedConnection_GetNameListHandler) (uint32_t invokeId, void* parameter, IedClientError err, LinkedList nameList, bool moreFollows);
- /**
- * \brief Get the server directory (logical devices name) - asynchronous version
- *
- * \param[in] self the connection object
- * \param[out] error the error code if an error occurs
- * \param[in] continueAfter the name of the last received element when the call is a continuation, or NULL for the first call
- * \param[in] result list to store (append) the response names, or NULL to create a new list for the response names
- * \param[in] handler will be called when response is received or timed out.
- * \param[in] parameter
- *
- * \return the invoke ID of the request
- */
- LIB61850_API uint32_t
- IedConnection_getServerDirectoryAsync(IedConnection self, IedClientError* error, const char* continueAfter, LinkedList result,
- IedConnection_GetNameListHandler handler, void* parameter);
- /**
- * \brief Get the variables in the logical device - asynchronous version
- *
- * NOTE: This function will return all MMS variables of the logical device (MMS domain). The result will be in the
- * MMS notation (like "GGIO1$ST$Ind1$stVal") and also contain the variables of control blocks.
- *
- * \param[in] self the connection object
- * \param[out] error the error code if an error occurs
- * \param[in] ldName the logical device name
- * \param[in] continueAfter the name of the last received element when the call is a continuation, or NULL for the first call
- * \param[in] result list to store (append) the response names, or NULL to create a new list for the response names
- * \param[in] handler will be called when response is received or timed out.
- * \param[in] parameter
- *
- * \return the invoke ID of the request
- */
- LIB61850_API uint32_t
- IedConnection_getLogicalDeviceVariablesAsync(IedConnection self, IedClientError* error, const char* ldName, const char* continueAfter, LinkedList result,
- IedConnection_GetNameListHandler handler, void* parameter);
- /**
- * \brief Get the data set names in the logical device - asynchronous version
- *
- * NOTE: This function will return all data set names (MMS named variable lists) of the logical device (MMS domain). The result will be in the
- * MMS notation (like "LLN0$dataset1").
- *
- * \param[in] self the connection object
- * \param[out] error the error code if an error occurs
- * \param[in] ldName the logical device name
- * \param[in] continueAfter the name of the last received element when the call is a continuation, or NULL for the first call
- * \param[in] result list to store (append) the response names, or NULL to create a new list for the response names
- * \param[in] handler will be called when response is received or timed out.
- * \param[in] parameter
- *
- * \return the invoke ID of the request
- */
- LIB61850_API uint32_t
- IedConnection_getLogicalDeviceDataSetsAsync(IedConnection self, IedClientError* error, const char* ldName, const char* continueAfter, LinkedList result,
- IedConnection_GetNameListHandler handler, void* parameter);
- typedef void
- (*IedConnection_GetVariableSpecificationHandler) (uint32_t invokeId, void* parameter, IedClientError err, MmsVariableSpecification* spec);
- /**
- * \brief Get the specification of a variable (data attribute or functional constraint data object) - asynchronous version
- *
- * \param[in] self the connection object
- * \param[out] error the error code if an error occurs
- * \param[in] dataAttributeReference the data attribute reference (FCDA or FCDO)
- * \param[in] handler will be called when response is received or timed out.
- * \param[in] parameter
- *
- * \return the invoke ID of the request
- */
- LIB61850_API uint32_t
- IedConnection_getVariableSpecificationAsync(IedConnection self, IedClientError* error, const char* dataAttributeReference,
- FunctionalConstraint fc, IedConnection_GetVariableSpecificationHandler handler, void* parameter);
- /** @} */
- /**
- * @defgroup IEC61850_CLIENT_LOG_SERVICE Log service related functions, data types, and definitions
- *
- * @{
- */
- /**
- * \brief Implementation of the QueryLogByTime ACSI service
- *
- * Read log entries from a log at the server. The log entries to read are specified by
- * a starting time and an end time. If the complete range does not fit in a single MMS message
- * the moreFollows flag will be set to true, to indicate that more entries are available for the
- * specified time range.
- *
- * \param self the connection object
- * \param error the error code if an error occurs
- * \param logReference log object reference in the form <LD name>/<LN name>$<log name>
- * \param startTime as millisecond UTC timestamp
- * \param endTime as millisecond UTC timestamp
- * \param moreFollows (output value) indicates that more entries are available that match the specification.
- *
- * \return list of MmsJournalEntry objects matching the specification
- */
- LIB61850_API LinkedList /* <MmsJournalEntry> */
- IedConnection_queryLogByTime(IedConnection self, IedClientError* error, const char* logReference,
- uint64_t startTime, uint64_t endTime, bool* moreFollows);
- /**
- * \brief Implementation of the QueryLogAfter ACSI service
- *
- * Read log entries from a log at the server following the entry with the specified entryID and timestamp.
- * If the complete range does not fit in a single MMS message
- * the moreFollows flag will be set to true, to indicate that more entries are available for the
- * specified time range.
- *
- * \param self the connection object
- * \param error the error code if an error occurs
- * \param logReference log object reference in the form <LD name>/<LN name>$<log name>
- * \param entryID usually the entryID of the last received entry
- * \param timeStamp as millisecond UTC timestamp
- * \param moreFollows (output value) indicates that more entries are available that match the specification.
- *
- * \return list of MmsJournalEntry objects matching the specification
- */
- LIB61850_API LinkedList /* <MmsJournalEntry> */
- IedConnection_queryLogAfter(IedConnection self, IedClientError* error, const char* logReference,
- MmsValue* entryID, uint64_t timeStamp, bool* moreFollows);
- typedef void
- (*IedConnection_QueryLogHandler) (uint32_t invokeId, void* parameter, IedClientError mmsError, LinkedList /* <MmsJournalEntry> */ journalEntries, bool moreFollows);
- 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 uint32_t
- IedConnection_queryLogAfterAsync(IedConnection self, IedClientError* error, const char* logReference,
- MmsValue* entryID, uint64_t timeStamp, IedConnection_QueryLogHandler handler, void* parameter);
- /** @} */
- /**
- * @defgroup IEC61850_CLIENT_FILE_SERVICE File service related functions, data types, and definitions
- *
- * @{
- */
- typedef struct sFileDirectoryEntry* FileDirectoryEntry;
- /**
- * @deprecated Will be removed from API
- */
- LIB61850_API FileDirectoryEntry
- FileDirectoryEntry_create(const char* fileName, uint32_t fileSize, uint64_t lastModified);
- /**
- * \brief Destroy a FileDirectoryEntry object (free all resources)
- *
- * NOTE: Usually is called as a parameter of the \ref LinkedList_destroyDeep function.
- *
- * \param self the FileDirectoryEntry object
- */
- LIB61850_API void
- FileDirectoryEntry_destroy(FileDirectoryEntry self);
- /**
- * \brief Get the name of the file
- *
- * \param self the FileDirectoryEntry object
- *
- * \return name of the file as null terminated string
- */
- LIB61850_API const char*
- FileDirectoryEntry_getFileName(FileDirectoryEntry self);
- /**
- * \brief Get the file size in bytes
- *
- * \param self the FileDirectoryEntry object
- *
- * \return size of the file in bytes, or 0 if file size is unknown
- */
- LIB61850_API uint32_t
- FileDirectoryEntry_getFileSize(FileDirectoryEntry self);
- /**
- * \brief Get the timestamp of last modification of the file
- *
- * \param self the FileDirectoryEntry object
- *
- * \return UTC timestamp in milliseconds
- */
- LIB61850_API uint64_t
- FileDirectoryEntry_getLastModified(FileDirectoryEntry self);
- /**
- * \brief returns the directory entries of the specified file directory.
- *
- * Requires the server to support file services.
- *
- * NOTE: the returned linked list has to be freed by the user. You can user the following statement
- * to free the list of directory entries:
- *
- * LinkedList_destroyDeep(fileNames, (LinkedListValueDeleteFunction) FileDirectoryEntry_destroy);
- *
- * where fileNames is the return value of this function.
- *
- * \param self the connection object
- * \param error the error code if an error occurs
- * \param directoryName the name of the directory or NULL to get the entries of the root directory
- *
- * \return the list of directory entries. The return type is a LinkedList with FileDirectoryEntry elements
- */
- LIB61850_API LinkedList /*<FileDirectoryEntry>*/
- IedConnection_getFileDirectory(IedConnection self, IedClientError* error, const char* directoryName);
- /**
- * \brief returns the directory entries of the specified file directory returned by a single file directory request.
- *
- * This function will only create a single request and the result may only be the directory that fits
- * into a single MMS PDU. If the server contains more directory entries, this will be indicated by setting
- * the moreFollows variable (if provided by the caller). If the directory entry does not fit into a single MMS
- * PDU the next part of the directory list can be requested by setting the continueAfter parameter with the value
- * of the last filename of the received list.
- *
- * Requires the server to support file services.
- *
- * NOTE: the returned linked list has to be freed by the user. You can user the following statement
- * to free the list of directory entries:
- *
- * LinkedList_destroyDeep(fileNames, (LinkedListValueDeleteFunction) FileDirectoryEntry_destroy);
- *
- * where fileNames is the return value of this function.
- *
- * \param self the connection object
- * \param error the error code if an error occurs
- * \param directoryName the name of the directory or NULL to get the entries of the root directory
- * \param continueAfter last received filename to continue after, or NULL for the first request
- * \param moreFollows if provided by the caller (non NULL) the function will indicate if more directory entries
- * are available.
- *
- * \return the list of directory entries. The return type is a LinkedList with FileDirectoryEntry elements
- */
- LIB61850_API LinkedList /*<FileDirectoryEntry>*/
- IedConnection_getFileDirectoryEx(IedConnection self, IedClientError* error, const char* directoryName, const char* continueAfter,
- bool* moreFollows);
- /**
- * \brief Callback handler for the get file directory service
- *
- * Will be called once for each file directory entry and after the last entry with \ref moreFollows = false to indicate
- * to indicate that no more data will follow. In case of an error the callback will be called with
- * \ref err != IED_ERROR_OK and moreFollows = false.
- */
- /**
- * \brief Callback handler for the get file directory service
- *
- * Will be called once for each file directory entry and after the last entry with \ref filename = NULL to indicate
- * with \ref moreFollows set to true if more data is available at the server (can only happen when using the \ref IedConnection_getFileDirectoryAsyncEx
- * function). In case of an error the callback will be called with \ref err != IED_ERROR_OK and moreFollows = false.
- *
- * \param invokeId invoke ID of the request
- * \param parameter user provided parameter
- * \param err error code in case of a problem, otherwise IED_ERROR_OK
- * \param filename the filename of the current file directory entry or NULL if no more entries are available
- * \param size the file size in byte of the current file directory entry
- * \param lastModified the last modified timestamp of the current file directory entry
- *
- * \return return false when the request has to be stopped (no further callback invokations), true otherwise
- */
- typedef bool
- (*IedConnection_FileDirectoryEntryHandler) (uint32_t invokeId, void* parameter, IedClientError err, char* filename, uint32_t size, uint64_t lastModfified,
- bool moreFollows);
- /**
- * \brief Get file directory (single request) - asynchronous version
- *
- * The provided handler will be called for each received file directory entry.
- *
- * NOTE: This will only cause a single MMS request. When the resulting file directory doesn't fit into
- * a single MMS PDU another request has to be sent indicating a continuation point with the continueAfter
- * parameter.
- *
- * \param self the connection object
- * \param error the error code if an error occurs
- * \param directoryName the name of the directory or NULL to get the entries of the root directory
- * \param continueAfter last received filename to continue after, or NULL for the first request
- * \param handler the callback handler
- * \param parameter user provided callback parameter
- *
- * \return the invokeId of the first file directory request
- */
- LIB61850_API uint32_t
- IedConnection_getFileDirectoryAsyncEx(IedConnection self, IedClientError* error, const char* directoryName, const char* continueAfter,
- IedConnection_FileDirectoryEntryHandler handler, void* parameter);
- /**
- * \brief user provided handler to receive the data of the GetFile request
- *
- * This handler will be invoked whenever the clients receives a data block from
- * the server. The API user has to copy the data to another location before returning.
- * The other location could for example be a file in the clients file system.
- *
- * \param parameter user provided parameter
- * \param buffer pointer to the buffer containing the received data
- * \param bytesRead number of bytes available in the buffer
- *
- * \return true if the client implementation shall continue to download data false if the download
- * should be stopped. E.g. if the file cannot be stored client side due to missing resources.
- */
- typedef bool
- (*IedClientGetFileHandler) (void* parameter, uint8_t* buffer, uint32_t bytesRead);
- /**
- * \brief Implementation of the GetFile ACSI service
- *
- * Download a file from the server.
- *
- * \param self the connection object
- * \param error the error code if an error occurs
- * \param fileName the name of the file to be read from the server
- *
- * \return number of bytes received
- */
- LIB61850_API uint32_t
- IedConnection_getFile(IedConnection self, IedClientError* error, const char* fileName, IedClientGetFileHandler handler,
- void* handlerParameter);
- /**
- * \brief User provided handler to receive the data of the asynchronous GetFile request
- *
- * This handler will be invoked whenever the clients receives a data block from
- * the server. The API user has to copy the data to another location before returning.
- * The other location could for example be a file in the clients file system. When the
- * last data block is received the moreFollows parameter will be set to false.
- *
- * \param invokeId invoke ID of the message containing the received data
- * \param parameter user provided parameter passed to the callback
- * \param err error code in case of an error or IED_ERROR_OK
- * \param originalInvokeId the invoke ID of the original (first) request. This is usually the request to open the file.
- * \param buffer the buffer that contains the received file data
- * \param bytesRead the number of bytes read into the buffer
- * \param moreFollows indicates that more file data is following
- *
- * \return true, continue the file download when moreFollows is true, false, stop file download
- */
- typedef bool
- (*IedConnection_GetFileAsyncHandler) (uint32_t invokeId, void* parameter, IedClientError err, uint32_t originalInvokeId,
- uint8_t* buffer, uint32_t bytesRead, bool moreFollows);
- /**
- * \brief Implementation of the GetFile ACSI service - asynchronous version
- *
- * Download a file from the server.
- *
- * NOTE: This function can cause several request messages to be sent until the complete file is received
- * or the file transfer is canceled. It allocates a background task and an outstanding call slot.
- *
- * \param self the connection object
- * \param error the error code if an error occurs
- * \param fileName the name of the file to be read from the server
- * \param hander callback handler that is called for each received data or error message
- * \param parameter user provided callback parameter
- *
- * \return invokeId of the first sent request
- */
- LIB61850_API uint32_t
- IedConnection_getFileAsync(IedConnection self, IedClientError* error, const char* fileName, IedConnection_GetFileAsyncHandler handler,
- void* parameter);
- /**
- * \brief Set the virtual filestore basepath for the setFile service
- *
- * All external file service accesses will be mapped to paths relative to the base directory.
- * NOTE: This function is only available when the CONFIG_SET_FILESTORE_BASEPATH_AT_RUNTIME
- * option in stack_config.h is set.
- *
- * \param self the connection object
- * \param basepath the new virtual filestore basepath
- */
- LIB61850_API void
- IedConnection_setFilestoreBasepath(IedConnection, const char* basepath);
- /**
- * \brief Implementation of the SetFile ACSI service
- *
- * Upload a file to the server. The file has to be available in the local VMD filestore.
- *
- * \param self the connection object
- * \param error the error code if an error occurs
- * \param sourceFilename the filename of the local (client side) file
- * \param destinationFilename the filename of the remote (service side) file
- */
- LIB61850_API void
- IedConnection_setFile(IedConnection self, IedClientError* error, const char* sourceFilename, const char* destinationFilename);
- /**
- * \brief Implementation of the SetFile ACSI service - asynchronous version
- *
- * Upload a file to the server. The file has to be available in the local VMD filestore.
- *
- * \param self the connection object
- * \param error the error code if an error occurs
- * \param sourceFilename the filename of the local (client side) file
- * \param destinationFilename the filename of the remote (service side) file
- * \param handler callback handler that is called when the obtain file response has been received
- * \param parameter user provided callback parameter
- */
- LIB61850_API uint32_t
- IedConnection_setFileAsync(IedConnection self, IedClientError* error, const char* sourceFilename, const char* destinationFilename,
- IedConnection_GenericServiceHandler handler, void* parameter);
- /**
- * \brief Implementation of the DeleteFile ACSI service
- *
- * Delete a file at the server.
- *
- * \param self the connection object
- * \param error the error code if an error occurs
- * \param fileName the name of the file to delete
- */
- LIB61850_API void
- IedConnection_deleteFile(IedConnection self, IedClientError* error, const char* fileName);
- /**
- * \brief Implementation of the DeleteFile ACSI service - asynchronous version
- *
- * Delete a file at the server.
- *
- * \param self the connection object
- * \param error the error code if an error occurs
- * \param fileName the name of the file to delete
- * \param handler callback handler that is called when the obtain file response has been received
- * \param parameter user provided callback parameter
- */
- LIB61850_API uint32_t
- IedConnection_deleteFileAsync(IedConnection self, IedClientError* error, const char* fileName,
- IedConnection_GenericServiceHandler handler, void* parameter);
- /** @} */
- /**@}*/
- #ifdef __cplusplus
- }
- #endif
- #endif /* IEC61850_CLIENT_H_ */
|