lordgamez commented on code in PR #2265:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2265#discussion_r4119905300
##########
extensions/opc/src/OPCCommon.cpp:
##########
@@ -619,4 +584,12 @@ std::optional<UA_UInt32> mapOpcReferenceType(const
std::string& ref_type) {
return std::nullopt;
}
+UA_StatusCode Client::readHistory(HistoryReadTypeOption history_type, const
UA_NodeId& node_id, const HistoryCallback callback, UA_DateTime start_time,
UA_DateTime end_time,
+ void* callback_context) {
+ if (history_type == HistoryReadTypeOption::Audit) {
+ return UA_Client_HistoryRead_modified(client_, &node_id, callback,
start_time, end_time, UA_STRING_NULL, false, 0, UA_TIMESTAMPSTORETURN_SOURCE,
callback_context);
+ }
+ return UA_Client_HistoryRead_raw(client_, &node_id, callback, start_time,
end_time, UA_STRING_NULL, false, 0, UA_TIMESTAMPSTORETURN_SOURCE,
callback_context);
Review Comment:
We pass 0 to get all values and take advantage of the continuation point in
the callback and we process the values until the batch size manually. We cannot
calculate beforehand how many values do we need in the batch here due to the
filtering of the duplicated values on the same timestamp has to be done
manually in the callback.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]