AcquisitionDevice: refactor to make it less FPGA dependent
This commit is contained in:
@@ -125,12 +125,12 @@ void PCIExpressDevice::HW_ReadActionRegister(ActionConfig *config) {
|
||||
"Failed reading config", errno);
|
||||
}
|
||||
|
||||
uint64_t PCIExpressDevice::HW_GetMACAddress() const {
|
||||
std::string PCIExpressDevice::GetMACAddress() const {
|
||||
uint64_t tmp;
|
||||
if (ioctl(fd, IOCTL_JFJOCH_GET_MAC, &tmp) != 0)
|
||||
throw JFJochException(JFJochExceptionCategory::PCIeError,
|
||||
"Failed getting MAC address", errno);
|
||||
return tmp;
|
||||
return MacAddressToStr(tmp);
|
||||
}
|
||||
|
||||
void PCIExpressDevice::SetMACAddress(uint64_t mac_addr_network_order) {
|
||||
@@ -195,10 +195,10 @@ void PCIExpressDevice::SetIPv4Address(uint32_t ipv4_addr_network_order) {
|
||||
"Failed setting IPv4 address", errno);
|
||||
}
|
||||
|
||||
uint32_t PCIExpressDevice::HW_GetIPv4Address() const {
|
||||
std::string PCIExpressDevice::GetIPv4Address() const {
|
||||
uint32_t tmp;
|
||||
if (ioctl(fd, IOCTL_JFJOCH_GET_IPV4, &tmp) != 0)
|
||||
throw JFJochException(JFJochExceptionCategory::PCIeError,
|
||||
"Failed getting MAC address", errno);
|
||||
return tmp;
|
||||
return IPv4AddressToStr(tmp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user