Environment

C++ in MFC using namespace Vieworks::vivix,
Instance : CVivixSDK vivixSDK; CDetector* detectorIns;
C# in Winform using Vieworks.vivix.net, using Vieworks.vivix.net.detector; using Vieworks.vivix.net.scu;
Instance: VivixNet netSDK; DETECTOR_INFO DetInfo;Detector detectorIns;

Discription

Sometimes, software might be crushed suddenly. Unfortunately, the crush occurred acquiring image .  For preventing losing image in this situation. you can find image in detector, if image is not transferred yet to PC. It is called backup image, or stored image, this function can be supported by only wireless detector (1417W, 1012N, 1417N, 1717N, 2532E, VW, FW models), and did not need setting for backup image, just get it.

C++
void CSDKCplusExampleApp::GetBackupImage()
{

//you can skip the setting delegate code if you register already
{
detectorIns->SetNotifyFrameGrabberImageInStart((NotifyFrameGrabberImageInStart)NotifyImageInStart);
detectorIns->SetNotifyFrameGrabberImageIn((NotifyFrameGrabberImageIn)NotifyImageIn);
detectorIns->SetNotifyFrameGrabberImageInEnd((NotifyFrameGrabberImageInEnd)NotifyImageInEnd);

}
if (detectorIns->DetectorTypeGet() == DETECTOR_TYPE::FXRD1417_W)
{
int match = 0;
STORED_IMAGE_LIST* sil = new STORED_IMAGE_LIST;
CFXRDW* fxrdw = (CFXRDW*)detectorIns;
fxrdw->BackupImageListGet(sil);

//compare logic needed to take specific image
fxrdw->BackupImageGet(&sil->pInfoList[match]);
delete sil;
}
else if (detectorIns->DetectorTypeGet() == DETECTOR_TYPE::FXRD1012_N || detectorIns->DetectorTypeGet() == DETECTOR_TYPE::FXRD1717_N || detectorIns->DetectorTypeGet() == DETECTOR_TYPE::FXRD1417_N)
{

int match = 0;
STORED_IMAGE_LIST* sil = new STORED_IMAGE_LIST;
CFXRDN* fxrdn = (CFXRDN*)detectorIns;
fxrdn->BackupImageListGet(sil);

//compare logic needed to take specific image
fxrdn->BackupImageGet(&sil->pInfoList[match]);
delete sil;
}
}

}

void CSDKCplusExampleApp::NotifyImageInStart(DETECTOR_ID id, IMAGE_MODE imgMode)
{
// A function call when the image starts to be sent.
}

void CSDKCplusExampleApp::NotifyImageIn(DETECTOR_ID id, IMAGE_MODE imgMode, IMAGE_INFO* image)
{
// A function call when sending the acquired image. backup image will be sent this delegate by IMAGE_MODE.IMAGE_MODE_BACKUP

}

void CSDKCplusExampleApp::NotifyImageInEnd(DETECTOR_ID id, IMAGE_MODE imgMode)
{
// A function call when the completing to send the image.
}

 

C#
public void GetBackupImage()
{
//you can skip the setting delegate code if you register already
{
detectorIns.SetDelegateFrameGrabberImageInStart(OnDelegateImageInStart);
detectorIns.SetDelegateFrameGrabberImageIn(OnDelegateImageIn);
detectorIns.SetDelegateFrameGrabberImageInEnd(OnDelegateFrameGrabberImageInEnd);

}

if (detectorIns.DetectorTypeGet() == DETECTOR_TYPE.FXRD1417_W)
{
int match = 0;
STORED_IMAGE_LIST sil = new STORED_IMAGE_LIST();
FXRDW fxrdw = (FXRDW)detectorIns;
fxrdw.BackupImageListGet(out sil);

//compare logic needed to take specific image
fxrdw.BackupImageGet(sil.aryInfoList[match]);
}
else if (detectorIns.DetectorTypeGet() == DETECTOR_TYPE.FXRD1012_N || detectorIns.DetectorTypeGet() == DETECTOR_TYPE.FXRD1717_N || detectorIns.DetectorTypeGet() == DETECTOR_TYPE.FXRD1417_N)
{

int match = 0;
STORED_IMAGE_LIST sil = new STORED_IMAGE_LIST();
FXRDN fxrdn = (FXRDN)detectorIns;
fxrdn.BackupImageListGet(out sil);

//compare logic needed to take specific image
fxrdn.BackupImageGet(sil.aryInfoList[match]);
}
}

void OnDelegateImageInStart(int id, IMAGE_MODE imgMode)
{
// A function call when the image starts to be sent.
}

void OnDelegateImageIn(int id, IMAGE_MODE imgMode, IMAGE_INFO image)
{
// A function call when sending the acquired image. keeping image will be sent this delegate by IMAGE_MODE.IMAGE_MODE_BACKUP

}

void OnDelegateImageInEnd(int id, IMAGE_MODE imgMode)
{
// A function call when the completing to send the image.
}