IDS peak genericC++ v1.16.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
49class System
51 , public std::enable_shared_from_this<System>
52{
53public:
55 using InterfaceFoundCallback = std::function<void(const std::shared_ptr<InterfaceDescriptor>& foundInterface)>;
59 using InterfaceLostCallback = std::function<void(const std::string& lostInterfaceId)>;
62
63 System() = delete;
64 ~System() override;
65 System(const System& other) = delete;
66 System& operator=(const System& other) = delete;
67 System(System&& other) = delete;
68 System& operator=(System&& other) = delete;
69
71 std::string Key() const;
72
74 RawInformation Info(int32_t infoCommand) const;
84 std::string ID() const;
85
87 std::string DisplayName() const;
88
90 std::string VendorName() const;
91
93 std::string ModelName() const;
94
96 std::string Version() const;
97
99 std::string TLType() const;
100
102 std::string CTIFileName() const;
103
105 std::string CTIFullPath() const;
106
108 uint32_t GenTLVersionMajor() const;
109
111 uint32_t GenTLVersionMinor() const;
112
115
130 void UpdateInterfaces(Timeout timeout_ms);
131
141 std::vector<std::shared_ptr<InterfaceDescriptor>> Interfaces() const;
142
144 std::shared_ptr<ProducerLibrary> ParentLibrary() const;
145
161
174
190
203
204private:
205 struct InterfaceFoundCallbackContainer
206 {
207 std::weak_ptr<System> System_;
209 };
210 static void PEAK_CALL_CONV InterfaceFoundCallbackCWrapper(
211 PEAK_INTERFACE_DESCRIPTOR_HANDLE foundInterface, void* context);
212 static void PEAK_CALL_CONV InterfaceLostCallbackCWrapper(
213 const char* lostInterfaceId, size_t lostInterfaceIdSize, void* context);
214 std::shared_ptr<InterfaceDescriptor> GetOrAddFoundInterface(PEAK_INTERFACE_DESCRIPTOR_HANDLE foundInterface);
215
216 PEAK_MODULE_HANDLE ModuleHandle() const override;
218
219 void InitializeUpdateMechanismIfNecessary();
220
221 friend ClassCreator<System>;
222 System(PEAK_SYSTEM_HANDLE systemHandle, const std::weak_ptr<ProducerLibrary>& parentLibrary);
223 PEAK_SYSTEM_HANDLE m_backendHandle;
224
225 std::weak_ptr<ProducerLibrary> m_parentLibrary;
226
227 std::unique_ptr<TCallbackManager<PEAK_INTERFACE_FOUND_CALLBACK_HANDLE, InterfaceFoundCallbackContainer>>
228 m_interfaceFoundCallbackManager;
229 std::unique_ptr<TCallbackManager<PEAK_INTERFACE_LOST_CALLBACK_HANDLE, InterfaceLostCallback>>
230 m_interfaceLostCallbackManager;
231
232 std::vector<std::shared_ptr<InterfaceDescriptor>> m_interfaces;
233 std::unordered_map<std::string, std::shared_ptr<InterfaceDescriptor>> m_interfacesByKey;
234 std::unordered_map<std::string, std::string> m_interfacesKeyById;
235 mutable std::mutex m_interfacesMutex;
236 std::once_flag m_updateMechanismInitializedFlag;
237
238 std::string m_key;
239};
240
241} /* namespace core */
242} /* namespace peak */
243
244/* Implementation */
245namespace peak
246{
247namespace core
248{
249
250inline System::System(PEAK_SYSTEM_HANDLE systemHandle, const std::weak_ptr<ProducerLibrary>& parentLibrary)
251 : m_backendHandle(systemHandle)
252 , m_parentLibrary(parentLibrary)
253 , m_interfaceFoundCallbackManager()
254 , m_interfaceLostCallbackManager()
255 , m_key(QueryStringFromCInterfaceFunction([&](char* key, size_t* keySize) {
256 return PEAK_C_ABI_PREFIX PEAK_System_GetKey(systemHandle, key, keySize);
257 }))
258{
259 m_interfaceFoundCallbackManager =
260 std::make_unique<TCallbackManager<PEAK_INTERFACE_FOUND_CALLBACK_HANDLE, InterfaceFoundCallbackContainer>>(
261 [&](void* callbackContext) {
262 return QueryNumericFromCInterfaceFunction<PEAK_INTERFACE_FOUND_CALLBACK_HANDLE>(
263 [&](PEAK_INTERFACE_FOUND_CALLBACK_HANDLE* interfaceFoundCallbackHandle) {
265 InterfaceFoundCallbackCWrapper, callbackContext, interfaceFoundCallbackHandle);
266 });
267 },
268 [&](PEAK_INTERFACE_FOUND_CALLBACK_HANDLE callbackHandle) {
269 CallAndCheckCInterfaceFunction([&] {
271 m_backendHandle, callbackHandle);
272 });
273 });
274
275 m_interfaceLostCallbackManager =
276 std::make_unique<TCallbackManager<PEAK_INTERFACE_LOST_CALLBACK_HANDLE, InterfaceLostCallback>>(
277 [&](void* callbackContext) {
278 return QueryNumericFromCInterfaceFunction<PEAK_INTERFACE_LOST_CALLBACK_HANDLE>(
279 [&](PEAK_INTERFACE_LOST_CALLBACK_HANDLE* interfaceLostCallbackHandle) {
281 InterfaceLostCallbackCWrapper, callbackContext, interfaceLostCallbackHandle);
282 });
283 },
284 [&](PEAK_INTERFACE_LOST_CALLBACK_HANDLE callbackHandle) {
285 CallAndCheckCInterfaceFunction([&] {
287 m_backendHandle, callbackHandle);
288 });
289 });
290}
291
293{
294 try
295 {
296 m_interfaceFoundCallbackManager->UnregisterAllCallbacks();
297 m_interfaceLostCallbackManager->UnregisterAllCallbacks();
298 }
299 catch (const Exception&)
300 {}
301
302 (void)PEAK_C_ABI_PREFIX PEAK_System_Destruct(m_backendHandle);
303}
304
305inline std::string System::Key() const
306{
307 return m_key;
308}
309
310inline RawInformation System::Info(int32_t infoCommand) const
311{
312 return QueryRawInformationFromCInterfaceFunction([&](int32_t* dataType, uint8_t* buffer, size_t* bufferSize) {
313 return PEAK_C_ABI_PREFIX PEAK_System_GetInfo(m_backendHandle, infoCommand, dataType, buffer, bufferSize);
314 });
315}
316
317inline std::string System::ID() const
318{
319 return QueryStringFromCInterfaceFunction([&](char* id, size_t* idSize) {
320 return PEAK_C_ABI_PREFIX PEAK_System_GetID(m_backendHandle, id, idSize);
321 });
322}
323
324inline std::string System::DisplayName() const
325{
326 return QueryStringFromCInterfaceFunction([&](char* displayName, size_t* displayNameSize) {
327 return PEAK_C_ABI_PREFIX PEAK_System_GetDisplayName(m_backendHandle, displayName, displayNameSize);
328 });
329}
330
331inline std::string System::VendorName() const
332{
333 return QueryStringFromCInterfaceFunction([&](char* vendorName, size_t* vendorNameSize) {
334 return PEAK_C_ABI_PREFIX PEAK_System_GetVendorName(m_backendHandle, vendorName, vendorNameSize);
335 });
336}
337
338inline std::string System::ModelName() const
339{
340 return QueryStringFromCInterfaceFunction([&](char* modelName, size_t* modelNameSize) {
341 return PEAK_C_ABI_PREFIX PEAK_System_GetModelName(m_backendHandle, modelName, modelNameSize);
342 });
343}
344
345inline std::string System::Version() const
346{
347 return QueryStringFromCInterfaceFunction([&](char* version, size_t* versionSize) {
348 return PEAK_C_ABI_PREFIX PEAK_System_GetVersion(m_backendHandle, version, versionSize);
349 });
350}
351
352inline std::string System::TLType() const
353{
354 return QueryStringFromCInterfaceFunction([&](char* tlType, size_t* tlTypeSize) {
355 return PEAK_C_ABI_PREFIX PEAK_System_GetTLType(m_backendHandle, tlType, tlTypeSize);
356 });
357}
358
359inline std::string System::CTIFileName() const
360{
361 return QueryStringFromCInterfaceFunction([&](char* ctiFileName, size_t* ctiFileNameSize) {
362 return PEAK_C_ABI_PREFIX PEAK_System_GetCTIFileName(m_backendHandle, ctiFileName, ctiFileNameSize);
363 });
364}
365
366inline std::string System::CTIFullPath() const
367{
368 return QueryStringFromCInterfaceFunction([&](char* ctiFullPath, size_t* ctiFullPathSize) {
369 return PEAK_C_ABI_PREFIX PEAK_System_GetCTIFullPath(m_backendHandle, ctiFullPath, ctiFullPathSize);
370 });
371}
372
373inline uint32_t System::GenTLVersionMajor() const
374{
375 return QueryNumericFromCInterfaceFunction<uint32_t>([&](uint32_t* gentlVersionMajor) {
376 return PEAK_C_ABI_PREFIX PEAK_System_GetGenTLVersionMajor(m_backendHandle, gentlVersionMajor);
377 });
378}
379
380inline uint32_t System::GenTLVersionMinor() const
381{
382 return QueryNumericFromCInterfaceFunction<uint32_t>([&](uint32_t* gentlVersionMinor) {
383 return PEAK_C_ABI_PREFIX PEAK_System_GetGenTLVersionMinor(m_backendHandle, gentlVersionMinor);
384 });
385}
386
388{
389 return static_cast<peak::core::CharacterEncoding>(
390 QueryNumericFromCInterfaceFunction<PEAK_CHARACTER_ENCODING>(
391 [&](PEAK_CHARACTER_ENCODING* characterEncoding) {
392 return PEAK_C_ABI_PREFIX PEAK_System_GetCharacterEncoding(m_backendHandle, characterEncoding);
393 }));
394}
395
396inline void System::UpdateInterfaces(Timeout timeout_ms)
397{
398 InitializeUpdateMechanismIfNecessary();
399
400 CallAndCheckCInterfaceFunction(
401 [&] { return PEAK_C_ABI_PREFIX PEAK_System_UpdateInterfaces(m_backendHandle, timeout_ms); });
402}
403
404inline std::vector<std::shared_ptr<InterfaceDescriptor>> System::Interfaces() const
405{
406 std::lock_guard<std::mutex> lock(m_interfacesMutex);
407 return m_interfaces;
408}
409
410inline std::shared_ptr<ProducerLibrary> System::ParentLibrary() const
411{
412 return LockOrThrow(m_parentLibrary);
413}
414
416 const System::InterfaceFoundCallback& callback)
417{
418 return reinterpret_cast<InterfaceFoundCallbackHandle>(
419 m_interfaceFoundCallbackManager->RegisterCallback(InterfaceFoundCallbackContainer{ shared_from_this(),
420 [callback](const std::shared_ptr<InterfaceDescriptor>& foundInterface) { callback(foundInterface); } }));
421}
422
424{
425 m_interfaceFoundCallbackManager->UnregisterCallback(
426 reinterpret_cast<PEAK_INTERFACE_FOUND_CALLBACK_HANDLE>(callbackHandle));
427}
428
430 const System::InterfaceLostCallback& callback)
431{
432 return reinterpret_cast<InterfaceLostCallbackHandle>(m_interfaceLostCallbackManager->RegisterCallback(callback));
433}
434
436{
437 m_interfaceLostCallbackManager->UnregisterCallback(
438 reinterpret_cast<PEAK_INTERFACE_LOST_CALLBACK_HANDLE>(callbackHandle));
439}
440
441inline void PEAK_CALL_CONV System::InterfaceFoundCallbackCWrapper(
442 PEAK_INTERFACE_DESCRIPTOR_HANDLE foundInterface, void* context)
443{
444 auto callbackContainer = static_cast<InterfaceFoundCallbackContainer*>(context);
445
446 auto interfaceDescriptor = callbackContainer->System_.lock()->GetOrAddFoundInterface(foundInterface);
447
448 callbackContainer->Callback(interfaceDescriptor);
449}
450
451inline void PEAK_CALL_CONV System::InterfaceLostCallbackCWrapper(
452 const char* lostInterfaceId, size_t lostInterfaceIdSize, void* context)
453{
454 auto callback = static_cast<System::InterfaceLostCallback*>(context);
455
456 callback->operator()(std::string(lostInterfaceId, lostInterfaceIdSize - 1));
457}
458
459inline std::shared_ptr<InterfaceDescriptor> System::GetOrAddFoundInterface(
461{
462 std::lock_guard<std::mutex> lock(m_interfacesMutex);
463
464 const auto interfaceKey = QueryStringFromCInterfaceFunction([&](char* key, size_t* keySize) {
465 return PEAK_C_ABI_PREFIX PEAK_InterfaceDescriptor_GetKey(foundInterface, key, keySize);
466 });
467 auto keyInterfacePairIterator = m_interfacesByKey.find(interfaceKey);
468 if (keyInterfacePairIterator == m_interfacesByKey.end())
469 {
470 auto interfaceDescriptor = std::static_pointer_cast<InterfaceDescriptor>(
471 std::make_shared<ClassCreator<InterfaceDescriptor>>(
472 foundInterface, std::weak_ptr<System>{ shared_from_this() }));
473 m_interfaces.emplace_back(interfaceDescriptor);
474 m_interfacesByKey.emplace(interfaceKey, interfaceDescriptor);
475 m_interfacesKeyById.emplace(interfaceDescriptor->ID(), interfaceKey);
476
477 return interfaceDescriptor;
478 }
479
480 return keyInterfacePairIterator->second;
481}
482
484{
485 auto moduleHandle = QueryNumericFromCInterfaceFunction<PEAK_MODULE_HANDLE>(
486 [&](PEAK_MODULE_HANDLE* _moduleHandle) {
487 return PEAK_C_ABI_PREFIX PEAK_System_ToModule(m_backendHandle, _moduleHandle);
488 });
489
490 return moduleHandle;
491}
492
494{
495 auto eventSupportingModuleHandle = QueryNumericFromCInterfaceFunction<PEAK_EVENT_SUPPORTING_MODULE_HANDLE>(
496 [&](PEAK_EVENT_SUPPORTING_MODULE_HANDLE* _eventSupportingModuleHandle) {
498 m_backendHandle, _eventSupportingModuleHandle);
499 });
500
501 return eventSupportingModuleHandle;
502}
503
504inline void System::InitializeUpdateMechanismIfNecessary()
505{
506 std::call_once(m_updateMechanismInitializedFlag, [&] {
507 (void)RegisterInterfaceFoundCallback([](const std::shared_ptr<InterfaceDescriptor>&) {
508 // Registering an empty callback is enough since InterfaceFoundCallbackCWrapper() handles everything else.
509 });
510 (void)RegisterInterfaceLostCallback([&](const std::string& lostInterfaceId) {
511 std::lock_guard<std::mutex> lock(m_interfacesMutex);
512 const auto lostInterfaceKey = m_interfacesKeyById.at(lostInterfaceId);
513 m_interfaces.erase(std::remove_if(std::begin(m_interfaces), std::end(m_interfaces),
514 [lostInterfaceKey](const std::shared_ptr<InterfaceDescriptor>& interface_) {
515 return interface_->Key() == lostInterfaceKey;
516 }),
517 std::end(m_interfaces));
518 m_interfacesByKey.erase(lostInterfaceKey);
519 m_interfacesKeyById.erase(lostInterfaceId);
520 });
521 });
522}
523
524} /* namespace core */
525} /* namespace peak */
virtual PEAK_EVENT_SUPPORTING_MODULE_HANDLE EventSupportingModuleHandle() const =0
The base class for all exceptions thrown by the library.
Definition peak_exception.hpp:28
virtual PEAK_MODULE_HANDLE ModuleHandle() const =0
Represents a GenTL producer library (CTI).
Definition peak_producer_library.hpp:40
uint32_t GenTLVersionMajor() const
Returns the GenTL major version of the GenTL producer library this system belongs to.
Definition peak_system.hpp:373
void UnregisterInterfaceLostCallback(InterfaceLostCallbackHandle callbackHandle)
Unregisters a interface lost callback.
Definition peak_system.hpp:435
std::string TLType() const
Returns the TL (transport layer) type.
Definition peak_system.hpp:352
void UpdateInterfaces(Timeout timeout_ms)
Searches for interfaces.
Definition peak_system.hpp:396
std::function< void(const std::shared_ptr< InterfaceDescriptor > &foundInterface)> InterfaceFoundCallback
Definition peak_system.hpp:55
std::string CTIFileName() const
Returns the file name of the GenTL producer library this system belongs to.
Definition peak_system.hpp:359
void UnregisterInterfaceFoundCallback(InterfaceFoundCallbackHandle callbackHandle)
Unregisters a interface found callback.
Definition peak_system.hpp:423
std::string CTIFullPath() const
Returns the full path of the GenTL producer library this system belongs to.
Definition peak_system.hpp:366
System(const System &other)=delete
InterfaceLostCallback * InterfaceLostCallbackHandle
Definition peak_system.hpp:61
std::string DisplayName() const
Returns the display name.
Definition peak_system.hpp:324
InterfaceFoundCallbackHandle RegisterInterfaceFoundCallback(const InterfaceFoundCallback &callback)
Registers a callback for signaling a found interface.
Definition peak_system.hpp:415
uint32_t GenTLVersionMinor() const
Returns the GenTL minor version of the GenTL producer library this system belongs to.
Definition peak_system.hpp:380
std::string Version() const
Returns the version.
Definition peak_system.hpp:345
System(System &&other)=delete
InterfaceLostCallbackHandle RegisterInterfaceLostCallback(const InterfaceLostCallback &callback)
Registers a callback for signaling a lost interface.
Definition peak_system.hpp:429
~System() override
Definition peak_system.hpp:292
std::string ID() const
Returns the ID.
Definition peak_system.hpp:317
peak::core::CharacterEncoding CharacterEncoding() const
Returns the character encoding of the GenTL producer library this system belongs to.
Definition peak_system.hpp:387
InterfaceFoundCallback * InterfaceFoundCallbackHandle
Definition peak_system.hpp:57
std::shared_ptr< ProducerLibrary > ParentLibrary() const
Returns the parent library.
Definition peak_system.hpp:410
System & operator=(const System &other)=delete
std::vector< std::shared_ptr< InterfaceDescriptor > > Interfaces() const
Returns the interface list.
Definition peak_system.hpp:404
std::string ModelName() const
Returns the model name.
Definition peak_system.hpp:338
std::function< void(const std::string &lostInterfaceId)> InterfaceLostCallback
Definition peak_system.hpp:59
System & operator=(System &&other)=delete
std::string VendorName() const
Returns the vendor name.
Definition peak_system.hpp:331
std::string Key() const
Returns the unique key.
Definition peak_system.hpp:305
RawInformation Info(int32_t infoCommand) const
Delivers information based on the given GenTL info command.
Definition peak_system.hpp:310
Represents a timeout value in milliseconds.
Definition peak_timeout.hpp:32
The "core" namespace contains the direct GenAPI and GenTL wrapper.
Definition peak_buffer.hpp:34
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:35
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