gRPC: Change field name to ipv4_subnet
This commit is contained in:
@@ -88,7 +88,7 @@ DiffractionExperiment::DiffractionExperiment(int64_t horizontal_stacking, const
|
||||
internal.set_high_q(5.0);
|
||||
internal.set_q_spacing(0.02);
|
||||
|
||||
internal.set_base_ipv4_address(0x0032010a);
|
||||
internal.set_ipv4_subnet(0x0032010a);
|
||||
internal.set_base_udp_port(8192);
|
||||
internal.set_git_sha1(jfjoch_git_sha1());
|
||||
internal.set_git_date(jfjoch_git_date());
|
||||
@@ -311,7 +311,7 @@ DiffractionExperiment &DiffractionExperiment::IPv4Subnet(int64_t input) {
|
||||
if ((input >> 24) % 256 != 0)
|
||||
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,"Requires 255.255.255.0 masked subnet");
|
||||
|
||||
internal.set_base_ipv4_address(input);
|
||||
internal.set_ipv4_subnet(input);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -808,16 +808,15 @@ uint32_t DiffractionExperiment::GetSrcIPv4Address(uint32_t data_stream, uint32_t
|
||||
throw JFJochException(JFJochExceptionCategory::ArrayOutOfBounds,
|
||||
"Cannot handle more than 16 modules / data stream in the current model");
|
||||
uint32_t host = ((data_stream * 32) | half_module) << 24;
|
||||
return internal.base_ipv4_address() | host;
|
||||
return internal.ipv4_subnet() | host;
|
||||
}
|
||||
|
||||
#include <iostream>
|
||||
uint32_t DiffractionExperiment::GetDestIPv4Address(uint32_t data_stream) const {
|
||||
if (data_stream >= GetDataStreamsNum())
|
||||
throw JFJochException(JFJochExceptionCategory::ArrayOutOfBounds, "Non existing data stream");
|
||||
|
||||
uint32_t host = (0xFFlu - data_stream) << 24;
|
||||
return internal.base_ipv4_address() | host;
|
||||
return internal.ipv4_subnet() | host;
|
||||
}
|
||||
|
||||
uint16_t DiffractionExperiment::GetDestUDPPort(uint16_t data_stream, uint16_t half_module) const {
|
||||
|
||||
+1
-1
@@ -152,7 +152,7 @@ message InternalSettings {
|
||||
bool mask_module_edges = 20;
|
||||
bool mask_chip_edges = 21;
|
||||
|
||||
int64 base_ipv4_address = 22;
|
||||
int64 ipv4_subnet = 22;
|
||||
int64 base_udp_port = 23;
|
||||
|
||||
float low_q = 26;
|
||||
|
||||
+79
-79
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user