Inscoper::Bridge¶
The Bridge class is the main class of The Inscoper API. More...
#include <Inscoper.h>
Public Functions¶
| Name | |
|---|---|
| Bridge() Default constructor. |
|
| virtual | ~Bridge() Default destructor. |
| void | setLibraryPaths(const std::vector< std::string > & libraryPaths) Set the library paths where to find external libraries (MicroManager, Custom driver etc). |
| void | loadConfigFile(const std::string & path ="") Load configuration based on its file path. |
| Inscoper::ConfigPtr | readConfigFile(const std::string & path ="") Read the configuration file and return the corresponding configuration. |
| void | loadConfig(const Inscoper::ConfigPtr & config) Load the configuration. |
| void | saveConfig(const std::string & path, const Inscoper::ConfigPtr & config) Save the configuration to an XML file. |
| void | saveCurrentConfig(const std::string & path ="") Save the current loaded configuration to an XML file. |
| std::vector< Inscoper::RecipePtr > | readRecipeFile(const std::string & path ="") Read the recipe file and return the list of corresponding recipes. |
| void | saveRecipes(const std::string & path, const std::vector< Inscoper::RecipePtr > & recipes) Save the list of recipes to an XML file. |
| void | initDevices() Initialize all the loaded devices. |
| void | initDevice(const std::string & deviceId) Initialize a specific device. |
| void | initDevices(const std::vector< std::string > & deviceIdList) Initialize a list of devices. |
| std::vector< std::string > | getLoadedDevices() Get the list of IDs of all loaded devices. |
| std::vector< std::string > | getInitializedDevices() Get the list of IDs of all initialized devices. |
| std::vector< Inscoper::SubDeviceId > | getInitializedSubDeviceIds() Get the list of sub-device IDs for all initialized sub-devices. |
| bool | closeDevices() Close all the loaded devices. |
| bool | closeDevice(const std::string & deviceId) Close a specific device. |
| bool | closeDevices(const std::vector< std::string > & deviceIdList) Close a list of devices. |
| void | close() Close all the initialized devices, loaded drivers and more. |
| std::vector< Inscoper::DeviceDescriptionPtr > | getDeviceDescriptionList() Get the device description list of all the available drivers (Inscoper Box, Micro Manager and Custom drivers). |
| std::vector< Inscoper::DeviceDescriptionPtr > | loadDeviceDescriptionList(const std::string & filename) Load the device description list from a file. |
| void | saveDeviceDescriptionList(const std::vector< Inscoper::DeviceDescriptionPtr > & deviceDescriptionList, const std::string & filename) Save the device description list to a file. |
| Inscoper::StatusPtr | loadSequence(unsigned short sequenceNumber, const std::string & recipeName, const std::string & paramsFile, const Inscoper::StatusPtr & currentStatus =nullptr, int printIndex =-1, Inscoper::SequenceHandlerPtr handler =nullptr) Load a sequence with user params. |
| Inscoper::StatusPtr | loadSequence(unsigned short sequenceNumber, const std::string & recipeName, const std::vector< Inscoper::DimensionPtr > & dimensionList, const Inscoper::StatusPtr & currentStatus =nullptr, int printIndex =-1, Inscoper::SequenceHandlerPtr handler =nullptr) Load a sequence with dimensions. |
| Inscoper::StatusPtr | loadSequence(unsigned short sequenceNumber, const std::string & recipeName, const std::vector< Inscoper::StatusPtr > & statusList, const Inscoper::StatusPtr & currentStatus =nullptr, int printIndex =-1, Inscoper::SequenceHandlerPtr handler =nullptr) Load a sequence with status list. |
| void | runSequence(unsigned short sequenceNumber, bool async =false) Run a preloaded sequence. |
| void | waitUntilSequenceFinished(unsigned short sequenceNumber) Wait for the sequence to finish. |
| void | pauseSequence(unsigned short sequenceNumber) Pause the running sequence. |
| void | continueSequence(unsigned short sequenceNumber) Continue the paused sequence. |
| void | stopSequence(unsigned short sequenceNumber) Stop the running sequence. |
| void | removeSequence(unsigned short sequenceNumber) Remove the loaded sequence. |
| void | modifySequence(unsigned short sequenceNumber, const std::vector< unsigned int > & modifierIndexes) Modify the loaded sequence. |
| Inscoper::StatusPtr | addBackgroundSequence(unsigned short sequenceIndex, const std::string & recipeName, const std::string & paramsFile) Add a background sequence with params file. |
| Inscoper::StatusPtr | addBackgroundSequence(unsigned short sequenceIndex, const std::string & recipeName, const std::vector< Inscoper::DimensionPtr > & dimensionList) Add a background sequence with dimension list. |
| Inscoper::StatusPtr | addBackgroundSequence(unsigned short sequenceIndex, const std::string & recipeName, const std::vector< Inscoper::StatusPtr > & statusList) Add a background sequence with status list. |
| void | removeBackgroundSequence(unsigned short sequenceIndex) Remove a background sequence. |
| void | addSequenceListener(Inscoper::SequenceListener * listener) Add a sequence listener to the API. |
| void | removeSequenceListener(Inscoper::SequenceListener * listener) Remove a sequence listener from the API. |
| void | addAbstractSubDevice(Inscoper::AbstractSubDevice * subDevice) Add an abstract sub device. |
| void | removeAbstractSubDevice(const Inscoper::SubDeviceId & subDeviceId) Remove an abstract sub device. |
| Inscoper::CameraPtr | getCamera(const std::string & id) Get a camera device. |
| bool | isHardwareCropAvailable(const std::string & id) Check if hardware crop is available for a camera. |
| void | setHardwareCrop(const std::string & id, const std::vector< Inscoper::RoiCrop > & crops) Set hardware crop for a camera. |
| std::vector< Inscoper::RoiCrop > | getHardwareCrop(const std::string & id) Get the current hardware crop configuration for a camera. |
| void | createTimeDevice(unsigned short index, const char * startRecipeId =nullptr, const char * waitRecipeId =nullptr) Create a time device. |
| Inscoper::SubDeviceId | getStartTimerSubDeviceId(unsigned short index) Get the sub-device ID for the start timer. |
| Inscoper::SubDeviceId | getWaitTimerSubDeviceId(unsigned short index) Get the sub-device ID for the wait timer. |
| Inscoper::DiagResultsPtr | runDeviceDiagnosis(const Inscoper::DeviceDescriptionPtr & deviceDesc, const Inscoper::DriverConfigPtr & driverConfig) Run diagnosis on a device. |
| void | saveDiagResults(const Inscoper::DiagResultsPtr & diagResults, const std::string & filename) Save diagnosis results to a file. |
| Inscoper::DiagResultsPtr | loadDiagResults(const std::string & filename) Load diagnosis results from a file. |
| void | saveDiagResultsList(const std::vector< Inscoper::DiagResultsPtr > & diagResultsList, const std::string & filename) Save a list of diagnosis results to a file. |
| std::vector< Inscoper::DiagResultsPtr > | loadDiagResultsList(const std::string & filename) Load a list of diagnosis results from a file. |
| std::vector< Inscoper::SubDeviceId > | getValueConditionChildren(const Inscoper::SubDeviceId & subDeviceId, const std::string & recipeName) Get the list of child sub-device IDs for a value condition. |
| std::vector< Inscoper::SubDeviceId > | getValueConditionParents(const Inscoper::SubDeviceId & subDeviceId, const std::string & recipeName) Get the list of parent sub-device IDs for a value condition. |
| std::vector< Inscoper::SubDeviceId > | getValueConditionSiblings(const Inscoper::SubDeviceId & subDeviceId, const std::string & recipeName) Get the list of sibling sub-device IDs for a value condition. |
| std::vector< Inscoper::SubDeviceId > | getCallConditionSubDeviceIdList(const Inscoper::SubDeviceId & subDeviceId, const std::string & recipeName) Get the list of sub-device IDs for a call condition. |
| std::vector< std::string > | getCustomDriverAvailableDevices(const std::string & driverName) Get available devices for a custom driver. |
| void | addFunctionListener(Inscoper::FunctionListener * listener) Add a function listener to the API. |
| void | addFunctionListener(Inscoper::FunctionListener * listener, const std::string & deviceId) Add a function listener for a specific device. |
| void | addFunctionListener(Inscoper::FunctionListener * listener, const Inscoper::SubDeviceId & subDeviceId) Add a function listener for a specific sub-device. |
| void | addFunctionListener(Inscoper::FunctionListener * listener, const Inscoper::SubDeviceId & subDeviceId, Inscoper::EFunctionType functionType) Add a function listener for a specific sub-device and function type. |
| void | removeFunctionListener(Inscoper::FunctionListener * listener) Remove a function listener from the API. |
| bool | hasGetFunction(const Inscoper::SubDeviceId & subDeviceId) Check if a sub-device has a GET function. |
| bool | hasSetFunction(const Inscoper::SubDeviceId & subDeviceId) Check if a sub-device has a SET function. |
| bool | hasCheckFunction(const Inscoper::SubDeviceId & subDeviceId) Check if a sub-device has a CHECK function. |
| void | setValue(const Inscoper::SubDeviceId & subDeviceId) Call the SET function of the sub-device without parameters. |
| void | setValue(const Inscoper::SubDeviceId & subDeviceId, const std::string & value) Call the SET function of the sub-device with a string parameter. |
| void | setValue(const Inscoper::SubDeviceId & subDeviceId, unsigned char value) Call the SET function of the sub-device with an unsigned char parameter. |
| void | setValue(const Inscoper::SubDeviceId & subDeviceId, char value) Call the SET function of the Sub Device with a char parameter. |
| void | setValue(const Inscoper::SubDeviceId & subDeviceId, unsigned short value) Call the SET function of the sub-device with an unsigned short parameter. |
| void | setValue(const Inscoper::SubDeviceId & subDeviceId, short value) Call the SET function of the sub-device with a short parameter. |
| void | setValue(const Inscoper::SubDeviceId & subDeviceId, unsigned int value) Call the SET function of the sub-device with an unsigned int parameter. |
| void | setValue(const Inscoper::SubDeviceId & subDeviceId, int value) Call the SET function of the sub-device with an int parameter. |
| void | setValue(const Inscoper::SubDeviceId & subDeviceId, unsigned long long int value) Call the SET function of the sub-device with an unsigned long long parameter. |
| void | setValue(const Inscoper::SubDeviceId & subDeviceId, long long int value) Call the SET function of the sub-device with a long long parameter. |
| void | setValue(const Inscoper::SubDeviceId & subDeviceId, float value) Call the SET function of the sub-device with a float parameter. |
| void | setValue(const Inscoper::SubDeviceId & subDeviceId, double value) Call the SET function of the sub-device with a double parameter. |
| std::string | getStringValue(const Inscoper::SubDeviceId & subDeviceId) Call the GET function of the sub-device returning a string. |
| unsigned char | getUnsignedCharValue(const Inscoper::SubDeviceId & subDeviceId) Call the GET function of the sub-device returning an unsigned char. |
| char | getCharValue(const Inscoper::SubDeviceId & subDeviceId) Call the GET function of the sub-device returning a char. |
| unsigned short | getUnsignedShortValue(const Inscoper::SubDeviceId & subDeviceId) Call the GET function of the sub-device returning an unsigned short. |
| short | getShortValue(const Inscoper::SubDeviceId & subDeviceId) Call the GET function of the sub-device returning a short. |
| unsigned int | getUnsignedIntValue(const Inscoper::SubDeviceId & subDeviceId) Call the GET function of the sub-device returning an unsigned int. |
| int | getIntValue(const Inscoper::SubDeviceId & subDeviceId) Call the GET function of the sub-device returning an int. |
| unsigned long long int | getUnsignedLongValue(const Inscoper::SubDeviceId & subDeviceId) Call the GET function of the sub-device returning an unsigned long long. |
| long long int | getLongValue(const Inscoper::SubDeviceId & subDeviceId) Call the GET function of the sub-device returning a long long. |
| float | getFloatValue(const Inscoper::SubDeviceId & subDeviceId) Call the GET function of the sub-device returning a float. |
| double | getDoubleValue(const Inscoper::SubDeviceId & subDeviceId) Call the GET function of the sub-device returning a double. |
| Inscoper::StatusParamPtr | getValue(const Inscoper::StatusParamPtr & param) Get the value of a status parameter. |
| void | checkValue(const Inscoper::SubDeviceId & subDeviceId) Call the CHECK function of the sub-device without parameters. |
| void | checkValue(const Inscoper::SubDeviceId & subDeviceId, const std::string & value) Call the CHECK function of the sub-device with a string parameter. |
| void | checkValue(const Inscoper::SubDeviceId & subDeviceId, unsigned char value) Call the CHECK function of the sub-device with an unsigned char parameter. |
| void | checkValue(const Inscoper::SubDeviceId & subDeviceId, char value) Call the CHECK function of the sub-device with a char parameter. |
| void | checkValue(const Inscoper::SubDeviceId & subDeviceId, unsigned short value) Call the CHECK function of the sub-device with an unsigned short parameter. |
| void | checkValue(const Inscoper::SubDeviceId & subDeviceId, short value) Call the CHECK function of the sub-device with a short parameter. |
| void | checkValue(const Inscoper::SubDeviceId & subDeviceId, unsigned int value) Call the CHECK function of the sub-device with an unsigned int parameter. |
| void | checkValue(const Inscoper::SubDeviceId & subDeviceId, int value) Call the CHECK function of the sub-device with an int parameter. |
| void | checkValue(const Inscoper::SubDeviceId & subDeviceId, unsigned long long int value) Call the CHECK function of the sub-device with an unsigned long long parameter. |
| void | checkValue(const Inscoper::SubDeviceId & subDeviceId, long long int value) Call the CHECK function of the sub-device with a long long parameter. |
| void | checkValue(const Inscoper::SubDeviceId & subDeviceId, float value) Call the CHECK function of the sub-device with a float parameter. |
| void | checkValue(const Inscoper::SubDeviceId & subDeviceId, double value) Call the CHECK function of the sub-device with a double parameter. |
| std::vector< Inscoper::SubDeviceId > | getModifiedSubDevices(const std::string & deviceId) Get the list of modified sub-devices for a loaded device. |
| bool | isAccessibleInSequence(const Inscoper::SubDeviceId & subDeviceId) Check if the sub-device is accessible in sequence. |
| void | setClampMode(bool clampMode) Set clamp mode. |
| bool | hasMaxValue(const Inscoper::SubDeviceId & subDeviceId) Check if the sub-device has a max value constraint. |
| bool | hasMinValue(const Inscoper::SubDeviceId & subDeviceId) Check if the sub-device has a min value constraint. |
| bool | hasStepValue(const Inscoper::SubDeviceId & subDeviceId) Check if the sub-device has a step value constraint. |
| bool | hasListValue(const Inscoper::SubDeviceId & subDeviceId) Check if the sub-device has a list value constraint. |
| bool | isReadOnly(const Inscoper::SubDeviceId & subDeviceId) Check if the sub-device is read-only. |
| double | getMaxValue(const Inscoper::SubDeviceId & subDeviceId) Get the max value constraint of the sub-device. |
| double | getMinValue(const Inscoper::SubDeviceId & subDeviceId) Get the min value constraint of the sub-device. |
| double | getStepValue(const Inscoper::SubDeviceId & subDeviceId) Get the step value constraint of the sub-device. |
| std::vector< std::string > | getListValue(const Inscoper::SubDeviceId & subDeviceId) Get the list of possible values (Deprecated). |
| const std::map< std::string, std::string > | getKeyValueMap(const Inscoper::SubDeviceId & subDeviceId) const Get the map of key-value pairs for list constraints. |
| Inscoper::EParamType | getParamType(const Inscoper::SubDeviceId & subDeviceId) Get the parameter type of the sub-device. |
| void | saveStatusListToXML(const std::string & xmlfilename, const std::vector< Inscoper::StatusPtr > & statusList) Save a list of statuses to an XML file. |
| void | saveDimensionListToXML(const std::string & xmlfilename, const std::vector< Inscoper::DimensionPtr > & dimensionList) Save a list of dimensions to an XML file. |
| Inscoper::StatusPtr | getCurrentStatus() Get the current status. |
| Inscoper::StatusPtr | getCurrentStatus(const Inscoper::SubDeviceId & subDeviceId) Get the current status for a specific sub-device. |
| Inscoper::StatusPtr | getCurrentStatus(const std::vector< Inscoper::SubDeviceId > & subDeviceList) Get the current status for a list of sub-devices. |
| void | getCurrentStatus(Inscoper::CurrentStatusAction * action) Get the current status through an action handler. |
| void | getCurrentStatus(const Inscoper::SubDeviceId & subDeviceId, Inscoper::CurrentStatusAction * action) Get the current status for a specific sub-device through an action handler. |
| void | getCurrentStatus(const std::vector< Inscoper::SubDeviceId > & subDeviceList, Inscoper::CurrentStatusAction * action) Get the current status for a list of sub-devices through an action handler. |
| void | setCurrentStatus(const Inscoper::StatusPtr & status, bool async =false) Set the current status. |
| std::vector< Inscoper::StatusPtr > | getStatusList(const std::vector< Inscoper::DimensionPtr > & dimensions) Convert a dimension list to a list of status. |
| void | addImageListener(Inscoper::ImageListener * listener, const char * cameraId =nullptr) Add an image listener. |
| void | removeImageListener(Inscoper::ImageListener * listener, const char * cameraId =nullptr) Remove an image listener. |
| void | removeImageListener(const char * cameraId) Remove an image listener by camera ID. |
| void | saveImages(const std::string & filename, const std::vector< Inscoper::ImagePtr > & images) Save a list of images to a file. |
| std::vector< Inscoper::ImagePtr > | loadImages(const std::string & filename) Load a list of images from a file. |
| std::string | getVersion() Get the current version of the API. |
| std::string | getFirmwareVersion() Get the Firmware version of the connected Inscoper Box if available. |
| void | initLogger(Inscoper::ELogMode mode, Inscoper::ELogLevel level, const char * filename =nullptr, Inscoper::LogListener * listener =nullptr) Init the API logger. |
| void | setLogLevel(Inscoper::ELogLevel level) Set the log level. |
| void | removeLogListener(Inscoper::LogListener * listener) Remove a log listener. |
| Inscoper::ELogLevel | getLogLevel() Get the log level of the application. |
| void | initInscoperBoxLogger(Inscoper::ELogMode mode, Inscoper::ELogLevel level, const char * filename =nullptr, Inscoper::LogListener * listener =nullptr) Init the Inscoper Box logger. |
| void | setInscoperBoxLogLevel(Inscoper::ELogLevel level) Set the log level of the Inscoper Box. |
| void | removeInscoperBoxLogListener(Inscoper::LogListener * listener) Remove an Inscoper Box log listener. |
| Inscoper::ELogLevel | getInscoperBoxLogLevel() Get the log level of the Inscoper Box firmware. |
| void | setLogDirectory(const std::string & path) Set the log directory path. |
| void | addErrorListener(Inscoper::ErrorListener * listener) Add an error listener. |
| void | removeErrorListener(Inscoper::ErrorListener * listener) Remove an error listener. |
| void | updateFirmware(const std::string & firmwarePath) Update the InscoperBox firmware. |
| bool | connectToInscoperBox() Connect to the Inscoper Box. |
| bool | disconnectToInscoperBox() Disconnect from the Inscoper Box. |
| bool | isConnectedToInscoperBox() Check if connected to the Inscoper Box. |
| void | restartInscoperBox() Restart the Inscoper Box. |
| std::vector< Inscoper::UsbInfo > | getInscoperBoxUsbView() Get the USB view of the Inscoper Box. |
| void | resetInscoperBoxUsbView(double secondsToWaitBeforeReconnection) Reset the Inscoper Box USB view. |
| Inscoper::EBoxType | getInscoperBoxType() Get the type of the Inscoper Box. |
| bool | checkLicense() Check if the license is valid. |
| void | setLicensePath(const std::string & path) Set the path to the license file. |
| bool | hasLicenseOption(const std::string & option) Check if a specific license option is available. |
| bool | hasLicenseExpirationDate() Check if the license has an expiration date. |
| unsigned int | getLicenseDaysLeft() Get the number of days left on the license. |
| Inscoper::SubDeviceId | getRunSequenceSubDeviceId() Get the "Run Sequence" sub-device ID. |
Detailed Description¶
The Bridge class is the main class of The Inscoper API.
It is the entry point for most applications.
Public Functions Documentation¶
function Bridge¶
Default constructor.
Constructs the Bridge object.
function ~Bridge¶
Default destructor.
Destroys the Bridge.
function setLibraryPaths¶
Set the library paths where to find external libraries (MicroManager, Custom driver etc).
Parameters:
- libraryPaths : The list of library paths
Sets the paths to search for external libraries.
function loadConfigFile¶
Load configuration based on its file path.
Parameters:
- path : The directory path where the file config.xml is located
Exceptions:
- InscoperException if an error occurred
Loads the configuration from the specified file path.
function readConfigFile¶
Read the configuration file and return the corresponding configuration.
Parameters:
- path : The directory path where the file config.xml is located
Exceptions:
- InscoperException if an error occurred
Return: The configuration
Reads and parses the configuration file.
function loadConfig¶
Load the configuration.
Parameters:
- config : The configuration
Exceptions:
- InscoperException if an error occurred
Loads the provided configuration.
function saveConfig¶
Save the configuration to an XML file.
Parameters:
- path : The path where, to save the configuration. The path could be either the directory path of XML file (in this case, the XML file name will be 'config.xml') or the XML file itself
- config : The configuration to save
Exceptions:
- InscoperException if an error occurred
Saves the provided configuration to the specified path.
function saveCurrentConfig¶
Save the current loaded configuration to an XML file.
Parameters:
- path : The path where, to save the configuration. The path could be either the directory path of XML file (in this case, the XML file name will be 'config.xml') or the XML file itself
Exceptions:
- InscoperException if an error occurred
Saves the currently loaded configuration to the specified path.
function readRecipeFile¶
Read the recipe file and return the list of corresponding recipes.
Parameters:
- path : The directory path where the file recipe.xml is located
Exceptions:
- InscoperException if an error occurred
Return: The list of the recipes
Parses the recipe XML file and creates a list of recipes.
function saveRecipes¶
Save the list of recipes to an XML file.
Parameters:
- path : The path where, to save the recipes. The path could be either the directory path of XML file (in this case, the XML file name will be 'recipe.xml') or the XML file itself
- recipes : The list of the recipes
Exceptions:
- InscoperException if an error occurred
Serializes the provided list of recipes to the specified file.
function initDevices¶
Initialize all the loaded devices.
Exceptions:
- InscoperException if an error occurred
Iterates through all loaded devices and initializes them sequentially.
function initDevice¶
Initialize a specific device.
Parameters:
- deviceId : The ID of the device to initialize
Exceptions:
- InscoperException if an error occurred
Initializes the device with the specified ID.
function initDevices¶
Initialize a list of devices.
Parameters:
- deviceIdList : The list of device IDs to initialize
Exceptions:
- InscoperException if an error occurred
Initializes the devices specified in the list sequentially.
function getLoadedDevices¶
Get the list of IDs of all loaded devices.
Return: The list of device ID strings
Retrieves the IDs of devices that are currently loaded into memory.
function getInitializedDevices¶
Get the list of IDs of all initialized devices.
Return: The list of device ID strings
Retrieves the IDs of devices that have been successfully initialized.
function getInitializedSubDeviceIds¶
Get the list of sub-device IDs for all initialized sub-devices.
Return: The list of sub-device IDs
Retrieves the sub-device IDs for every initialized sub-device component.
function closeDevices¶
Close all the loaded devices.
Exceptions:
- InscoperException if an error occurred
Return: True if successful, false otherwise
Shuts down all loaded devices.
function closeDevice¶
Close a specific device.
Parameters:
- deviceId : The ID of the device to close
Return: True if successful, false otherwise
Shuts down the device with the specified ID.
function closeDevices¶
Close a list of devices.
Parameters:
- deviceIdList : The list of device IDs to close
Return: True if successful, false otherwise
Shuts down the devices specified in the list.
function close¶
Close all the initialized devices, loaded drivers and more.
Exceptions:
- InscoperException if an error occurred
Performs a complete shutdown of the system, including drivers and initialized devices.
function getDeviceDescriptionList¶
Get the device description list of all the available drivers (Inscoper Box, Micro Manager and Custom drivers).
Exceptions:
- InscoperException if an error occurred
Return: The list of device descriptions
Retrieves the descriptions for all drivers currently available in the system.
function loadDeviceDescriptionList¶
std::vector< Inscoper::DeviceDescriptionPtr > loadDeviceDescriptionList(
const std::string & filename
)
Load the device description list from a file.
Parameters:
- filename : The path to the file containing device descriptions
Exceptions:
- InscoperException if an error occurred
Return: The list of device descriptions
Parses the specified file to load device descriptions.
function saveDeviceDescriptionList¶
void saveDeviceDescriptionList(
const std::vector< Inscoper::DeviceDescriptionPtr > & deviceDescriptionList,
const std::string & filename
)
Save the device description list to a file.
Parameters:
- deviceDescriptionList : The list of device descriptions to save
- filename : The destination file path
Exceptions:
- InscoperException if an error occurred
Serializes the provided list of device descriptions to the specified file.
function loadSequence¶
Inscoper::StatusPtr loadSequence(
unsigned short sequenceNumber,
const std::string & recipeName,
const std::string & paramsFile,
const Inscoper::StatusPtr & currentStatus =nullptr,
int printIndex =-1,
Inscoper::SequenceHandlerPtr handler =nullptr
)
Load a sequence with user params.
Parameters:
- sequenceNumber : The sequence number
- recipeName : The recipe name described in the recipe.xml file
- paramsFile : The name of the file containing user params. The file can be either a StatusList file or a Dimensions file
- currentStatus : The current status of the microscope (optional)
- printIndex : The index for printing (default -1)
- handler : The sequence handler (optional)
Exceptions:
- InscoperException if an error occurred
Return: The sequence status
Loads a sequence using the provided user parameters file.
function loadSequence¶
Inscoper::StatusPtr loadSequence(
unsigned short sequenceNumber,
const std::string & recipeName,
const std::vector< Inscoper::DimensionPtr > & dimensionList,
const Inscoper::StatusPtr & currentStatus =nullptr,
int printIndex =-1,
Inscoper::SequenceHandlerPtr handler =nullptr
)
Load a sequence with dimensions.
Parameters:
- sequenceNumber : The sequence number
- recipeName : The recipe name described in the recipe.xml file
- dimensionList : The list of dimensions
- currentStatus : The current status of the microscope (optional)
- printIndex : The index for printing (default -1)
- handler : The sequence handler (optional)
Exceptions:
- InscoperException if an error occurred
Return: The sequence status
Loads a sequence using the provided list of dimensions.
function loadSequence¶
Inscoper::StatusPtr loadSequence(
unsigned short sequenceNumber,
const std::string & recipeName,
const std::vector< Inscoper::StatusPtr > & statusList,
const Inscoper::StatusPtr & currentStatus =nullptr,
int printIndex =-1,
Inscoper::SequenceHandlerPtr handler =nullptr
)
Load a sequence with status list.
Parameters:
- sequenceNumber : The sequence number
- recipeName : The recipe name described in the recipe.xml file
- statusList : The list of status
- currentStatus : The current status of the microscope (optional)
- printIndex : The index for printing (default -1)
- handler : The sequence handler (optional)
Exceptions:
- InscoperException if an error occurred
Return: The sequence status
Loads a sequence using the provided list of statuses.
function runSequence¶
Run a preloaded sequence.
Parameters:
- sequenceNumber : The sequence number to run
- async : True if you want the function to be asynchronous. You will need to call waitUntilSequenceFinished later to know when the sequence is finished
Exceptions:
- InscoperException if an error occurred
Executes the sequence identified by the sequence number.
function waitUntilSequenceFinished¶
Wait for the sequence to finish.
Parameters:
- sequenceNumber : The sequence number
Exceptions:
- InscoperException if an error occurred
Blocks execution until the specified sequence has completed.
function pauseSequence¶
Pause the running sequence.
Parameters:
- sequenceNumber : The sequence number
Exceptions:
- InscoperException if an error occurred
Pauses the execution of the specified sequence.
function continueSequence¶
Continue the paused sequence.
Parameters:
- sequenceNumber : The sequence number
Exceptions:
- InscoperException if an error occurred
Resumes the execution of the specified sequence.
function stopSequence¶
Stop the running sequence.
Parameters:
- sequenceNumber : The sequence number
Exceptions:
- InscoperException if an error occurred
Stops the execution of the specified sequence.
function removeSequence¶
Remove the loaded sequence.
Parameters:
- sequenceNumber : The sequence number
Exceptions:
- InscoperException if an error occurred
Unloads and removes the specified sequence from memory.
function modifySequence¶
void modifySequence(
unsigned short sequenceNumber,
const std::vector< unsigned int > & modifierIndexes
)
Modify the loaded sequence.
Parameters:
- sequenceNumber : The sequence number
- modifierIndexes : The list of param to modify
Exceptions:
- InscoperException if an error occurred
Modifies the sequence using the specified modifier indexes.
function addBackgroundSequence¶
Inscoper::StatusPtr addBackgroundSequence(
unsigned short sequenceIndex,
const std::string & recipeName,
const std::string & paramsFile
)
Add a background sequence with params file.
Parameters:
- sequenceIndex : The sequence number (or index)
- recipeName : The name of the recipe
- paramsFile : The path to the file containing parameters
Exceptions:
- InscoperException if an error occurred
Return: The status of the newly added sequence
Adds a background sequence using a parameters file.
function addBackgroundSequence¶
Inscoper::StatusPtr addBackgroundSequence(
unsigned short sequenceIndex,
const std::string & recipeName,
const std::vector< Inscoper::DimensionPtr > & dimensionList
)
Add a background sequence with dimension list.
Parameters:
- sequenceIndex : The sequence number (or index)
- recipeName : The name of the recipe
- dimensionList : The list of dimensions for the sequence
Exceptions:
- InscoperException if an error occurred
Return: The status of the newly added sequence
Adds a background sequence using a list of dimensions.
function addBackgroundSequence¶
Inscoper::StatusPtr addBackgroundSequence(
unsigned short sequenceIndex,
const std::string & recipeName,
const std::vector< Inscoper::StatusPtr > & statusList
)
Add a background sequence with status list.
Parameters:
- sequenceIndex : The sequence number (or index)
- recipeName : The name of the recipe
- statusList : The list of statuses for the sequence
Exceptions:
- InscoperException if an error occurred
Return: The status of the newly added sequence
Adds a background sequence using a list of statuses.
function removeBackgroundSequence¶
Remove a background sequence.
Parameters:
- sequenceIndex : The sequence number (or index)
Exceptions:
- InscoperException if an error occurred
Removes the specified background sequence.
function addSequenceListener¶
Add a sequence listener to the API.
Parameters:
- listener : The listener to add
Registers a listener for sequence events.
function removeSequenceListener¶
Remove a sequence listener from the API.
Parameters:
- listener : The listener to remove
Unregisters a previously added sequence listener.
function addAbstractSubDevice¶
Add an abstract sub device.
Parameters:
- subDevice : The abstract sub-device to add
Exceptions:
- InscoperException if an error occurred
Adds an abstract sub-device to the system.
function removeAbstractSubDevice¶
Remove an abstract sub device.
Parameters:
- subDeviceId : The ID of the sub device to remove
Exceptions:
- InscoperException if an error occurred
Removes an abstract sub-device from the system.
function getCamera¶
Get a camera device.
Parameters:
- id : The camera ID
Exceptions:
- InscoperException if an error occurred
Return: The camera
Retrieves the camera device with the specified ID.
function isHardwareCropAvailable¶
Check if hardware crop is available for a camera.
Parameters:
- id : The camera ID
Exceptions:
- InscoperException if an error occurred
Return: True if hardware crop is available, false otherwise
Determines if the specified camera supports hardware cropping.
function setHardwareCrop¶
Set hardware crop for a camera.
Parameters:
- id : The camera ID
- crops : The list of crop regions (ROIs)
Exceptions:
- InscoperException if an error occurred
Configures the hardware crop settings for the specified camera.
function getHardwareCrop¶
Get the current hardware crop configuration for a camera.
Parameters:
- id : The camera ID
Exceptions:
- InscoperException if an error occurred
Return: The list of current crop regions (ROIs)
Retrieves the current hardware crop settings for the specified camera.
function createTimeDevice¶
void createTimeDevice(
unsigned short index,
const char * startRecipeId =nullptr,
const char * waitRecipeId =nullptr
)
Create a time device.
Parameters:
- index : The index of the time device
- startRecipeId : The ID of the start recipe (optional)
- waitRecipeId : The ID of the wait recipe (optional)
Exceptions:
- InscoperException if an error occurred
Creates a new time device with the specified index.
function getStartTimerSubDeviceId¶
Get the sub-device ID for the start timer.
Parameters:
- index : The index of the timer
Exceptions:
- InscoperException if an error occurred
Return: The sub-device ID of the start timer
Retrieves the sub-device ID associated with the start timer.
function getWaitTimerSubDeviceId¶
Get the sub-device ID for the wait timer.
Parameters:
- index : The index of the timer
Exceptions:
- InscoperException if an error occurred
Return: The sub-device ID of the wait timer
Retrieves the sub-device ID associated with the wait timer.
function runDeviceDiagnosis¶
Inscoper::DiagResultsPtr runDeviceDiagnosis(
const Inscoper::DeviceDescriptionPtr & deviceDesc,
const Inscoper::DriverConfigPtr & driverConfig
)
Run diagnosis on a device.
Parameters:
- deviceDesc : The device description
- driverConfig : The driver configuration
Exceptions:
- InscoperException if an error occurred
Return: The diagnosis results
Executes a diagnosis sequence on the specified device.
function saveDiagResults¶
Save diagnosis results to a file.
Parameters:
- diagResults : The diagnosis results to save
- filename : The file path to save to
Saves the provided diagnosis results to the specified file.
function loadDiagResults¶
Load diagnosis results from a file.
Parameters:
- filename : The file path to load from
Return: The loaded diagnosis results
Loads diagnosis results from the specified file.
function saveDiagResultsList¶
void saveDiagResultsList(
const std::vector< Inscoper::DiagResultsPtr > & diagResultsList,
const std::string & filename
)
Save a list of diagnosis results to a file.
Parameters:
- diagResultsList : The list of diagnosis results
- filename : The file path to save to
Saves the provided list of diagnosis results to the specified file.
function loadDiagResultsList¶
Load a list of diagnosis results from a file.
Parameters:
- filename : The file path to load from
Return: The list of loaded diagnosis results
Loads a list of diagnosis results from the specified file.
function getValueConditionChildren¶
std::vector< Inscoper::SubDeviceId > getValueConditionChildren(
const Inscoper::SubDeviceId & subDeviceId,
const std::string & recipeName
)
Get the list of child sub-device IDs for a value condition.
Parameters:
- subDeviceId : The parent sub-device ID
- recipeName : The recipe name
Exceptions:
- InscoperException if an error occurred
Return: The list of child sub-device IDs
Retrieves the child sub-device IDs associated with a value condition.
function getValueConditionParents¶
std::vector< Inscoper::SubDeviceId > getValueConditionParents(
const Inscoper::SubDeviceId & subDeviceId,
const std::string & recipeName
)
Get the list of parent sub-device IDs for a value condition.
Parameters:
- subDeviceId : The child sub-device ID
- recipeName : The recipe name
Exceptions:
- InscoperException if an error occurred
Return: The list of parent sub-device IDs
Retrieves the parent sub-device IDs associated with a value condition.
function getValueConditionSiblings¶
std::vector< Inscoper::SubDeviceId > getValueConditionSiblings(
const Inscoper::SubDeviceId & subDeviceId,
const std::string & recipeName
)
Get the list of sibling sub-device IDs for a value condition.
Parameters:
- subDeviceId : The sub-device ID
- recipeName : The recipe name
Exceptions:
- InscoperException if an error occurred
Return: The list of sibling sub-device IDs
Retrieves the sibling sub-device IDs associated with a value condition.
function getCallConditionSubDeviceIdList¶
std::vector< Inscoper::SubDeviceId > getCallConditionSubDeviceIdList(
const Inscoper::SubDeviceId & subDeviceId,
const std::string & recipeName
)
Get the list of sub-device IDs for a call condition.
Parameters:
- subDeviceId : The sub-device ID
- recipeName : The recipe name
Exceptions:
- InscoperException if an error occurred
Return: The list of sub-device IDs involved in the call condition
Retrieves the sub-device IDs associated with a call condition.
function getCustomDriverAvailableDevices¶
Get available devices for a custom driver.
Parameters:
- driverName : The name of the custom driver
Exceptions:
- InscoperException if an error occurred
Return: The list of available device names
Retrieves the list of available devices for the specified custom driver.
function addFunctionListener¶
Add a function listener to the API.
Parameters:
- listener : The listener to add
Registers a listener for function events.
function addFunctionListener¶
Add a function listener for a specific device.
Parameters:
- listener : The listener to add
- deviceId : The device ID to listen to
Registers a listener for function events on a specific device.
function addFunctionListener¶
void addFunctionListener(
Inscoper::FunctionListener * listener,
const Inscoper::SubDeviceId & subDeviceId
)
Add a function listener for a specific sub-device.
Parameters:
- listener : The listener to add
- subDeviceId : The sub-device ID to listen to
Registers a listener for function events on a specific sub-device.
function addFunctionListener¶
void addFunctionListener(
Inscoper::FunctionListener * listener,
const Inscoper::SubDeviceId & subDeviceId,
Inscoper::EFunctionType functionType
)
Add a function listener for a specific sub-device and function type.
Parameters:
- listener : The listener to add
- subDeviceId : The sub-device ID to listen to
- functionType : The type of function to listen to
Registers a listener for specific function types on a sub-device.
function removeFunctionListener¶
Remove a function listener from the API.
Parameters:
- listener : The listener to remove
Unregisters a previously added function listener.
function hasGetFunction¶
Check if a sub-device has a GET function.
Parameters:
- subDeviceId : The sub-device ID
Exceptions:
- InscoperException if an error occurred
Return: True if it has a GET function, false otherwise
Determines if the sub-device supports the GET operation.
function hasSetFunction¶
Check if a sub-device has a SET function.
Parameters:
- subDeviceId : The sub-device ID
Exceptions:
- InscoperException if an error occurred
Return: True if it has a SET function, false otherwise
Determines if the sub-device supports the SET operation.
function hasCheckFunction¶
Check if a sub-device has a CHECK function.
Parameters:
- subDeviceId : The sub-device ID
Exceptions:
- InscoperException if an error occurred
Return: True if it has a CHECK function, false otherwise
Determines if the sub-device supports the CHECK operation.
function setValue¶
Call the SET function of the sub-device without parameters.
Parameters:
- subDeviceId : The sub-device ID of the sub-device
Exceptions:
- InscoperException if an error occurred
Executes the SET command on the sub-device with no arguments.
function setValue¶
Call the SET function of the sub-device with a string parameter.
Parameters:
- subDeviceId : The sub-device ID of the sub-device
- value : The string representation of the value
Exceptions:
- InscoperException if an error occurred
Executes the SET command on the sub-device with a string value.
function setValue¶
Call the SET function of the sub-device with an unsigned char parameter.
Parameters:
- subDeviceId : The sub-device ID of the sub-device
- value : The unsigned char value
Exceptions:
- InscoperException if an error occurred
Executes the SET command on the sub-device with an unsigned char value.
function setValue¶
Call the SET function of the Sub Device with a char parameter.
Parameters:
- subDeviceId : The sub-device ID of the sub-device
- value : The char value
Exceptions:
- InscoperException if an error occurred
Executes the SET command on the sub-device with a char value.
function setValue¶
Call the SET function of the sub-device with an unsigned short parameter.
Parameters:
- subDeviceId : The sub-device ID of the sub-device
- value : The unsigned short value
Exceptions:
- InscoperException if an error occurred
Executes the SET command on the sub-device with an unsigned short value.
function setValue¶
Call the SET function of the sub-device with a short parameter.
Parameters:
- subDeviceId : The sub-device ID of the sub-device
- value : The short value
Exceptions:
- InscoperException if an error occurred
Executes the SET command on the sub-device with a short value.
function setValue¶
Call the SET function of the sub-device with an unsigned int parameter.
Parameters:
- subDeviceId : The sub-device ID of the sub-device
- value : The unsigned int value
Exceptions:
- InscoperException if an error occurred
Executes the SET command on the sub-device with an unsigned int value.
function setValue¶
Call the SET function of the sub-device with an int parameter.
Parameters:
- subDeviceId : The sub-device ID
- value : The int value
Exceptions:
- InscoperException if an error occurred
Executes the SET command on the sub-device with an int value.
function setValue¶
Call the SET function of the sub-device with an unsigned long long parameter.
Parameters:
- subDeviceId : The sub-device ID of the sub-device
- value : The unsigned long long int value
Exceptions:
- InscoperException if an error occurred
Executes the SET command on the sub-device with an unsigned long long value.
function setValue¶
Call the SET function of the sub-device with a long long parameter.
Parameters:
- subDeviceId : The sub-device ID
- value : The long long int value
Exceptions:
- InscoperException if an error occurred
Executes the SET command on the sub-device with a long long value.
function setValue¶
Call the SET function of the sub-device with a float parameter.
Parameters:
- subDeviceId : The sub-device ID
- value : The float value
Exceptions:
- InscoperException if an error occurred
Executes the SET command on the sub-device with a float value.
function setValue¶
Call the SET function of the sub-device with a double parameter.
Parameters:
- subDeviceId : The sub-device ID
- value : The double value
Exceptions:
- InscoperException if an error occurred
Executes the SET command on the sub-device with a double value.
function getStringValue¶
Call the GET function of the sub-device returning a string.
Parameters:
- subDeviceId : The sub-device ID
Exceptions:
- InscoperException if an error occurred
Return: The standard string value
Executes the GET command on the sub-device and returns a string.
function getUnsignedCharValue¶
Call the GET function of the sub-device returning an unsigned char.
Parameters:
- subDeviceId : The sub-device ID
Exceptions:
- InscoperException if an error occurred
Return: The unsigned char value
Executes the GET command on the sub-device and returns an unsigned char.
function getCharValue¶
Call the GET function of the sub-device returning a char.
Parameters:
- subDeviceId : The sub-device ID
Exceptions:
- InscoperException if an error occurred
Return: The char value
Executes the GET command on the sub-device and returns a char.
function getUnsignedShortValue¶
Call the GET function of the sub-device returning an unsigned short.
Parameters:
- subDeviceId : The sub-device ID
Exceptions:
- InscoperException if an error occurred
Return: The unsigned short value
Executes the GET command on the sub-device and returns an unsigned short.
function getShortValue¶
Call the GET function of the sub-device returning a short.
Parameters:
- subDeviceId : The sub-device ID
Exceptions:
- InscoperException if an error occurred
Return: The short value
Executes the GET command on the sub-device and returns a short.
function getUnsignedIntValue¶
Call the GET function of the sub-device returning an unsigned int.
Parameters:
- subDeviceId : The sub-device ID
Exceptions:
- InscoperException if an error occurred
Return: The unsigned int value
Executes the GET command on the sub-device and returns an unsigned int.
function getIntValue¶
Call the GET function of the sub-device returning an int.
Parameters:
- subDeviceId : The sub-device ID
Exceptions:
- InscoperException if an error occurred
Return: The int value
Executes the GET command on the sub-device and returns an int.
function getUnsignedLongValue¶
Call the GET function of the sub-device returning an unsigned long long.
Parameters:
- subDeviceId : The sub-device ID
Exceptions:
- InscoperException if an error occurred
Return: The unsigned long long int value
Executes the GET command on the sub-device and returns an unsigned long long.
function getLongValue¶
Call the GET function of the sub-device returning a long long.
Parameters:
- subDeviceId : The sub-device ID
Exceptions:
- InscoperException if an error occurred
Return: The long long int value
Executes the GET command on the sub-device and returns a long long.
function getFloatValue¶
Call the GET function of the sub-device returning a float.
Parameters:
- subDeviceId : The sub-device ID
Exceptions:
- InscoperException if an error occurred
Return: The float value
Executes the GET command on the sub-device and returns a float.
function getDoubleValue¶
Call the GET function of the sub-device returning a double.
Parameters:
- subDeviceId : The sub-device ID
Exceptions:
- InscoperException if an error occurred
Return: The double value
Executes the GET command on the sub-device and returns a double.
function getValue¶
Get the value of a status parameter.
Parameters:
- param : The status parameter to get the value from
Exceptions:
- InscoperException if an error occurred
Return: The updated status parameter
Retrieves the value from the specified status parameter.
function checkValue¶
Call the CHECK function of the sub-device without parameters.
Parameters:
- subDeviceId : The sub-device ID
Exceptions:
- InscoperException if an error occurred
Executes the CHECK command on the sub-device with no arguments.
function checkValue¶
Call the CHECK function of the sub-device with a string parameter.
Parameters:
- subDeviceId : The sub-device ID
- value : The string representation of the value
Exceptions:
- InscoperException if an error occurred
Executes the CHECK command on the sub-device with a string value.
function checkValue¶
Call the CHECK function of the sub-device with an unsigned char parameter.
Parameters:
- subDeviceId : The sub-device ID
- value : The unsigned char value
Exceptions:
- InscoperException if an error occurred
Executes the CHECK command on the sub-device with an unsigned char value.
function checkValue¶
Call the CHECK function of the sub-device with a char parameter.
Parameters:
- subDeviceId : The sub-device ID
- value : The char value
Exceptions:
- InscoperException if an error occurred
Executes the CHECK command on the sub-device with a char value.
function checkValue¶
Call the CHECK function of the sub-device with an unsigned short parameter.
Parameters:
- subDeviceId : The sub-device ID
- value : The unsigned short value
Exceptions:
- InscoperException if an error occurred
Executes the CHECK command on the sub-device with an unsigned short value.
function checkValue¶
Call the CHECK function of the sub-device with a short parameter.
Parameters:
- subDeviceId : The sub-device ID
- value : The short value
Exceptions:
- InscoperException if an error occurred
Executes the CHECK command on the sub-device with a short value.
function checkValue¶
Call the CHECK function of the sub-device with an unsigned int parameter.
Parameters:
- subDeviceId : The sub-device ID
- value : The unsigned int value
Exceptions:
- InscoperException if an error occurred
Executes the CHECK command on the sub-device with an unsigned int value.
function checkValue¶
Call the CHECK function of the sub-device with an int parameter.
Parameters:
- subDeviceId : The sub-device ID
- value : The int value
Exceptions:
- InscoperException if an error occurred
Executes the CHECK command on the sub-device with an int value.
function checkValue¶
Call the CHECK function of the sub-device with an unsigned long long parameter.
Parameters:
- subDeviceId : The sub-device ID
- value : The unsigned long long int value
Exceptions:
- InscoperException if an error occurred
Executes the CHECK command on the sub-device with an unsigned long long value.
function checkValue¶
Call the CHECK function of the sub-device with a long long parameter.
Parameters:
- subDeviceId : The sub-device ID
- value : The long long int value
Exceptions:
- InscoperException if an error occurred
Executes the CHECK command on the sub-device with a long long value.
function checkValue¶
Call the CHECK function of the sub-device with a float parameter.
Parameters:
- subDeviceId : The sub-device ID
- value : The float value
Exceptions:
- InscoperException if an error occurred
Executes the CHECK command on the sub-device with a float value.
function checkValue¶
Call the CHECK function of the sub-device with a double parameter.
Parameters:
- subDeviceId : The sub-device ID
- value : The double value
Exceptions:
- InscoperException if an error occurred
Executes the CHECK command on the sub-device with a double value.
function getModifiedSubDevices¶
Get the list of modified sub-devices for a loaded device.
Parameters:
- deviceId : The device ID
Return: The list of modified sub-device IDs
Retrieves the list of sub-device IDs that have been modified for the specified device.
function isAccessibleInSequence¶
Check if the sub-device is accessible in sequence.
Parameters:
- subDeviceId : The sub-device ID
Exceptions:
- InscoperException if an error occurred
Return: True if accessible, false otherwise
Determines if the sub-device can be accessed within a sequence.
function setClampMode¶
Set clamp mode.
Parameters:
- clampMode : True to enable clamp mode, false otherwise
Enables or disables clamp mode.
function hasMaxValue¶
Check if the sub-device has a max value constraint.
Parameters:
- subDeviceId : The sub-device ID
Exceptions:
- InscoperException if an error occurred
Return: True if it has a max value, false otherwise
Determines if the sub-device has a maximum value limit.
function hasMinValue¶
Check if the sub-device has a min value constraint.
Parameters:
- subDeviceId : The sub-device ID
Exceptions:
- InscoperException if an error occurred
Return: True if it has a min value, false otherwise
Determines if the sub-device has a minimum value limit.
function hasStepValue¶
Check if the sub-device has a step value constraint.
Parameters:
- subDeviceId : The sub-device ID
Exceptions:
- InscoperException if an error occurred
Return: True if it has a step value, false otherwise
Determines if the sub-device has a step value constraint.
function hasListValue¶
Check if the sub-device has a list value constraint.
Parameters:
- subDeviceId : The sub-device ID
Exceptions:
- InscoperException if an error occurred
Return: True if it has a list value, false otherwise
Determines if the sub-device has a restricted list of values.
function isReadOnly¶
Check if the sub-device is read-only.
Parameters:
- subDeviceId : The sub-device ID
Exceptions:
- InscoperException if an error occurred
Return: True if read-only, false otherwise
Determines if the sub-device is read-only.
function getMaxValue¶
Get the max value constraint of the sub-device.
Parameters:
- subDeviceId : The sub-device ID
Exceptions:
- InscoperException if an error occurred
Return: The maximum value
Retrieves the maximum allowed value for the sub-device.
function getMinValue¶
Get the min value constraint of the sub-device.
Parameters:
- subDeviceId : The sub-device ID
Exceptions:
- InscoperException if an error occurred
Return: The minimum value
Retrieves the minimum allowed value for the sub-device.
function getStepValue¶
Get the step value constraint of the sub-device.
Parameters:
- subDeviceId : The sub-device ID
Exceptions:
- InscoperException if an error occurred
Return: The step value
Retrieves the step value constraint for the sub-device.
function getListValue¶
Get the list of possible values (Deprecated).
Parameters:
- subDeviceId : The sub-device ID
Exceptions:
- InscoperException if an error occurred
Return: The list of value strings
Retrieves the list of allowed values for the sub-device (deprecated).
function getKeyValueMap¶
const std::map< std::string, std::string > getKeyValueMap(
const Inscoper::SubDeviceId & subDeviceId
) const
Get the map of key-value pairs for list constraints.
Parameters:
- subDeviceId : The sub-device ID
Exceptions:
- InscoperException if an error occurred
Return: The map of key-value pairs
Retrieves the map of allowed key-value pairs for the sub-device.
function getParamType¶
Get the parameter type of the sub-device.
Parameters:
- subDeviceId : The sub-device ID
Exceptions:
- InscoperException if an error occurred
Return: The parameter type
Retrieves the parameter type of the sub-device.
function saveStatusListToXML¶
void saveStatusListToXML(
const std::string & xmlfilename,
const std::vector< Inscoper::StatusPtr > & statusList
)
Save a list of statuses to an XML file.
Parameters:
- xmlfilename : The path of the xml file
- statusList : The status list to save
Exceptions:
- InscoperException if an error occurred
Serializes the provided list of statuses to the specified XML file.
function saveDimensionListToXML¶
void saveDimensionListToXML(
const std::string & xmlfilename,
const std::vector< Inscoper::DimensionPtr > & dimensionList
)
Save a list of dimensions to an XML file.
Parameters:
- xmlfilename : The path of the xml file
- dimensionList : The dimension list to save
Exceptions:
- InscoperException if an error occurred
Serializes the provided list of dimensions to the specified XML file.
function getCurrentStatus¶
Get the current status.
Exceptions:
- InscoperException if an error occurred
Return: The current status
Retrieves the current status of the microscope.
function getCurrentStatus¶
Get the current status for a specific sub-device.
Parameters:
- subDeviceId : The sub-device ID to get status for
Exceptions:
- InscoperException if an error occurred
Return: The current status containing only the specified sub-device
Retrieves the current status of the specified sub-device.
function getCurrentStatus¶
Get the current status for a list of sub-devices.
Parameters:
- subDeviceList : The list of sub-devices to get status for
Exceptions:
- InscoperException if an error occurred
Return: The current status containing the specified sub-devices
Retrieves the current status of the specified list of sub-devices.
function getCurrentStatus¶
Get the current status through an action handler.
Parameters:
- action : The action handler to receive the status parameters
Exceptions:
- InscoperException if an error occurred
Retrieves the current status using an action handler.
function getCurrentStatus¶
void getCurrentStatus(
const Inscoper::SubDeviceId & subDeviceId,
Inscoper::CurrentStatusAction * action
)
Get the current status for a specific sub-device through an action handler.
Parameters:
- subDeviceId : The sub-device ID
- action : The action handler
Exceptions:
- InscoperException if an error occurred
Retrieves the current status of a sub-device using an action handler.
function getCurrentStatus¶
void getCurrentStatus(
const std::vector< Inscoper::SubDeviceId > & subDeviceList,
Inscoper::CurrentStatusAction * action
)
Get the current status for a list of sub-devices through an action handler.
Parameters:
- subDeviceList : The list of sub-devices
- action : The action handler
Exceptions:
- InscoperException if an error occurred
Retrieves the current status of a list of sub-devices using an action handler.
function setCurrentStatus¶
Set the current status.
Parameters:
- status : The status to set
- async : If true, set status asynchronously (default false)
Exceptions:
- InscoperException if an error occurred
Sets the status of the microscope.
function getStatusList¶
std::vector< Inscoper::StatusPtr > getStatusList(
const std::vector< Inscoper::DimensionPtr > & dimensions
)
Convert a dimension list to a list of status.
Parameters:
- dimensions : The dimension list to convert
Return: The converted status list
Converts a list of dimensions into a list of statuses.
function addImageListener¶
Add an image listener.
Parameters:
- listener : The listener to add
- cameraId : The camera ID linked to the listener. If null, all cameras are linked
Registers a listener for image events.
function removeImageListener¶
Remove an image listener.
Parameters:
- listener : The listener to remove
- cameraId : The camera ID (optional)
Unregisters a previously added image listener.
function removeImageListener¶
Remove an image listener by camera ID.
Parameters:
- cameraId : The camera ID
Unregisters all image listeners associated with the specified camera ID.
function saveImages¶
Save a list of images to a file.
Parameters:
- filename : The destination file path
- images : The list of images to save
Exceptions:
- InscoperException if an error occurred
Saves the provided list of images to the specified file.
function loadImages¶
Load a list of images from a file.
Parameters:
- filename : The source file path
Exceptions:
- InscoperException if an error occurred
Return: The list of loaded images
Loads a list of images from the specified file.
function getVersion¶
Get the current version of the API.
Return: The current version of the API
Retrieves the version string of the installed API.
function getFirmwareVersion¶
Get the Firmware version of the connected Inscoper Box if available.
Exceptions:
- InscoperException if an error occurred
Return: The string containing Generic Firmware version + Library version
Retrieves the firmware version string from the Inscoper Box.
function initLogger¶
void initLogger(
Inscoper::ELogMode mode,
Inscoper::ELogLevel level,
const char * filename =nullptr,
Inscoper::LogListener * listener =nullptr
)
Init the API logger.
Parameters:
- mode : The log mode (can be combined with bitwise OR)
- level : The log Level
- filename : The filename of the log file if the file log mode is chosen
- listener : The listener if the listener log mode is chosen
Exceptions:
- InscoperException if an error occurred
Initializes the logging system for the API.
function setLogLevel¶
Set the log level.
Parameters:
- level : The log level (TRACE, DEBUG, INFO, WARN, ERROR)
Sets the current logging level for the API.
function removeLogListener¶
Remove a log listener.
Parameters:
- listener : The listener to remove
Unregisters a previously added log listener.
function getLogLevel¶
Get the log level of the application.
Return: The current log level
Retrieves the current logging level of the API.
function initInscoperBoxLogger¶
void initInscoperBoxLogger(
Inscoper::ELogMode mode,
Inscoper::ELogLevel level,
const char * filename =nullptr,
Inscoper::LogListener * listener =nullptr
)
Init the Inscoper Box logger.
Parameters:
- mode : The log mode (can be combined with bitwise OR)
- level : The log Level
- filename : The filename of the log file if the file log mode is chosen
- listener : The listener if the listener log mode is chosen
Exceptions:
- InscoperException if an error occurred
Initializes the logging system for the Inscoper Box.
function setInscoperBoxLogLevel¶
Set the log level of the Inscoper Box.
Parameters:
- level : The log level (TRACE, DEBUG, INFO, WARN, ERROR)
Sets the logging level for the Inscoper Box firmware.
function removeInscoperBoxLogListener¶
Remove an Inscoper Box log listener.
Parameters:
- listener : The listener to remove
Unregisters a previously added log listener for the Inscoper Box.
function getInscoperBoxLogLevel¶
Get the log level of the Inscoper Box firmware.
Return: The log level
Retrieves the current logging level of the Inscoper Box.
function setLogDirectory¶
Set the log directory path.
Parameters:
- path : The directory path
Sets the directory where log files will be stored.
function addErrorListener¶
Add an error listener.
Parameters:
- listener : The listener to add
Registers a listener for error events.
function removeErrorListener¶
Remove an error listener.
Parameters:
- listener : The listener to remove
Unregisters a previously added error listener.
function updateFirmware¶
Update the InscoperBox firmware.
Parameters:
- firmwarePath : The path to the new firmware file
Exceptions:
- InscoperException if an error occurred
Updates the firmware of the Inscoper Box using the specified file.
function connectToInscoperBox¶
Connect to the Inscoper Box.
Exceptions:
- InscoperException if an error occurred
Return: True if successful, false otherwise
Establishes a connection to the Inscoper Box.
function disconnectToInscoperBox¶
Disconnect from the Inscoper Box.
Exceptions:
- InscoperException if an error occurred
Return: True if successful, false otherwise
Closes the connection to the Inscoper Box.
function isConnectedToInscoperBox¶
Check if connected to the Inscoper Box.
Exceptions:
- InscoperException if an error occurred
Return: True if connected, false otherwise
Determines if the API is currently connected to the Inscoper Box.
function restartInscoperBox¶
Restart the Inscoper Box.
Exceptions:
- InscoperException if an error occurred
Restarts the Inscoper Box device.
function getInscoperBoxUsbView¶
Get the USB view of the Inscoper Box.
Exceptions:
- InscoperException if an error occurred
Return: The list of USB information
Retrieves information about USB devices connected to the Inscoper Box.
function resetInscoperBoxUsbView¶
Reset the Inscoper Box USB view.
Parameters:
- secondsToWaitBeforeReconnection : The time in seconds to wait before reconnecting
Exceptions:
- InscoperException if an error occurred
Resets the USB view of the Inscoper Box and waits before reconnection.
function getInscoperBoxType¶
Get the type of the Inscoper Box.
Exceptions:
- InscoperException if an error occurred
Return: The box type
Retrieves the hardware type of the connected Inscoper Box.
function checkLicense¶
Check if the license is valid.
Exceptions:
- InscoperException if an error occurred
Return: True if valid, false otherwise
Verifies the validity of the current software license.
function setLicensePath¶
Set the path to the license file.
Parameters:
- path : The license file path
Sets the path to the file containing the license information.
function hasLicenseOption¶
Check if a specific license option is available.
Parameters:
- option : The option name
Exceptions:
- InscoperException if an error occurred
Return: True if available, false otherwise
Determines if the specified license option is enabled.
function hasLicenseExpirationDate¶
Check if the license has an expiration date.
Return: True if it has an expiration date, false otherwise
Determines if the license has an expiration date.
function getLicenseDaysLeft¶
Get the number of days left on the license.
Return: The number of days left
Retrieves the number of days remaining until license expiration.
function getRunSequenceSubDeviceId¶
Get the "Run Sequence" sub-device ID.
Return: The sub-device ID used for running sequences
Retrieves the sub-device ID used for coordinating sequence execution.
Updated on 2026-04-02 at 10:55:35 +0200