SIENTIAPDE-1110
Update process_confidence method in OPC activity to include metadata parameter for improved data handling.
This commit is contained in:
@@ -122,9 +122,9 @@ class OPC(BaseActivity):
|
|||||||
tag_type='confidence'
|
tag_type='confidence'
|
||||||
)
|
)
|
||||||
|
|
||||||
return self.process_confidence(data, success)
|
return self.process_confidence(data, success, metadata)
|
||||||
|
|
||||||
def process_confidence(self, data: DataFrame, success: bool) -> dict[Any, Any]:
|
def process_confidence(self, data: DataFrame, success: bool, metadata: dict[str, Any]) -> dict[Any, Any]:
|
||||||
"""
|
"""
|
||||||
Processes the confidence of OPC server write operations and updates the DataFrame accordingly.
|
Processes the confidence of OPC server write operations and updates the DataFrame accordingly.
|
||||||
|
|
||||||
@@ -138,7 +138,6 @@ class OPC(BaseActivity):
|
|||||||
Returns:
|
Returns:
|
||||||
dict[Any, Any]: The processed data as a dictionary.
|
dict[Any, Any]: The processed data as a dictionary.
|
||||||
"""
|
"""
|
||||||
metadata = data['metadata']
|
|
||||||
|
|
||||||
if not success:
|
if not success:
|
||||||
data['prediction_confidence'] = OPC_WRITTING_ERROR_CONFIDENCE
|
data['prediction_confidence'] = OPC_WRITTING_ERROR_CONFIDENCE
|
||||||
|
|||||||
Reference in New Issue
Block a user