Network.Camera.CLP1611 : IP address can be specified.
This commit is contained in:
@@ -138,8 +138,9 @@ namespace TBF.BenchControl.Network.Camera.CLP1611
|
||||
if (CameraCfg.DebugLevel == DebugMode.Simulate) return;
|
||||
|
||||
/// Detect a camera
|
||||
bool cameraDetected = DetectCamera(CameraCfg.HardwareAddress, true,
|
||||
out ipAddress, out hardware, out revision, out serial, out sdCardVer);
|
||||
if (CameraCfg.UseIPAddress) ipAddress = IPAddress.Parse(CameraCfg.IPAddressStr);
|
||||
bool cameraDetected = DetectCamera(CameraCfg.HardwareAddress, ref ipAddress, CameraCfg.UseIPAddress, true,
|
||||
out hardware, out revision, out serial, out sdCardVer);
|
||||
|
||||
|
||||
|
||||
@@ -231,8 +232,16 @@ namespace TBF.BenchControl.Network.Camera.CLP1611
|
||||
/// <param name="serial">Detected serial number</param>
|
||||
/// <param name="sdCardVer">Detected OS image</param>
|
||||
/// <returns>true when camera detected successfully</returns>
|
||||
bool DetectCamera(int hwAddress, bool setDateTime, out IPAddress ipAddress, out string hardware, out string revision, out string serial, out string sdCardVer)
|
||||
bool DetectCamera(int hwAddress, ref IPAddress ipAddress, bool useIpAddress, bool setDateTime, out string hardware, out string revision, out string serial, out string sdCardVer)
|
||||
{
|
||||
if (useIpAddress)
|
||||
{
|
||||
hardware = "hw";
|
||||
revision = "rev";
|
||||
serial = "s/n";
|
||||
sdCardVer = "img";
|
||||
}
|
||||
|
||||
for (int trials = 1; trials <= 3; trials++)
|
||||
{
|
||||
UdpClient udpClient = new UdpClient();
|
||||
|
||||
Reference in New Issue
Block a user