Skip to content

Dnp3Adapters: Route log messages to the appropriate adapter#508

Merged
ritchiecarroll merged 1 commit intomasterfrom
route-dnp3-logs
Mar 10, 2026
Merged

Dnp3Adapters: Route log messages to the appropriate adapter#508
ritchiecarroll merged 1 commit intomasterfrom
route-dnp3-logs

Conversation

@StephenCWills
Copy link
Copy Markdown
Member

This PR uses a lookup table to match the value of LogEntry.alias to the ChannelID of the appropriate DNP3 adapter. To associate the ChannelID with the log entries, it must be passed as the id parameter when adding components to the IDNP3Manager instance, such as when calling IDNP3Manager.AddTcpClient().

You can see in the following screenshot that the Application Poll messages are being routed separately to each of the two adapters--DNPTEST1 and DNPTEST2--in my test system.

image

Copy link
Copy Markdown
Member

@ritchiecarroll ritchiecarroll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple minor optimizations are suggested. Looks good.

Comment thread Source/Libraries/Adapters/Dnp3Adapters/Dnp3InputAdapter.cs
Comment thread Source/Libraries/Adapters/Dnp3Adapters/Dnp3OutputAdapter.cs
@ritchiecarroll ritchiecarroll merged commit 0611e31 into master Mar 10, 2026
3 checks passed
@ritchiecarroll ritchiecarroll deleted the route-dnp3-logs branch March 10, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants