Represents a communication channel for a master station
More...
|
| void | Shutdown () |
| | Shutdown a MasterChannel and release all resources More...
|
| |
| void | Enable () |
| | start communications More...
|
| |
| void | Disable () |
| | stop communications More...
|
| |
| AssociationId | AddAssociation (ushort address, AssociationConfig config, IReadHandler readHandler, IAssociationHandler associationHandler, IAssociationInformation associationInformation) |
| | Add an association to the channel More...
|
| |
| void | RemoveAssociation (AssociationId id) |
| | Remove an association from the channel More...
|
| |
| void | SetDecodeLevel (DecodeLevel decodeLevel) |
| | Set the decoding level for the channel More...
|
| |
| DecodeLevel | GetDecodeLevel () |
| | Get the decoding level for the channel More...
|
| |
| PollId | AddPoll (AssociationId id, Request request, TimeSpan period) |
| | Add a periodic poll to an association More...
|
| |
| void | RemovePoll (PollId pollId) |
| | Add a periodic poll to an association More...
|
| |
| void | DemandPoll (PollId pollId) |
| | Demand the immediate execution of a poll previously created with MasterChannel.AddPoll. More...
|
| |
| Task< Nothing > | Read (AssociationId association, Request request) |
| | Perform a read on the association. More...
|
| |
| Task< Nothing > | ReadWithHandler (AssociationId association, Request request, IReadHandler handler) |
| | Perform a read on the association. More...
|
| |
| Task< Nothing > | Operate (AssociationId association, CommandMode mode, CommandSet command) |
| | Asynchronously perform a command operation on the association More...
|
| |
| Task< Nothing > | SynchronizeTime (AssociationId association, TimeSyncMode mode) |
| | Asynchronously perform a time sync operation to the association More...
|
| |
| Task< TimeSpan > | ColdRestart (AssociationId association) |
| | Asynchronously perform a cold restart operation to the association More...
|
| |
| Task< TimeSpan > | WarmRestart (AssociationId association) |
| | Asynchronously perform a warm restart operation to the association More...
|
| |
| Task< Nothing > | CheckLinkStatus (AssociationId association) |
| | Asynchronously perform a link status check More...
|
| |
|
| static MasterChannel | CreateTcpChannel (Runtime runtime, LinkErrorMode linkErrorMode, MasterChannelConfig config, EndpointList endpoints, ConnectStrategy connectStrategy, IClientStateListener listener) |
| | Create a master channel that connects to the specified TCP endpoint(s) More...
|
| |
| static MasterChannel | CreateTlsChannel (Runtime runtime, LinkErrorMode linkErrorMode, MasterChannelConfig config, EndpointList endpoints, ConnectStrategy connectStrategy, IClientStateListener listener, TlsClientConfig tlsConfig) |
| | Create a master channel that connects to the specified TCP endpoint(s) and establish a TLS session with the remote. More...
|
| |
| static MasterChannel | CreateSerialChannel (Runtime runtime, MasterChannelConfig config, string path, SerialSettings serialParams, TimeSpan openRetryDelay, IPortStateListener listener) |
| | Create a master channel on the specified serial port More...
|
| |
Represents a communication channel for a master station
To communicate with a particular outstation, you need to add an association with MasterChannel.AddAssociation.
Warning: The class methods that return a value (e.g. as MasterChannel.AddAssociation) cannot be called from within a callback.
◆ AddAssociation()
Add an association to the channel
- Parameters
-
| address | DNP3 data-link address of the remote outstation |
| config | Association configuration |
| readHandler | Interface uses to load measurement data |
| associationHandler | Association specific callbacks such as time synchronization |
| associationInformation | Association information interface |
- Returns
- Id of the association
- Exceptions
-
◆ AddPoll()
Add a periodic poll to an association
Each result of the poll will be sent to the IReadHandler of the association.
- Parameters
-
| id | Association on which to add the poll |
| request | Request to perform |
| period | Period to wait between each poll (in ms) |
- Returns
- Id of the created poll
- Exceptions
-
◆ CheckLinkStatus()
Asynchronously perform a link status check
- Parameters
-
| association | Id of the association |
- Returns
- Result of the link status
- Exceptions
-
◆ ColdRestart()
| Task< TimeSpan > dnp3.MasterChannel.ColdRestart |
( |
AssociationId |
association | ) |
|
|
inline |
Asynchronously perform a cold restart operation to the association
- Parameters
-
| association | Id of the association |
- Returns
- Result of the restart task
- Exceptions
-
◆ CreateSerialChannel()
Create a master channel on the specified serial port
The returned master must be gracefully shutdown with MasterChannel.Shutdown() when done.
- Parameters
-
| runtime | Runtime to use to drive asynchronous operations of the master |
| config | Generic configuration for the channel |
| path | Path to the serial device. Generally /dev/tty0 on Linux and COM1 on Windows. |
| serialParams | Serial port settings |
| openRetryDelay | delay between attempts to open the serial port |
| listener | Listener to receive updates on the status of the serial port |
- Returns
- Handle to the master created,
null if an error occurred
- Exceptions
-
◆ CreateTcpChannel()
Create a master channel that connects to the specified TCP endpoint(s)
- Parameters
-
| runtime | Runtime to use to drive asynchronous operations of the master |
| linkErrorMode | Controls how link errors are handled with respect to the TCP session |
| config | Generic configuration for the channel |
| endpoints | List of IP endpoints. |
| connectStrategy | Controls the timing of (re)connection attempts |
| listener | TCP connection listener used to receive updates on the status of the connection |
- Returns
- Handle to the master created,
null if an error occurred
- Exceptions
-
◆ CreateTlsChannel()
Create a master channel that connects to the specified TCP endpoint(s) and establish a TLS session with the remote.
- Parameters
-
| runtime | Runtime to use to drive asynchronous operations of the master |
| linkErrorMode | Controls how link errors are handled with respect to the TCP session |
| config | Generic configuration for the channel |
| endpoints | List of IP endpoints. |
| connectStrategy | Controls the timing of (re)connection attempts |
| listener | TCP connection listener used to receive updates on the status of the connection |
| tlsConfig | TLS client configuration |
- Returns
- Handle to the master created,
null if an error occurred
- Exceptions
-
◆ DemandPoll()
| void dnp3.MasterChannel.DemandPoll |
( |
PollId |
pollId | ) |
|
|
inline |
Demand the immediate execution of a poll previously created with MasterChannel.AddPoll.
This method returns immediately. The result will be sent to the registered IReadHandler.
This method resets the internal timer of the poll.
- Parameters
-
- Exceptions
-
◆ Disable()
| void dnp3.MasterChannel.Disable |
( |
| ) |
|
|
inline |
stop communications
- Exceptions
-
◆ Enable()
| void dnp3.MasterChannel.Enable |
( |
| ) |
|
|
inline |
start communications
- Exceptions
-
◆ GetDecodeLevel()
Get the decoding level for the channel
- Returns
- Decode level
- Exceptions
-
◆ Operate()
Asynchronously perform a command operation on the association
- Parameters
-
| association | Id of the association |
| mode | Operation mode |
| command | Command to send |
- Returns
- Result of the command task
- Exceptions
-
◆ Read()
Perform a read on the association.
The callback will be called once the read is completely received, but the actual values will be sent to the IReadHandler of the association.
- Parameters
-
| association | Association on which to perform the read |
| request | Request to send |
- Returns
- Result of the read task
- Exceptions
-
◆ ReadWithHandler()
Perform a read on the association.
The callback will be called once the read is completely received, but the actual values will be sent to the IReadHandler passed as a parameter.
- Parameters
-
| association | Association on which to perform the read |
| request | Request to send |
| handler | Custom IReadHandler to send the data to |
- Returns
- Result of the read task
- Exceptions
-
◆ RemoveAssociation()
Remove an association from the channel
- Parameters
-
- Exceptions
-
◆ RemovePoll()
| void dnp3.MasterChannel.RemovePoll |
( |
PollId |
pollId | ) |
|
|
inline |
Add a periodic poll to an association
Each result of the poll will be sent to the IReadHandler of the association.
- Parameters
-
| pollId | Id of the created poll |
- Exceptions
-
◆ SetDecodeLevel()
| void dnp3.MasterChannel.SetDecodeLevel |
( |
DecodeLevel |
decodeLevel | ) |
|
|
inline |
Set the decoding level for the channel
- Parameters
-
| decodeLevel | Decoding level |
- Exceptions
-
◆ Shutdown()
| void dnp3.MasterChannel.Shutdown |
( |
| ) |
|
|
inline |
◆ SynchronizeTime()
Asynchronously perform a time sync operation to the association
- Parameters
-
| association | Id of the association |
| mode | Time sync mode |
- Returns
- Result of the time synchronization task
- Exceptions
-
◆ WarmRestart()
| Task< TimeSpan > dnp3.MasterChannel.WarmRestart |
( |
AssociationId |
association | ) |
|
|
inline |
Asynchronously perform a warm restart operation to the association
- Parameters
-
| association | Id of the association |
- Returns
- Result of the restart task
- Exceptions
-
The documentation for this class was generated from the following file: