Skip to content

Commit

Permalink
refactor: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
GoetzGoerisch committed Oct 10, 2024
1 parent 6e09a19 commit 3b15bdc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
24 changes: 12 additions & 12 deletions PublishedNodesFileHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ public void ParseFile(byte[] content)
// process loaded config file entries
if (_configurationFileEntries != null)
{
_logger.LogInformation($"Loaded {_configurationFileEntries.Count} config file entry/entries.");

// figure out how many nodes there are in total and capture all unique OPC UA server endpoints
Dictionary<string, PublishNodesInterfaceModel> uniqueEndpoints = new();
_logger.LogInformation($"Loaded {_configurationFileEntries.Count} config file entry/entries.");

// figure out how many nodes there are in total and capture all unique OPC UA server endpoints
Dictionary<string, PublishNodesInterfaceModel> uniqueEndpoints = new();
int totalNodeCount = 0;
foreach (PublishNodesInterfaceModel configFileEntry in _configurationFileEntries)
{
Expand Down Expand Up @@ -139,12 +139,12 @@ public void ParseFile(byte[] content)
publishingInfo.Filter.AddRange(opcEvent.Filter);

try
{
_uaClient.PublishNodeAsync(publishingInfo).GetAwaiter().GetResult();
{
_uaClient.PublishNodeAsync(publishingInfo).GetAwaiter().GetResult();
}
catch (Exception ex)
{
// skip this event and log an error
{
// skip this event and log an error
_logger.LogError("Cannot publish event " + publishingInfo.ExpandedNodeId + " on server " + publishingInfo.EndpointUrl + "due to " + ex.Message);
}

Expand Down Expand Up @@ -172,12 +172,12 @@ public void ParseFile(byte[] content)
};

try
{
_uaClient.PublishNodeAsync(publishingInfo).GetAwaiter().GetResult();
{
_uaClient.PublishNodeAsync(publishingInfo).GetAwaiter().GetResult();
}
catch (Exception ex)
{
// skip this variable and log an error
{
// skip this variable and log an error
_logger.LogError("Cannot publish variable " + publishingInfo.ExpandedNodeId + " on server " + publishingInfo.EndpointUrl + "due to " + ex.Message);
}

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ UA Cloud Publisher contains a second broker client that can be used either to **

## Optional Environment Variables

* AZURE_OPENAI_API_ENDPOINT - the endpoint URL of the Azure OpenAI instance to use in the form https://[yourinstancename].openai.azure.com/
* AZURE_OPENAI_API_KEY - the key to use
* AZURE_OPENAI_API_DEPLOYMENT_NAME - the deployment to use
* OPCUA_USERNAME - OPC UA server username to use when none is specified in publishednodes.json file
* OPCUA_PASSWORD - OPC UA server password to use when none is specified in publishednodes.json file
- AZURE_OPENAI_API_ENDPOINT - the endpoint URL of the Azure OpenAI instance to use in the form https://[yourinstancename].openai.azure.com/
- AZURE_OPENAI_API_KEY - the key to use
- AZURE_OPENAI_API_DEPLOYMENT_NAME - the deployment to use
- OPCUA_USERNAME - OPC UA server username to use when none is specified in publishednodes.json file
- OPCUA_PASSWORD - OPC UA server password to use when none is specified in publishednodes.json file

## PublishedNodes.json File Format

Expand Down

0 comments on commit 3b15bdc

Please sign in to comment.