diff --git a/broker/gen/model/Image_buffer_status.cpp b/broker/gen/model/Image_buffer_status.cpp
index 63f3f7fa..a0c2e2e3 100644
--- a/broker/gen/model/Image_buffer_status.cpp
+++ b/broker/gen/model/Image_buffer_status.cpp
@@ -26,6 +26,7 @@ Image_buffer_status::Image_buffer_status()
m_Total_slots = 0L;
m_Available_slots = 0L;
m_Current_counter = 0L;
+ m_Current_counterIsSet = false;
}
@@ -121,8 +122,8 @@ bool Image_buffer_status::operator==(const Image_buffer_status& rhs) const
(getAvailableSlots() == rhs.getAvailableSlots())
&&
- (getCurrentCounter() == rhs.getCurrentCounter())
+ ((!currentCounterIsSet() && !rhs.currentCounterIsSet()) || (currentCounterIsSet() && rhs.currentCounterIsSet() && getCurrentCounter() == rhs.getCurrentCounter()))
;
}
@@ -140,7 +141,8 @@ void to_json(nlohmann::json& j, const Image_buffer_status& o)
j["image_numbers"] = o.m_Image_numbers;
j["total_slots"] = o.m_Total_slots;
j["available_slots"] = o.m_Available_slots;
- j["current_counter"] = o.m_Current_counter;
+ if(o.currentCounterIsSet())
+ j["current_counter"] = o.m_Current_counter;
}
@@ -151,7 +153,11 @@ void from_json(const nlohmann::json& j, Image_buffer_status& o)
j.at("image_numbers").get_to(o.m_Image_numbers);
j.at("total_slots").get_to(o.m_Total_slots);
j.at("available_slots").get_to(o.m_Available_slots);
- j.at("current_counter").get_to(o.m_Current_counter);
+ if(j.find("current_counter") != j.end())
+ {
+ j.at("current_counter").get_to(o.m_Current_counter);
+ o.m_Current_counterIsSet = true;
+ }
}
@@ -202,6 +208,15 @@ int64_t Image_buffer_status::getCurrentCounter() const
void Image_buffer_status::setCurrentCounter(int64_t const value)
{
m_Current_counter = value;
+ m_Current_counterIsSet = true;
+}
+bool Image_buffer_status::currentCounterIsSet() const
+{
+ return m_Current_counterIsSet;
+}
+void Image_buffer_status::unsetCurrent_counter()
+{
+ m_Current_counterIsSet = false;
}
diff --git a/broker/gen/model/Image_buffer_status.h b/broker/gen/model/Image_buffer_status.h
index f37abf53..21592254 100644
--- a/broker/gen/model/Image_buffer_status.h
+++ b/broker/gen/model/Image_buffer_status.h
@@ -84,10 +84,12 @@ public:
int64_t getAvailableSlots() const;
void setAvailableSlots(int64_t const value);
///
Test Jungfraujoch system