This class contains functions associated with the hardware component (serial number, system temperature, watchdog, firmware updates).
The behavior of this class is different in comparison to other device classes, because it can be opened more than once the same time. Note that the library functions are thread safe but not process safe.
The following table lists the supported features for different hardware components:
Platform | Hardware component (see eHardwareType) | Generic system type eSystemType | Supported features | ||||
---|---|---|---|---|---|---|---|
Serial Number[1] | Temperature Status | Fan Status and Control | Watchdog | Firmware Update | |||
VisionBox AGE-X1 | Mainboard | SYST_BASEBOARD | AGEXyymm0xxxxx | yes | yes (control) | yes | yes |
VisionBox AGE-X2 | Mainboard | SYST_BASEBOARD | AGEXyymm1xxxxx | yes | no | yes | yes |
Smart NIC | SYST_NETWORK | NIC0yymmxxxxxx | no | no | no | yes | |
Camera Link | SYST_CL | CL00yymmxxxxxx | no | no | no | yes | |
VisionBox AGE-X3 | I/O board | SYST_BASEBOARD | AGEXyymm2xxxxx | no | no | yes | yes |
VisionBox AGE-X4[2] | Mainboard | SYST_BASEBOARD | AGEXyymm3xxxxx | yes | yes (status) | yes | no |
VisionBox AGE-X5 | Mainboard | SYST_BASEBOARD | AGEXyymm4xxxxx | no | no | yes | yes |
Smart NIC | SYST_NETWORK | no | no | no | no | yes | |
Camera Link | SYST_CL | no | no | no | no | yes | |
VisionBox LE MANS[2] | Mainboard | SYST_BASEBOARD | LMNSyymmxxxxxx | yes | no | yes | yes |
VisionBox DAYTONA | Mainboard | SYST_BASEBOARD | DTNAyymmxxxxxx | yes | no | yes | yes |
VisionBox AI | Mainboard | SYST_BASEBOARD | VBAIyymmxxxxxx | yes | no | yes | yes |
VisionBoards | Machine Vision Controller | SYST_INTERNAL_PCI | MVC0yymmxxxxxx | no | no | no | yes |
PCIe Smart NIC board | SYST_NETWORK | NIC1yymmxxxxxx | no | no | no | yes | |
PCIe Camera Link board | SYST_CL | CL01yymmxxxxxx | no | no | no | yes | |
VisionCam XM | Mainboard | SYST_BASEBOARD | VCXMyymm0xxxxx | yes | no | yes | no |
VisionCam XM2 | Mainboard | SYST_BASEBOARD | VCXMyymm1xxxxx | yes | no | yes | no |
VisionSensor PV / PV2 | Mainboard | SYST_BASEBOARD | VSPVyymm0xxxxx | yes | no | no | no |
VisionSensor PV3 | Mainboard | SYST_BASEBOARD | VSPVyymm1xxxxx | yes | no | yes[3] | no |
Machine Vision Manager | USB device | SYST_EXTERNAL_USB | MVM0yymmxxxxxx | no | no | yes[4] | yes |
Machine Vision Manager 2 | USB device | SYST_EXTERNAL_USB | MVM2yymmxxxxxx | no | no | yes[4] | yes |
The function GetSerialNumber() returns the serial number for the associated hardware component.
The serial number consists of a null-terminated string. The string format is listed in the table above for the different hardware entities.
The temperature of the mainboard can be read with GetSystemTemperature().
Depending on the hardware configuration, the VisionBox AGE-X1 and AGE-X4 can have one or more fans installed.
The VisionBox AGE-X4 supports reading the number of fan channels with GetFanNumberOfChannels() and reading the fan speed with GetFanSpeed().
The VisionBox AGE-X1 supports adjustment of the target temperature for the fan regulation circuit by SetFanTargetTemperature().
The Watchdog can be used to reset the system if the function WatchdogService() is not called within a time period specified by WatchdogSetup().
Starting with firmware version ≥ 1.0.0.37, the Watchdog can alternatively be used to reset only the Multiplexer to the default state (all output lines off), see SERVICE_WDT_RESET_TYPE. The function WatchdogHasFired() can then be used to check the state of the watchdog.
Firmware updates are normally provided by IMAGO as separate packages which can be executed on the system. The function FirmwareUpdate() can alternatively be used to update the firmware within the user application.
This function is not supported by the following platforms. The firmware is provided as Debian packages instead:
Public Types | |
enum | SERVICE_WDT_RESET_TYPE |
Configures the reset behavior of the watchdog, used by WatchdogSetup() More... | |
Public Member Functions | |
bool | FirmwareUpdate (const unsigned char *pFirmwareData, const size_t FileSize) |
Executes an update of the firmware for the hardware entity. More... | |
bool | GetFanNumberOfChannels (unsigned int &NumberOfChannels) |
Returns the number of possible fan channels. More... | |
bool | GetFanSpeed (const unsigned int ChannelIndex, unsigned int &RPM) |
Return the current fan speed for the given index. More... | |
bool | GetSerialNumber (char pSerialnumber[32]) |
Returns the serial number for the hardware component. More... | |
bool | GetSystemTemperature (float &fTemperature) |
Returns system temperature. More... | |
bool | Reset () |
Resets the device to default settings. More... | |
Service () | |
Default constructor for the device object More... | |
bool | SetFanTargetTemperature (unsigned int Temperature) |
Sets the target temperature of the fan regulation. More... | |
bool | WatchdogHasFired (bool &HasFired) |
Returns the state of the Watchdog. More... | |
bool | WatchdogService () |
Sends a signal to the FPGA which resets the watchdog timer. More... | |
bool | WatchdogSetup (bool boEnable, unsigned int msTimeout) |
Configures the FPGA watchdog. More... | |
bool | WatchdogSetup (bool boEnable, unsigned int msTimeout, SERVICE_WDT_RESET_TYPE ResetType) |
Configures the watchdog and the reset behavior. More... | |
Public Member Functions inherited from VIB::iDevice | |
bool | Close () |
Closes a device More... | |
iDevice (const iDevice &device) | |
The copy constructor makes a copy of the existing device object More... | |
bool | isOpen (bool &state) |
Returns the open state of a device object More... | |
bool | Open (unsigned int Index=0) |
Opens a device More... | |
iDevice & | operator= (const iDevice &device) |
The assignment operator makes a copy of the existing device object More... | |
virtual | ~iDevice () |
Deletes the device object More... | |
Configures the reset behavior of the watchdog, used by WatchdogSetup()
Enumerator | |
---|---|
SERVICE_WDT_RESET_TYPE_REBOOT | Cold reset of the system using a hardware reset signal. |
SERVICE_WDT_RESET_TYPE_MULTIPLEXER | The output signals of the Multiplexer are reset to the default state. |
VIB::Service::Service | ( | ) |
Default constructor for the device object
The device must be opened with Open() before it can be used.
bool VIB::Service::FirmwareUpdate | ( | const unsigned char * | pFirmwareData, |
const size_t | FileSize | ||
) |
Executes an update of the firmware for the hardware entity.
This function can be used to update the firmware within the user application.
pFirmwareData | Pointer to buffer holding the firmware data |
FileSize | Number of valid bytes in the buffer |
true
for success, use VIBSystem::GetLastErrorString() for an error descriptionbool VIB::Service::GetFanNumberOfChannels | ( | unsigned int & | NumberOfChannels | ) |
Returns the number of possible fan channels.
The number of installed fans can be lower.
true
for success, use VIBSystem::GetLastErrorString() for an error descriptionbool VIB::Service::GetFanSpeed | ( | const unsigned int | ChannelIndex, |
unsigned int & | RPM | ||
) |
Return the current fan speed for the given index.
ChannelIndex | Fan index, 0 ... (GetFanNumberOfChannels() - 1) |
RPM | Current speed in RPM |
true
for success, use VIBSystem::GetLastErrorString() for an error descriptionbool VIB::Service::GetSerialNumber | ( | char | pSerialnumber[32] | ) |
Returns the serial number for the hardware component.
The function will return a null-terminated string like "AGEX1109000012"
. See section Serial Number for a detailed description and example code.
pSerialnumber | Valid string pointer for storing the serial number |
true
for success, use VIBSystem::GetLastErrorString() for an error descriptionbool VIB::Service::GetSystemTemperature | ( | float & | fTemperature | ) |
Returns system temperature.
fTemperature | Temperature in °C |
true
for success, use VIBSystem::GetLastErrorString() for an error descriptionbool VIB::Service::Reset | ( | ) |
Resets the device to default settings.
true
for success, use VIBSystem::GetLastErrorString() for an error descriptionbool VIB::Service::SetFanTargetTemperature | ( | unsigned int | Temperature | ) |
Sets the target temperature of the fan regulation.
Remember, a higher system temperature will reduce the noise but also reduces the life-time and decreases the ability for the CPU to use clock speeds above the base frequency.
Temperature | Target temperature in °C, 0 ... 50 |
true
for success, use VIBSystem::GetLastErrorString() for an error descriptionbool VIB::Service::WatchdogHasFired | ( | bool & | HasFired | ) |
Returns the state of the Watchdog.
The function returns true
if the watchdog timeout has expired. A reboot or any call to WatchdogSetup() resets the state.
HasFired | Watchdog state |
true
for success, use VIBSystem::GetLastErrorString() for an error descriptionbool VIB::Service::WatchdogService | ( | ) |
Sends a signal to the FPGA which resets the watchdog timer.
true
for success, use VIBSystem::GetLastErrorString() for an error descriptionbool VIB::Service::WatchdogSetup | ( | bool | boEnable, |
unsigned int | msTimeout | ||
) |
Configures the FPGA watchdog.
If the watchdog is enabled the program has to call WatchdogService() within the specified timeout period. If the timeout expires, a hardware system reset is triggered.
This function call is identical to WatchdogSetup(boEnable, msTimeout, SERVICE_WDT_RESET_TYPE_REBOOT).
The watchdog will not be disabled when the Service device is closed.
boEnable | Enable or disables the watchdog timer |
msTimeout | Watchdog timeout in milliseconds (max. 40000) |
true
for success, use VIBSystem::GetLastErrorString() for an error descriptionbool VIB::Service::WatchdogSetup | ( | bool | boEnable, |
unsigned int | msTimeout, | ||
SERVICE_WDT_RESET_TYPE | ResetType | ||
) |
Configures the watchdog and the reset behavior.
This function is identical to the WatchdogSetup() except, that the reset type can be specified after the timeout expires.
boEnable | Enable or disables the watchdog timer |
msTimeout | Watchdog timeout in milliseconds (max. 40000) |
ResetType | Reset behavior |
true
for success, use VIBSystem::GetLastErrorString() for an error description