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
You can set web access information in the detector (bodypart list).
C++
void CSDKCplusExampleApp::SetWebAccessInfo(BODY_PART_LIST* _btInfo) { if (detectorIns->DetectorTypeGet() == DETECTOR_TYPE::FXRD1417_W) { BODY_PART_LIST* btInfo = new BODY_PART_LIST; CFXRDW* fxrdw = (CFXRDW*)detectorIns; btInfo->nBodypartCount = _btInfo->nBodypartCount; btInfo->aryBodypartInfo = new BODYPART[btInfo->nBodypartCount]; for (int i = 0; i < btInfo->nBodypartCount; i++) { wcscpy_s(btInfo->aryBodypartInfo[i].meaning, _btInfo->aryBodypartInfo[i].meaning); btInfo->aryBodypartInfo[i].nProjectionInfoCount = _btInfo->aryBodypartInfo[i].nProjectionInfoCount; btInfo->aryBodypartInfo[i].aryProjectionInfo = new BODYPART::_PROJECTION[_btInfo->aryBodypartInfo[i].nProjectionInfoCount]; for (int j = 0; j < _btInfo->aryBodypartInfo[i].nProjectionInfoCount; j++) { wcscpy_s(btInfo->aryBodypartInfo[i].aryProjectionInfo[j].meaning, _btInfo->aryBodypartInfo[i].aryProjectionInfo[j].meaning); btInfo->aryBodypartInfo[i].aryProjectionInfo[j].projectionKey = _btInfo->aryBodypartInfo[i].aryProjectionInfo[j].projectionKey; btInfo->aryBodypartInfo[i].aryProjectionInfo[j].favorite = _btInfo->aryBodypartInfo[i].aryProjectionInfo[j].favorite; } } fxrdw->BodyPartInfoListSet(btInfo); delete btInfo; } else if (detectorIns->DetectorTypeGet() == DETECTOR_TYPE::FXRD1012_N || detectorIns->DetectorTypeGet() == DETECTOR_TYPE::FXRD1717_N || detectorIns->DetectorTypeGet() == DETECTOR_TYPE::FXRD1417_N) { BODY_PART_LIST* btInfo = new BODY_PART_LIST; CFXRDN* fxrdn = (CFXRDN*)detectorIns; btInfo->nBodypartCount = _btInfo->nBodypartCount; btInfo->aryBodypartInfo = new BODYPART[btInfo->nBodypartCount]; for (int i = 0; i < btInfo->nBodypartCount; i++) { wcscpy_s(btInfo->aryBodypartInfo[i].meaning, _btInfo->aryBodypartInfo[i].meaning); btInfo->aryBodypartInfo[i].nProjectionInfoCount = _btInfo->aryBodypartInfo[i].nProjectionInfoCount; btInfo->aryBodypartInfo[i].aryProjectionInfo = new BODYPART::_PROJECTION[_btInfo->aryBodypartInfo[i].nProjectionInfoCount]; for (int j = 0; j < _btInfo->aryBodypartInfo[i].nProjectionInfoCount; j++) { wcscpy_s(btInfo->aryBodypartInfo[i].aryProjectionInfo[j].meaning, _btInfo->aryBodypartInfo[i].aryProjectionInfo[j].meaning); btInfo->aryBodypartInfo[i].aryProjectionInfo[j].projectionKey = _btInfo->aryBodypartInfo[i].aryProjectionInfo[j].projectionKey; btInfo->aryBodypartInfo[i].aryProjectionInfo[j].favorite = _btInfo->aryBodypartInfo[i].aryProjectionInfo[j].favorite; } } fxrdn->BodyPartInfoListSet(btInfo); delete btInfo; } }
C#
void SetWebAccessInfo(BODY_PART_LIST _bInfo) { if (detectorIns is FXRDW) { FXRDW fxrdw = detectorIns as FXRDW; BODY_PART_LIST bInfo = new BODY_PART_LIST(); bInfo.nBodypartCount = _bInfo.nBodypartCount; bInfo.aryBodypartInfo = new BODYPART[bInfo.nBodypartCount]; for (int i = 0; i < bInfo.nBodypartCount; i++) { bInfo.aryBodypartInfo[i] = new BODYPART(); bInfo.aryBodypartInfo[i].meaning = _bInfo.aryBodypartInfo[i].meaning; bInfo.aryBodypartInfo[i].nProjectionInfoCount = _bInfo.aryBodypartInfo[i].nProjectionInfoCount; bInfo.aryBodypartInfo[i].aryProjectionInfo = new BODYPART._PROJECTION[bInfo.aryBodypartInfo[i].nProjectionInfoCount]; for (int j = 0; j < _bInfo.aryBodypartInfo[i].nProjectionInfoCount; j++) { bInfo.aryBodypartInfo[i].aryProjectionInfo[j] = new BODYPART._PROJECTION(); bInfo.aryBodypartInfo[i].aryProjectionInfo[j].meaning = _bInfo.aryBodypartInfo[i].aryProjectionInfo[j].meaning; bInfo.aryBodypartInfo[i].aryProjectionInfo[j].projectionKey = _bInfo.aryBodypartInfo[i].aryProjectionInfo[j].projectionKey; bInfo.aryBodypartInfo[i].aryProjectionInfo[j].favorite = _bInfo.aryBodypartInfo[i].aryProjectionInfo[j].favorite; } fxrdw.BodyPartInfoListSet(bInfo); } } else if (detectorIns is FXRDN) { FXRDN fxrdn = detectorIns as FXRDN; BODY_PART_LIST bInfo = new BODY_PART_LIST(); bInfo.nBodypartCount = _bInfo.nBodypartCount; bInfo.aryBodypartInfo = new BODYPART[bInfo.nBodypartCount]; for (int i = 0; i < bInfo.nBodypartCount; i++) { bInfo.aryBodypartInfo[i] = new BODYPART(); bInfo.aryBodypartInfo[i].meaning = _bInfo.aryBodypartInfo[i].meaning; bInfo.aryBodypartInfo[i].nProjectionInfoCount = _bInfo.aryBodypartInfo[i].nProjectionInfoCount; bInfo.aryBodypartInfo[i].aryProjectionInfo = new BODYPART._PROJECTION[bInfo.aryBodypartInfo[i].nProjectionInfoCount]; for (int j = 0; j < _bInfo.aryBodypartInfo[i].nProjectionInfoCount; j++) { bInfo.aryBodypartInfo[i].aryProjectionInfo[j] = new BODYPART._PROJECTION(); bInfo.aryBodypartInfo[i].aryProjectionInfo[j].meaning = _bInfo.aryBodypartInfo[i].aryProjectionInfo[j].meaning; bInfo.aryBodypartInfo[i].aryProjectionInfo[j].projectionKey = _bInfo.aryBodypartInfo[i].aryProjectionInfo[j].projectionKey; bInfo.aryBodypartInfo[i].aryProjectionInfo[j].favorite = _bInfo.aryBodypartInfo[i].aryProjectionInfo[j].favorite; } fxrdn.BodyPartInfoListSet(bInfo); } } }