ENLIGHTEN
Cross-platform desktop GUI for Wasatch Photonics spectrometers
Loading...
Searching...
No Matches
firmware_update.cpp File Reference

This application demonstrates how to update the firmware of devices using a .guf file. More...

#include <cstddef>
#include <iostream>
#include <iomanip>
#include <peak/peak.hpp>
Include dependency graph for firmware_update.cpp:

Classes

struct  DeviceUpdateInformation
 

Macros

#define VERSION   "1.0.1"
 

Functions

std::vector< DeviceUpdateInformationFindCompatibleDevices (const peak::DeviceManager &deviceManager, peak::core::FirmwareUpdater &updater, const char *gufPath)
 Find connected devices that can be updated using the provided .guf file at gufPath.
 
int main (int argc, const char *argv[])
 
void RegisterObserverCallbacks (peak::core::FirmwareUpdateProgressObserver &observer, const DeviceUpdateInformation &update)
 Register message callbacks on the update observer, so we get notified about firmware update status changes.
 
void wait_for_enter ()
 

Detailed Description

This application demonstrates how to update the firmware of devices using a .guf file.

Author
IDS Imaging Development Systems GmbH
Date
2024-07-12
Version
1.0.1

Copyright (C) 2024 - 2025, IDS Imaging Development Systems GmbH.

The information in this document is subject to change without notice and should not be construed as a commitment by IDS Imaging Development Systems GmbH. IDS Imaging Development Systems GmbH does not assume any responsibility for any errors that may appear in this document.

This document, or source code, is provided solely as an example of how to utilize IDS Imaging Development Systems GmbH software libraries in a sample application. IDS Imaging Development Systems GmbH does not assume any responsibility for the use or reliability of any portion of this document.

General permission to copy or modify is hereby granted.

Macro Definition Documentation

◆ VERSION

#define VERSION   "1.0.1"

Function Documentation

◆ FindCompatibleDevices()

std::vector< DeviceUpdateInformation > FindCompatibleDevices ( const peak::DeviceManager & deviceManager,
peak::core::FirmwareUpdater & updater,
const char * gufPath )

Find connected devices that can be updated using the provided .guf file at gufPath.

Returns
A vector of devices and their corresponding updateinformation for the latest version contained in the .guf file.

◆ main()

int main ( int argc,
const char * argv[] )

◆ RegisterObserverCallbacks()

void RegisterObserverCallbacks ( peak::core::FirmwareUpdateProgressObserver & observer,
const DeviceUpdateInformation & update )

Register message callbacks on the update observer, so we get notified about firmware update status changes.

◆ wait_for_enter()

void wait_for_enter ( )

\bief Wait for enter function

The function waits for the user pressing the enter key.

This function is called from main() whenever the program exits, either in consequence of an error or after normal termination.