IDS peak genericC++ v1.11.0
Loading...
Searching...
No Matches
peak_system.hpp
Go to the documentation of this file.
1
10
11#pragma once
12
13
17#include <peak/dll_interface/peak_dll_interface_util.hpp>
18#include <peak/generic/peak_t_callback_manager.hpp>
21
22#include <unordered_map>
23#include <cstddef>
24#include <cstdint>
25#include <functional>
26#include <memory>
27#include <mutex>
28#include <string>
29#include <vector>
30
31
32namespace peak
33{
34namespace core
35{
36
37class ProducerLibrary;
38
39struct InterfaceFoundCallbackContainer;
40
48class System
50 , public std::enable_shared_from_this<System>
51{
52public:
54 using InterfaceFoundCallback = std::function<void(const std::shared_ptr<InterfaceDescriptor>& foundInterface)>;
58 using InterfaceLostCallback = std::function<void(const std::string& lostInterfaceId)>;
61
62 System() = delete;
63 ~System() override;
64 System(const System& other) = delete;
65 System& operator=(const System& other) = delete;
66 System(System&& other) = delete;
67 System& operator=(System&& other) = delete;
68
70 std::string Key() const;
71
73 RawInformation Info(int32_t infoCommand) const;
83 std::string ID() const;
84
86 std::string DisplayName() const;
87
89 std::string VendorName() const;
90
92 std::string ModelName() const;
93
95 std::string Version() const;
96
98 std::string TLType() const;
99
101 std::string CTIFileName() const;
102
104 std::string CTIFullPath() const;
105
107 uint32_t GenTLVersionMajor() const;
108
110 uint32_t GenTLVersionMinor() const;
111
114
129 void UpdateInterfaces(Timeout timeout_ms);
130
140 std::vector<std::shared_ptr<InterfaceDescriptor>> Interfaces() const;
141
143 std::shared_ptr<ProducerLibrary> ParentLibrary() const;
144
160
173
189
202
203private:
204 struct InterfaceFoundCallbackContainer
205 {
206 std::weak_ptr<System> System_;
208 };
209 static void PEAK_CALL_CONV InterfaceFoundCallbackCWrapper(
210 PEAK_INTERFACE_DESCRIPTOR_HANDLE foundInterface, void* context);
211 static void PEAK_CALL_CONV InterfaceLostCallbackCWrapper(
212 const char* lostInterfaceId, size_t lostInterfaceIdSize, void* context);
213 std::shared_ptr<InterfaceDescriptor> GetOrAddFoundInterface(PEAK_INTERFACE_DESCRIPTOR_HANDLE foundInterface);
214
215 PEAK_MODULE_HANDLE ModuleHandle() const override;
216 PEAK_EVENT_SUPPORTING_MODULE_HANDLE EventSupportingModuleHandle() const override;
217
218 void InitializeUpdateMechanismIfNecessary();
219
220 friend ClassCreator<System>;
221 System(PEAK_SYSTEM_HANDLE systemHandle, const std::weak_ptr<ProducerLibrary>& parentLibrary);
222 PEAK_SYSTEM_HANDLE m_backendHandle;
223
224 std::weak_ptr<ProducerLibrary> m_parentLibrary;
225
226 std::unique_ptr<TCallbackManager<PEAK_INTERFACE_FOUND_CALLBACK_HANDLE, InterfaceFoundCallbackContainer>>
227 m_interfaceFoundCallbackManager;
228 std::unique_ptr<TCallbackManager<PEAK_INTERFACE_LOST_CALLBACK_HANDLE, InterfaceLostCallback>>
229 m_interfaceLostCallbackManager;
230
231 std::vector<std::shared_ptr<InterfaceDescriptor>> m_interfaces;
232 std::unordered_map<std::string, std::shared_ptr<InterfaceDescriptor>> m_interfacesByKey;
233 std::unordered_map<std::string, std::string> m_interfacesKeyById;
234 mutable std::mutex m_interfacesMutex;
235 std::once_flag m_updateMechanismInitializedFlag;
236
237 std::string m_key;
238};
239
240} /* namespace core */
241} /* namespace peak */
242
243/* Implementation */
244namespace peak
245{
246namespace core
247{
248
249inline System::System(PEAK_SYSTEM_HANDLE systemHandle, const std::weak_ptr<ProducerLibrary>& parentLibrary)
250 : m_backendHandle(systemHandle)
251 , m_parentLibrary(parentLibrary)
252 , m_interfaceFoundCallbackManager()
253 , m_interfaceLostCallbackManager()
254 , m_key(QueryStringFromCInterfaceFunction([&](char* key, size_t* keySize) {
255 return PEAK_C_ABI_PREFIX PEAK_System_GetKey(systemHandle, key, keySize);
256 }))
257{
258 m_interfaceFoundCallbackManager =
259 std::make_unique<TCallbackManager<PEAK_INTERFACE_FOUND_CALLBACK_HANDLE, InterfaceFoundCallbackContainer>>(
260 [&](void* callbackContext) {
261 return QueryNumericFromCInterfaceFunction<PEAK_INTERFACE_FOUND_CALLBACK_HANDLE>(
262 [&](PEAK_INTERFACE_FOUND_CALLBACK_HANDLE* interfaceFoundCallbackHandle) {
264 InterfaceFoundCallbackCWrapper, callbackContext, interfaceFoundCallbackHandle);
265 });
266 },
267 [&](PEAK_INTERFACE_FOUND_CALLBACK_HANDLE callbackHandle) {
268 CallAndCheckCInterfaceFunction([&] {
270 m_backendHandle, callbackHandle);
271 });
272 });
273
274 m_interfaceLostCallbackManager =
275 std::make_unique<TCallbackManager<PEAK_INTERFACE_LOST_CALLBACK_HANDLE, InterfaceLostCallback>>(
276 [&](void* callbackContext) {
277 return QueryNumericFromCInterfaceFunction<PEAK_INTERFACE_LOST_CALLBACK_HANDLE>(
278 [&](PEAK_INTERFACE_LOST_CALLBACK_HANDLE* interfaceLostCallbackHandle) {
280 InterfaceLostCallbackCWrapper, callbackContext, interfaceLostCallbackHandle);
281 });
282 },
283 [&](PEAK_INTERFACE_LOST_CALLBACK_HANDLE callbackHandle) {
284 CallAndCheckCInterfaceFunction([&] {
286 m_backendHandle, callbackHandle);
287 });
288 });
289}
290
292{
293 try
294 {
295 m_interfaceFoundCallbackManager->UnregisterAllCallbacks();
296 m_interfaceLostCallbackManager->UnregisterAllCallbacks();
297 }
298 catch (const Exception&)
299 {}
300
301 (void)PEAK_C_ABI_PREFIX PEAK_System_Destruct(m_backendHandle);
302}
303
304inline std::string System::Key() const
305{
306 return m_key;
307}
308
309inline RawInformation System::Info(int32_t infoCommand) const
310{
311 return QueryRawInformationFromCInterfaceFunction([&](int32_t* dataType, uint8_t* buffer, size_t* bufferSize) {
312 return PEAK_C_ABI_PREFIX PEAK_System_GetInfo(m_backendHandle, infoCommand, dataType, buffer, bufferSize);
313 });
314}
315
316inline std::string System::ID() const
317{
318 return QueryStringFromCInterfaceFunction([&](char* id, size_t* idSize) {
319 return PEAK_C_ABI_PREFIX PEAK_System_GetID(m_backendHandle, id, idSize);
320 });
321}
322
323inline std::string System::DisplayName() const
324{
325 return QueryStringFromCInterfaceFunction([&](char* displayName, size_t* displayNameSize) {
326 return PEAK_C_ABI_PREFIX PEAK_System_GetDisplayName(m_backendHandle, displayName, displayNameSize);
327 });
328}
329
330inline std::string System::VendorName() const
331{
332 return QueryStringFromCInterfaceFunction([&](char* vendorName, size_t* vendorNameSize) {
333 return PEAK_C_ABI_PREFIX PEAK_System_GetVendorName(m_backendHandle, vendorName, vendorNameSize);
334 });
335}
336
337inline std::string System::ModelName() const
338{
339 return QueryStringFromCInterfaceFunction([&](char* modelName, size_t* modelNameSize) {
340 return PEAK_C_ABI_PREFIX PEAK_System_GetModelName(m_backendHandle, modelName, modelNameSize);
341 });
342}
343
344inline std::string System::Version() const
345{
346 return QueryStringFromCInterfaceFunction([&](char* version, size_t* versionSize) {
347 return PEAK_C_ABI_PREFIX PEAK_System_GetVersion(m_backendHandle, version, versionSize);
348 });
349}
350
351inline std::string System::TLType() const
352{
353 return QueryStringFromCInterfaceFunction([&](char* tlType, size_t* tlTypeSize) {
354 return PEAK_C_ABI_PREFIX PEAK_System_GetTLType(m_backendHandle, tlType, tlTypeSize);
355 });
356}
357
358inline std::string System::CTIFileName() const
359{
360 return QueryStringFromCInterfaceFunction([&](char* ctiFileName, size_t* ctiFileNameSize) {
361 return PEAK_C_ABI_PREFIX PEAK_System_GetCTIFileName(m_backendHandle, ctiFileName, ctiFileNameSize);
362 });
363}
364
365inline std::string System::CTIFullPath() const
366{
367 return QueryStringFromCInterfaceFunction([&](char* ctiFullPath, size_t* ctiFullPathSize) {
368 return PEAK_C_ABI_PREFIX PEAK_System_GetCTIFullPath(m_backendHandle, ctiFullPath, ctiFullPathSize);
369 });
370}
371
372inline uint32_t System::GenTLVersionMajor() const
373{
374 return QueryNumericFromCInterfaceFunction<uint32_t>([&](uint32_t* gentlVersionMajor) {
375 return PEAK_C_ABI_PREFIX PEAK_System_GetGenTLVersionMajor(m_backendHandle, gentlVersionMajor);
376 });
377}
378
379inline uint32_t System::GenTLVersionMinor() const
380{
381 return QueryNumericFromCInterfaceFunction<uint32_t>([&](uint32_t* gentlVersionMinor) {
382 return PEAK_C_ABI_PREFIX PEAK_System_GetGenTLVersionMinor(m_backendHandle, gentlVersionMinor);
383 });
384}
385
387{
388 return static_cast<peak::core::CharacterEncoding>(
389 QueryNumericFromCInterfaceFunction<PEAK_CHARACTER_ENCODING>(
390 [&](PEAK_CHARACTER_ENCODING* characterEncoding) {
391 return PEAK_C_ABI_PREFIX PEAK_System_GetCharacterEncoding(m_backendHandle, characterEncoding);
392 }));
393}
394
395inline void System::UpdateInterfaces(Timeout timeout_ms)
396{
397 InitializeUpdateMechanismIfNecessary();
398
399 CallAndCheckCInterfaceFunction(
400 [&] { return PEAK_C_ABI_PREFIX PEAK_System_UpdateInterfaces(m_backendHandle, timeout_ms); });
401}
402
403inline std::vector<std::shared_ptr<InterfaceDescriptor>> System::Interfaces() const
404{
405 std::lock_guard<std::mutex> lock(m_interfacesMutex);
406 return m_interfaces;
407}
408
409inline std::shared_ptr<ProducerLibrary> System::ParentLibrary() const
410{
411 return LockOrThrow(m_parentLibrary);
412}
413
415 const System::InterfaceFoundCallback& callback)
416{
417 return reinterpret_cast<InterfaceFoundCallbackHandle>(
418 m_interfaceFoundCallbackManager->RegisterCallback(InterfaceFoundCallbackContainer{ shared_from_this(),
419 [callback](const std::shared_ptr<InterfaceDescriptor>& foundInterface) { callback(foundInterface); } }));
420}
421
423{
424 m_interfaceFoundCallbackManager->UnregisterCallback(
425 reinterpret_cast<PEAK_INTERFACE_FOUND_CALLBACK_HANDLE>(callbackHandle));
426}
427
429 const System::InterfaceLostCallback& callback)
430{
431 return reinterpret_cast<InterfaceLostCallbackHandle>(m_interfaceLostCallbackManager->RegisterCallback(callback));
432}
433
435{
436 m_interfaceLostCallbackManager->UnregisterCallback(
437 reinterpret_cast<PEAK_INTERFACE_LOST_CALLBACK_HANDLE>(callbackHandle));
438}
439
440inline void PEAK_CALL_CONV System::InterfaceFoundCallbackCWrapper(
441 PEAK_INTERFACE_DESCRIPTOR_HANDLE foundInterface, void* context)
442{
443 auto callbackContainer = static_cast<InterfaceFoundCallbackContainer*>(context);
444
445 auto interfaceDescriptor = callbackContainer->System_.lock()->GetOrAddFoundInterface(foundInterface);
446
447 callbackContainer->Callback(interfaceDescriptor);
448}
449
450inline void PEAK_CALL_CONV System::InterfaceLostCallbackCWrapper(
451 const char* lostInterfaceId, size_t lostInterfaceIdSize, void* context)
452{
453 auto callback = static_cast<System::InterfaceLostCallback*>(context);
454
455 callback->operator()(std::string(lostInterfaceId, lostInterfaceIdSize - 1));
456}
457
458inline std::shared_ptr<InterfaceDescriptor> System::GetOrAddFoundInterface(
460{
461 std::lock_guard<std::mutex> lock(m_interfacesMutex);
462
463 const auto interfaceKey = QueryStringFromCInterfaceFunction([&](char* key, size_t* keySize) {
464 return PEAK_C_ABI_PREFIX PEAK_InterfaceDescriptor_GetKey(foundInterface, key, keySize);
465 });
466 auto keyInterfacePairIterator = m_interfacesByKey.find(interfaceKey);
467 if (keyInterfacePairIterator == m_interfacesByKey.end())
468 {
469 auto interfaceDescriptor = std::static_pointer_cast<InterfaceDescriptor>(
470 std::make_shared<ClassCreator<InterfaceDescriptor>>(
471 foundInterface, std::weak_ptr<System>{ shared_from_this() }));
472 m_interfaces.emplace_back(interfaceDescriptor);
473 m_interfacesByKey.emplace(interfaceKey, interfaceDescriptor);
474 m_interfacesKeyById.emplace(interfaceDescriptor->ID(), interfaceKey);
475
476 return interfaceDescriptor;
477 }
478
479 return keyInterfacePairIterator->second;
480}
481
482inline PEAK_MODULE_HANDLE System::ModuleHandle() const
483{
484 auto moduleHandle = QueryNumericFromCInterfaceFunction<PEAK_MODULE_HANDLE>(
485 [&](PEAK_MODULE_HANDLE* _moduleHandle) {
486 return PEAK_C_ABI_PREFIX PEAK_System_ToModule(m_backendHandle, _moduleHandle);
487 });
488
489 return moduleHandle;
490}
491
492inline PEAK_EVENT_SUPPORTING_MODULE_HANDLE System::EventSupportingModuleHandle() const
493{
494 auto eventSupportingModuleHandle = QueryNumericFromCInterfaceFunction<PEAK_EVENT_SUPPORTING_MODULE_HANDLE>(
495 [&](PEAK_EVENT_SUPPORTING_MODULE_HANDLE* _eventSupportingModuleHandle) {
497 m_backendHandle, _eventSupportingModuleHandle);
498 });
499
500 return eventSupportingModuleHandle;
501}
502
503inline void System::InitializeUpdateMechanismIfNecessary()
504{
505 std::call_once(m_updateMechanismInitializedFlag, [&] {
506 (void)RegisterInterfaceFoundCallback([](const std::shared_ptr<InterfaceDescriptor>&) {
507 // Registering an empty callback is enough since InterfaceFoundCallbackCWrapper() handles everything else.
508 });
509 (void)RegisterInterfaceLostCallback([&](const std::string& lostInterfaceId) {
510 std::lock_guard<std::mutex> lock(m_interfacesMutex);
511 const auto lostInterfaceKey = m_interfacesKeyById.at(lostInterfaceId);
512 m_interfaces.erase(std::remove_if(std::begin(m_interfaces), std::end(m_interfaces),
513 [lostInterfaceKey](const std::shared_ptr<InterfaceDescriptor>& interface_) {
514 return interface_->Key() == lostInterfaceKey;
515 }),
516 std::end(m_interfaces));
517 m_interfacesByKey.erase(lostInterfaceKey);
518 m_interfacesKeyById.erase(lostInterfaceId);
519 });
520 });
521}
522
523} /* namespace core */
524} /* namespace peak */
The base class for all exceptions thrown by the library.
Definition peak_exception.hpp:26
Represents a GenTL producer library (CTI).
Definition peak_producer_library.hpp:39
uint32_t GenTLVersionMajor() const
Returns the GenTL major version of the GenTL producer library this system belongs to.
Definition peak_system.hpp:372
void UnregisterInterfaceLostCallback(InterfaceLostCallbackHandle callbackHandle)
Unregisters a interface lost callback.
Definition peak_system.hpp:434
std::string TLType() const
Returns the TL (transport layer) type.
Definition peak_system.hpp:351
void UpdateInterfaces(Timeout timeout_ms)
Searches for interfaces.
Definition peak_system.hpp:395
std::function< void(const std::shared_ptr< InterfaceDescriptor > &foundInterface)> InterfaceFoundCallback
Definition peak_system.hpp:54
std::string CTIFileName() const
Returns the file name of the GenTL producer library this system belongs to.
Definition peak_system.hpp:358
void UnregisterInterfaceFoundCallback(InterfaceFoundCallbackHandle callbackHandle)
Unregisters a interface found callback.
Definition peak_system.hpp:422
std::string CTIFullPath() const
Returns the full path of the GenTL producer library this system belongs to.
Definition peak_system.hpp:365
System(const System &other)=delete
InterfaceLostCallback * InterfaceLostCallbackHandle
Definition peak_system.hpp:60
std::string DisplayName() const
Returns the display name.
Definition peak_system.hpp:323
InterfaceFoundCallbackHandle RegisterInterfaceFoundCallback(const InterfaceFoundCallback &callback)
Registers a callback for signaling a found interface.
Definition peak_system.hpp:414
uint32_t GenTLVersionMinor() const
Returns the GenTL minor version of the GenTL producer library this system belongs to.
Definition peak_system.hpp:379
std::string Version() const
Returns the version.
Definition peak_system.hpp:344
System(System &&other)=delete
InterfaceLostCallbackHandle RegisterInterfaceLostCallback(const InterfaceLostCallback &callback)
Registers a callback for signaling a lost interface.
Definition peak_system.hpp:428
~System() override
Definition peak_system.hpp:291
std::string ID() const
Returns the ID.
Definition peak_system.hpp:316
peak::core::CharacterEncoding CharacterEncoding() const
Returns the character encoding of the GenTL producer library this system belongs to.
Definition peak_system.hpp:386
InterfaceFoundCallback * InterfaceFoundCallbackHandle
Definition peak_system.hpp:56
std::shared_ptr< ProducerLibrary > ParentLibrary() const
Returns the parent library.
Definition peak_system.hpp:409
System & operator=(const System &other)=delete
std::vector< std::shared_ptr< InterfaceDescriptor > > Interfaces() const
Returns the interface list.
Definition peak_system.hpp:403
std::string ModelName() const
Returns the model name.
Definition peak_system.hpp:337
std::function< void(const std::string &lostInterfaceId)> InterfaceLostCallback
Definition peak_system.hpp:58
System & operator=(System &&other)=delete
std::string VendorName() const
Returns the vendor name.
Definition peak_system.hpp:330
std::string Key() const
Returns the unique key.
Definition peak_system.hpp:304
RawInformation Info(int32_t infoCommand) const
Delivers information based on the given GenTL info command.
Definition peak_system.hpp:309
Represents a timeout value in milliseconds.
Definition peak_timeout.hpp:31
The "core" namespace contains the direct GenAPI and GenTL wrapper.
Definition peak_buffer.hpp:31
CharacterEncoding
Possible character encodings.
Definition peak_common_system_enums.hpp:25
The "peak" namespace directly contains convenience functionality like the DeviceManager as well as th...
Definition peak_dynamic_loader.h:33
PEAK_C_API PEAK_System_GetGenTLVersionMinor(PEAK_SYSTEM_HANDLE systemHandle, uint32_t *gentlVersionMinor)
Asks the given system for the minor component of its GenTL version.
PEAK_INTERFACE_LOST_CALLBACK * PEAK_INTERFACE_LOST_CALLBACK_HANDLE
Definition peak_backend.h:515
PEAK_C_API PEAK_System_GetGenTLVersionMajor(PEAK_SYSTEM_HANDLE systemHandle, uint32_t *gentlVersionMajor)
Asks the given system for the major component of its GenTL version.
PEAK_C_API PEAK_System_ToEventSupportingModule(PEAK_SYSTEM_HANDLE systemHandle, PEAK_EVENT_SUPPORTING_MODULE_HANDLE *eventSupportingModuleHandle)
Casts the given system to an event-supporting module.
PEAK_C_API PEAK_System_GetInfo(PEAK_SYSTEM_HANDLE systemHandle, int32_t infoCommand, int32_t *infoDataType, uint8_t *info, size_t *infoSize)
Asks the given system for an information based on a specific command.
struct PEAK_MODULE * PEAK_MODULE_HANDLE
Definition peak_backend.h:421
PEAK_C_API PEAK_System_GetKey(PEAK_SYSTEM_HANDLE systemHandle, char *key, size_t *keySize)
Asks the given system for its key.
PEAK_C_API PEAK_System_Destruct(PEAK_SYSTEM_HANDLE systemHandle)
Destroys the given system.
struct PEAK_INTERFACE_DESCRIPTOR * PEAK_INTERFACE_DESCRIPTOR_HANDLE
Definition peak_backend.h:377
PEAK_C_API PEAK_System_GetDisplayName(PEAK_SYSTEM_HANDLE systemHandle, char *displayName, size_t *displayNameSize)
Asks the given system for its display name.
PEAK_C_API PEAK_InterfaceDescriptor_GetKey(PEAK_INTERFACE_DESCRIPTOR_HANDLE interfaceDescriptorHandle, char *key, size_t *keySize)
Asks the given interface descriptor for its key.
PEAK_C_API PEAK_System_UpdateInterfaces(PEAK_SYSTEM_HANDLE systemHandle, uint64_t timeout_ms)
Tells the given system to update its interfaces with the given timeout.
PEAK_C_API PEAK_System_GetID(PEAK_SYSTEM_HANDLE systemHandle, char *id, size_t *idSize)
Asks the given system for its ID.
struct PEAK_EVENT_SUPPORTING_MODULE * PEAK_EVENT_SUPPORTING_MODULE_HANDLE
Definition peak_backend.h:477
PEAK_C_API PEAK_System_UnregisterInterfaceLostCallback(PEAK_SYSTEM_HANDLE systemHandle, PEAK_INTERFACE_LOST_CALLBACK_HANDLE callbackHandle)
Unregisters the interface-lost callback with the given handle from the given system.
struct PEAK_SYSTEM * PEAK_SYSTEM_HANDLE
Definition peak_backend.h:373
PEAK_C_API PEAK_System_GetCTIFileName(PEAK_SYSTEM_HANDLE systemHandle, char *ctiFileName, size_t *ctiFileNameSize)
Asks the given system for its parent CTI's file name.
PEAK_C_API PEAK_System_GetModelName(PEAK_SYSTEM_HANDLE systemHandle, char *modelName, size_t *modelNameSize)
Asks the given system for its model name.
PEAK_C_API PEAK_System_GetCharacterEncoding(PEAK_SYSTEM_HANDLE systemHandle, PEAK_CHARACTER_ENCODING *characterEncoding)
Asks the given system for its character encoding.
PEAK_C_API PEAK_System_GetVendorName(PEAK_SYSTEM_HANDLE systemHandle, char *vendorName, size_t *vendorNameSize)
Asks the given system for its vendor name.
PEAK_C_API PEAK_System_GetCTIFullPath(PEAK_SYSTEM_HANDLE systemHandle, char *ctiFullPath, size_t *ctiFullPathSize)
Asks the given system for its parent CTI's full path.
PEAK_C_API PEAK_System_GetTLType(PEAK_SYSTEM_HANDLE systemHandle, char *tlType, size_t *tlTypeSize)
Asks the given system for its TL type.
PEAK_C_API PEAK_System_GetVersion(PEAK_SYSTEM_HANDLE systemHandle, char *version, size_t *versionSize)
Asks the given system for its version.
PEAK_C_API PEAK_System_RegisterInterfaceLostCallback(PEAK_SYSTEM_HANDLE systemHandle, PEAK_INTERFACE_LOST_CALLBACK callback, void *callbackContext, PEAK_INTERFACE_LOST_CALLBACK_HANDLE *callbackHandle)
Registers a callback signaling a lost interface at the given system.
int32_t PEAK_CHARACTER_ENCODING
Definition peak_backend.h:107
PEAK_C_API PEAK_System_RegisterInterfaceFoundCallback(PEAK_SYSTEM_HANDLE systemHandle, PEAK_INTERFACE_FOUND_CALLBACK callback, void *callbackContext, PEAK_INTERFACE_FOUND_CALLBACK_HANDLE *callbackHandle)
Registers a callback signaling a found interface at the given system.
PEAK_INTERFACE_FOUND_CALLBACK * PEAK_INTERFACE_FOUND_CALLBACK_HANDLE
Definition peak_backend.h:513
PEAK_C_API PEAK_System_UnregisterInterfaceFoundCallback(PEAK_SYSTEM_HANDLE systemHandle, PEAK_INTERFACE_FOUND_CALLBACK_HANDLE callbackHandle)
Unregisters the interface-found callback with the given handle from the given system.
PEAK_C_API PEAK_System_ToModule(PEAK_SYSTEM_HANDLE systemHandle, PEAK_MODULE_HANDLE *moduleHandle)
Casts the given system to a module.
#define PEAK_C_ABI_PREFIX
Definition peak_dll_defines.h:16
#define PEAK_CALL_CONV
Definition peak_dynamic_loader.h:30
The struct returned by all raw information functions.
Definition peak_common_structs.hpp:25