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