EasyManua.ls Logo

Scanlab RTC6 PCIe Board - Page 903

Scanlab RTC6 PCIe Board
1004 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
RTC6 boards
Doc. Rev. 1.0.21 en-US
16 Appendix A: The RTC6 Ethernet Board
903
innovators for industry
// Search for and initialize Ethernet boards
const auto ethSearchIP = eth_convert_string_to_ip(ETH_SEARCH_IP);
const auto ethSearchNetmask = eth_convert_string_to_ip(ETH_SEARCH_NETMASK);
const auto foundEthCards = eth_search_cards(ethSearchIP, ethSearchNetmask);
if (foundEthCards > 0)
{
for (auto searchCard = 1; searchCard <= foundEthCards; searchCard++)
{
array<UINT, 16> cardInfo;
eth_get_card_info_search(searchCard, (UINT)cardInfo.data());
const auto serialNumber = cardInfo[1];
// Param 0 automatically assigns the board to the next free index
const auto card = eth_assign_card(searchCard, 0);
if (card <= 0)
{
cout <<
"
eth_assign_card for SN
"
<< serialNumber <<
"
failed with error code:
"
<< card;
return false;
}
if (!LoadProgramAndCorrectionFile(card))
{
return false;
}
}
}
// At least one PCIe or Ethernet board available
return (foundCards > 0) || (foundEthCards > 0);
}
int main(int argc, char* argv[])
{
if (!InitializeRTC())
{
return 1;
}
// Use boards for marking etc...
_getch();
return 0;
}

Table of Contents