Skip to content

Commit cefac20

Browse files
committed
Merge branch 'dev-0.7.6'
2 parents 01cdf95 + 07390ef commit cefac20

File tree

8 files changed

+128
-19
lines changed

8 files changed

+128
-19
lines changed

ChangeLog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## Changes between libo3d3xx 0.7.5 and 0.7.6
2+
3+
* Makes unit tests pass for the 1.23.1522 firmware (json dumps still do not
4+
expose the new parameters).
5+
16
## Changes between libo3d3xx 0.7.4 and 0.7.5
27

38
* Added timestamp support for images grabbed with the oem module

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,12 @@ Software Compatibility Matrix
183183
<td>O3D303</td>
184184
<td>Timestamp support in OEM image module</td>
185185
</tr>
186+
<tr>
187+
<td>0.7.6</td>
188+
<td>1.23.1522</td>
189+
<td>O3D303</td>
190+
<td>Ethernet/IP assembly size configuration and PCIC schema auto update</td>
191+
</tr>
186192
</table>
187193

188194
Features

cmake/modules/o3d3xx_version.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
################################################
55
set(O3D3XX_VERSION_MAJOR 0)
66
set(O3D3XX_VERSION_MINOR 7)
7-
set(O3D3XX_VERSION_PATCH 5)
7+
set(O3D3XX_VERSION_PATCH 6)
88
set(O3D3XX_VERSION_STRING
99
"${O3D3XX_VERSION_MAJOR}.${O3D3XX_VERSION_MINOR}.${O3D3XX_VERSION_PATCH}")

modules/camera/include/o3d3xx_camera/device_config.h

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,16 @@ namespace o3d3xx
188188
bool EnableAcquisitionFinishedPCIC() const noexcept;
189189
void SetEnableAcquisitionFinishedPCIC(bool on) noexcept;
190190

191+
int EIPProducingSize() const noexcept;
192+
void SetEIPProducingSize(int i) noexcept;
193+
194+
int EIPConsumingSize() const noexcept;
195+
void SetEIPConsumingSize(int i) noexcept;
196+
197+
bool PcicTcpSchemaAutoUpdate() const noexcept;
198+
void SetPcicTcpSchemaAutoUpdate(bool on) noexcept;
199+
200+
191201
protected:
192202
/**
193203
* User-defined name of the device (max 64 characters)
@@ -351,25 +361,43 @@ namespace o3d3xx
351361
double temp_illu_;
352362

353363
/**
354-
* @todo needs documentation
364+
* The Profinet device name
355365
*/
356366
std::string pnio_device_name_;
357367

358368
/**
359-
* @todo needs documentation
369+
* Select the ethernet fieldbus
360370
*/
361371
int ethernet_field_bus_;
362372

363373
/**
364-
* @todo needs documentation
374+
* Selects the Endianess of the fieldbus
365375
*/
366376
int ethernet_field_bus_endianness_;
367377

368378
/**
369-
* @todo needs documentation
379+
* Enable the asynchronous notification for the
380+
* acquisition finished signal over PCIC
370381
*/
371382
bool enable_acquisition_finished_pcic_;
372383

384+
/**
385+
* Ethernet/IP producing assembly size
386+
*/
387+
int eip_producing_size_;
388+
389+
/**
390+
* Ethernet/IP consuming assembly size
391+
*/
392+
int eip_consuming_size_;
393+
394+
/**
395+
* This enables the PCIC auto schema update.
396+
* When enabled the default schema will be updated on all
397+
* open connections
398+
*/
399+
bool pcic_tcp_schema_auto_update_;
400+
373401
}; // end: class DeviceConfig
374402

375403
} // end: namespace 03d3xx

modules/camera/src/libo3d3xx_camera/camera.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ o3d3xx::Camera::SetImagerConfig(const o3d3xx::ImagerConfig* config)
10191019
"ExposureTime", config->ExposureTime());
10201020
}
10211021
}
1022-
else
1022+
else if (boost::algorithm::ends_with(im->Type(), "moderate"))
10231023
{
10241024
if (im->ExposureTime() != config->ExposureTime())
10251025
{

modules/camera/src/libo3d3xx_camera/device_config.cpp

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ o3d3xx::DeviceConfig::DeviceConfig()
5151
pnio_device_name_(""),
5252
ethernet_field_bus_(0),
5353
ethernet_field_bus_endianness_(0),
54-
enable_acquisition_finished_pcic_(false)
54+
enable_acquisition_finished_pcic_(false),
55+
eip_producing_size_(0),
56+
eip_consuming_size_(0),
57+
pcic_tcp_schema_auto_update_(false)
5558
{ }
5659

5760
o3d3xx::DeviceConfig::DeviceConfig(
@@ -497,6 +500,42 @@ o3d3xx::DeviceConfig::SetEnableAcquisitionFinishedPCIC(bool on) noexcept
497500
this->enable_acquisition_finished_pcic_ = on;
498501
}
499502

503+
int
504+
o3d3xx::DeviceConfig::EIPProducingSize() const noexcept
505+
{
506+
return this->eip_producing_size_;
507+
}
508+
509+
void
510+
o3d3xx::DeviceConfig::SetEIPProducingSize(int i) noexcept
511+
{
512+
this->eip_producing_size_ = i;
513+
}
514+
515+
int
516+
o3d3xx::DeviceConfig::EIPConsumingSize() const noexcept
517+
{
518+
return this->eip_consuming_size_;
519+
}
520+
521+
void
522+
o3d3xx::DeviceConfig::SetEIPConsumingSize(int i) noexcept
523+
{
524+
this->eip_consuming_size_ = i;
525+
}
526+
527+
bool
528+
o3d3xx::DeviceConfig::PcicTcpSchemaAutoUpdate() const noexcept
529+
{
530+
return this->pcic_tcp_schema_auto_update_;
531+
}
532+
533+
void
534+
o3d3xx::DeviceConfig::SetPcicTcpSchemaAutoUpdate(bool on) noexcept
535+
{
536+
this->pcic_tcp_schema_auto_update_ = on;
537+
}
538+
500539
const std::unordered_map<std::string,
501540
std::function<void(o3d3xx::DeviceConfig*,
502541
const std::string&)> >
@@ -644,7 +683,19 @@ o3d3xx::DeviceConfig::mutator_map =
644683

645684
{"EthernetFieldBusEndianness",
646685
[](o3d3xx::DeviceConfig* dev, const std::string& val)
647-
{ dev->SetEthernetFieldBusEndianness(std::stoi(val)); }}
686+
{ dev->SetEthernetFieldBusEndianness(std::stoi(val)); }},
687+
688+
{"EIPProducingSize",
689+
[](o3d3xx::DeviceConfig* dev, const std::string& val)
690+
{ dev->SetEIPProducingSize(std::stoi(val)); }},
691+
692+
{"EIPConsumingSize",
693+
[](o3d3xx::DeviceConfig* dev, const std::string& val)
694+
{ dev->SetEIPConsumingSize(std::stoi(val)); }},
695+
696+
{"PcicTcpSchemaAutoUpdate",
697+
[](o3d3xx::DeviceConfig* dev, const std::string& val)
698+
{ dev->SetPcicTcpSchemaAutoUpdate(o3d3xx::stob(val)); }}
648699
};
649700

650701
std::string

modules/camera/test/o3d3xx-app-imager-tests.cpp

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ TEST_F(AppImagerTest, GetAppParameters)
128128
// std::cout << kv.first << "=" << kv.second << std::endl;
129129
// }
130130

131-
ASSERT_EQ(params.size(), 9);
131+
ASSERT_EQ(params.size(), 10);
132132

133133
ASSERT_NO_THROW(params.at("Name"));
134134
ASSERT_NO_THROW(params.at("Description"));
@@ -139,6 +139,7 @@ TEST_F(AppImagerTest, GetAppParameters)
139139
ASSERT_NO_THROW(params.at("TemplateInfo"));
140140
ASSERT_NO_THROW(params.at("Type"));
141141
ASSERT_NO_THROW(params.at("LogicGraph"));
142+
ASSERT_NO_THROW(params.at("RtspOverlayStyle"));
142143

143144
cam_->StopEditingApplication();
144145
cam_->DeleteApplication(new_idx);
@@ -260,7 +261,6 @@ TEST_F(AppImagerTest, GetImagerParameters)
260261
ASSERT_NO_THROW(params.at("AutoExposureReferenceROI"));
261262
ASSERT_NO_THROW(params.at("AutoExposureReferenceType"));
262263
ASSERT_NO_THROW(params.at("AutoExposureMaxExposureTime"));
263-
ASSERT_NO_THROW(params.at("Channel"));
264264
ASSERT_NO_THROW(params.at("ClippingBottom"));
265265
ASSERT_NO_THROW(params.at("ClippingLeft"));
266266
ASSERT_NO_THROW(params.at("ClippingRight"));
@@ -286,27 +286,40 @@ TEST_F(AppImagerTest, GetImagerParameters)
286286
ASSERT_NO_THROW(params.at("TwoFreqMaxLineDistPercentage"));
287287
ASSERT_NO_THROW(params.at("Type"));
288288
ASSERT_NO_THROW(params.at("MaxAllowedLEDFrameRate"));
289+
ASSERT_NO_THROW(params.at("ContinuousUserFrameCalibration"));
290+
291+
if(!boost::algorithm::ends_with(type, "depalletizing_upto_30m_high"))
292+
{
293+
ASSERT_NO_THROW(params.at("Channel"));
294+
}
289295

290296
if (boost::algorithm::ends_with(type, "high"))
291297
{
292298
ASSERT_THROW(params.at("ExposureTime"), std::out_of_range);
293299
ASSERT_THROW(params.at("ExposureTimeRatio"), std::out_of_range);
294300

295-
ASSERT_EQ(params.size(), 31);
301+
if(boost::algorithm::ends_with(type, "depalletizing_upto_30m_high"))
302+
{
303+
ASSERT_EQ(params.size(), 31);
304+
}
305+
else
306+
{
307+
ASSERT_EQ(params.size(), 32);
308+
}
296309
}
297310
else if (boost::algorithm::ends_with(type, "low"))
298311
{
299312
ASSERT_NO_THROW(params.at("ExposureTime"));
300313
ASSERT_THROW(params.at("ExposureTimeRatio"), std::out_of_range);
301314

302-
ASSERT_EQ(params.size(), 32);
315+
ASSERT_EQ(params.size(), 33);
303316
}
304-
else
317+
else if (boost::algorithm::ends_with(type, "moderate"))
305318
{
306319
ASSERT_NO_THROW(params.at("ExposureTime"));
307320
ASSERT_NO_THROW(params.at("ExposureTimeRatio"));
308321

309-
ASSERT_EQ(params.size(), 33);
322+
ASSERT_EQ(params.size(), 34);
310323
}
311324
}
312325

@@ -405,7 +418,7 @@ TEST_F(AppImagerTest, ImagerConfig)
405418
{
406419
ASSERT_NO_THROW(im->SetExposureTime(2000));
407420
}
408-
else
421+
else if (boost::algorithm::ends_with(type, "moderate"))
409422
{
410423
ASSERT_NO_THROW(im->SetExposureTime(2000));
411424
ASSERT_NO_THROW(im->SetExposureTimeRatio(5));
@@ -436,7 +449,7 @@ TEST_F(AppImagerTest, ImagerConfig)
436449
{
437450
ASSERT_EQ(im2->ExposureTime(), im->ExposureTime());
438451
}
439-
else
452+
else if (boost::algorithm::ends_with(type, "moderate"))
440453
{
441454
ASSERT_EQ(im2->ExposureTime(), im->ExposureTime());
442455
ASSERT_EQ(im2->ExposureTimeRatio(),
@@ -580,7 +593,7 @@ TEST_F(AppImagerTest, Exposure)
580593
{
581594
ASSERT_NO_THROW(im->SetExposureTime(2000));
582595
}
583-
else
596+
else if (boost::algorithm::ends_with(type, "moderate"))
584597
{
585598
ASSERT_NO_THROW(im->SetExposureTime(2000));
586599
ASSERT_NO_THROW(im->SetExposureTimeRatio(5));
@@ -607,7 +620,7 @@ TEST_F(AppImagerTest, Exposure)
607620
ASSERT_EQ(exposure_strings.size(), 1);
608621
ASSERT_EQ(std::atoi(exposure_strings.at(0).c_str()), 2000);
609622
}
610-
else
623+
else if (boost::algorithm::ends_with(type, "moderate"))
611624
{
612625
ASSERT_EQ(exposure_strings.size(), 2);
613626
ASSERT_EQ(std::atoi(exposure_strings.at(0).c_str()), 2000/5);

modules/camera/test/o3d3xx-camera-tests.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ TEST(Camera_Tests, GetDeviceConfig)
179179
// std::cout << kv.first << "=" << kv.second << std::endl;
180180
// }
181181

182-
EXPECT_EQ(params.size(), 35);
182+
EXPECT_EQ(params.size(), 38);
183183

184184
EXPECT_EQ(params.at("Name"), dev->Name());
185185
EXPECT_EQ(params.at("Description"), dev->Description());
@@ -220,6 +220,12 @@ TEST(Camera_Tests, GetDeviceConfig)
220220
EXPECT_EQ(params.at("PNIODeviceName"), dev->PNIODeviceName());
221221
EXPECT_EQ(o3d3xx::stob(params.at("EnableAcquisitionFinishedPCIC")),
222222
dev->EnableAcquisitionFinishedPCIC());
223+
EXPECT_EQ(std::stoi(params.at("EIPProducingSize")),
224+
dev->EIPProducingSize());
225+
EXPECT_EQ(std::stoi(params.at("EIPConsumingSize")),
226+
dev->EIPConsumingSize());
227+
EXPECT_EQ(o3d3xx::stob(params.at("PcicTcpSchemaAutoUpdate")),
228+
dev->PcicTcpSchemaAutoUpdate());
223229
}
224230

225231
TEST(Camera_Tests, ActivateDisablePassword)

0 commit comments

Comments
 (0)