|
dnp3
0.9.0
|
Represents a communication channel for a master station More...
Public Member Functions | |
| 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) |
| 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< ReadResult > | Read (AssociationId association, Request request) |
| Perform a read on the association. More... | |
| Task< CommandResult > | Operate (AssociationId association, CommandMode mode, Commands command) |
| Asynchronously perform a command operation on the association More... | |
| Task< TimeSyncResult > | SynchronizeTime (AssociationId association, TimeSyncMode mode) |
| Asynchronously perform a time sync operation to the association More... | |
| Task< RestartResult > | ColdRestart (AssociationId association) |
| Asynchronously perform a cold restart operation to the association More... | |
| Task< RestartResult > | WarmRestart (AssociationId association) |
| Asynchronously perform a warm restart operation to the association More... | |
| Task< LinkStatusResult > | CheckLinkStatus (AssociationId association) |
| Asynchronously perform a link status check More... | |
Static Public Member Functions | |
| 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 | CreateSerialChannel (Runtime runtime, MasterChannelConfig config, string path, SerialPortSettings 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.
|
inline |
Add an association to the channel
| 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 |
| ParamException |
|
inline |
Add a periodic poll to an association
Each result of the poll will be sent to the IReadHandler of the association.
| id | Association on which to add the poll |
| request | Request to perform |
| period | Period to wait between each poll (in ms) |
| ParamException |
|
inline |
Asynchronously perform a link status check
| association | Id of the association |
| ParamException |
|
inline |
Asynchronously perform a cold restart operation to the association
| association | Id of the association |
| ParamException |
|
inlinestatic |
Create a master channel on the specified serial port
The returned master must be gracefully shutdown with MasterChannel.Shutdown() when done.
| 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 |
null if an error occurred| ParamException |
|
inlinestatic |
Create a master channel that connects to the specified TCP endpoint(s)
| 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 |
null if an error occurred| ParamException |
|
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.
| pollId | Id of the poll |
| ParamException |
|
inline |
stop communications
| ParamException |
|
inline |
start communications
| ParamException |
|
inline |
|
inline |
Asynchronously perform a command operation on the association
| association | Id of the association |
| mode | Operation mode |
| command | Command to send |
| ParamException |
|
inline |
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.
| association | Association on which to perform the read |
| request | Request to send |
| ParamException |
|
inline |
|
inline |
Add a periodic poll to an association
Each result of the poll will be sent to the IReadHandler of the association.
| pollId | Id of the created poll |
| ParamException |
|
inline |
Set the decoding level for the channel
| decodeLevel | Decoding level |
| ParamException |
|
inline |
Shutdown a MasterChannel and release all resources
|
inline |
Asynchronously perform a time sync operation to the association
| association | Id of the association |
| mode | Time sync mode |
| ParamException |
|
inline |
Asynchronously perform a warm restart operation to the association
| association | Id of the association |
| ParamException |
1.8.16