public class PlcListener : Listener,
IPlcHeadEnd
PlcListener | Creates a new instance of PLC listener. Constructor used by XML serializer. |
Active |
Indicates inf the listener is listening.
(Inherited from Listener) |
ActiveOnStartup |
Indicates whether the hosting service should start this listener on startup.
(Inherited from Listener) |
ByteDisplayMode |
Style to display data in a log.
(Inherited from Listener) |
Debug |
Indicates if debug log is created or not.
(Inherited from Listener) |
DisableEvents |
Whether the listener does not accept spontaneous events.
(Inherited from Listener) |
DisplayBytesLength |
Count of bytes to display on a single line in a log. It is applicable only if DefaultByteDisplayMode is set to ByteDisplayModes.Hex.
(Inherited from Listener) |
DisplaySystemChars |
Applies to ByteDisplayMode is Chars or Lines. Whether to display characters lower than 32. Their hex codes prefixed with '#'
will be displayed in a log.
(Inherited from Listener) |
ID |
Unique listener identifier among all listeners used.
(Inherited from Listener) |
Info |
Returns a brief description including main parameters.
(Inherited from Listener) |
InputEncoding |
Encoding used to convert incomming bytes to string. It is used to display correct characters in a log if ByteDisplayMode is set
to Chars or Lines.
(Inherited from Listener) |
InputEncodingCodePage |
Code page of InputEncoding used by xml serializer to store the code page.
(Inherited from Listener) |
InputLineSeparator |
Line separators to control displaying bytes if ByteDisplayMode is equal to ByteDisplayModes.Lines.
(Inherited from Listener) |
InputLineSeparatorStr |
InputLineSeparator as string used by xml serializer to store InputLineSeparator property.
(Inherited from Listener) |
InterfaceName |
Returns listener interface name.
(Inherited from Listener) |
IsNotResponding |
Indicates that listener is not responding although many rquests were done. It may indicate that listener driver is in failed state and wathdog file for this listener should not be updated.
Applied especially for PLC. For all other listerens returns false.
(Inherited from Listener) |
ListenerParams |
Parameters of the listener.
(Inherited from Listener) |
ListenerParamValues |
Property used to store listener parameters.
(Inherited from Listener) |
LogDir |
Directory where listener logs should be stored. Listener creates every day one file. You have to initialize this property after
listener is created or loaded otherwise no logging support will be provided.
(Inherited from Listener) |
Manager | PLC driver manager. |
Name |
Name of the listener displayed in the log.
(Inherited from Listener) |
OutputEncoding |
Encoding used to convert outgoing bytes to string. It is used to display correct characters in a log if ByteDisplayMode is set
to Chars or Lines.
(Inherited from Listener) |
OutputEncodingCodePage |
Code page of OutputEncoding used by xml serializer to store the code page.
(Inherited from Listener) |
OutputLineSeparator |
Line separators to control displaying bytes if ByteDisplayMode is equal to ByteDisplayModes.Lines.
(Inherited from Listener) |
OutputLineSeparatorStr |
OutputLineSeparator as string used by xml serializer to store OutputLineSeparator property.
(Inherited from Listener) |
Setup |
Returns a string describing the current listener setup.
(Inherited from Listener) |
UpdateWatchdogFile |
Whethrer watchdog file should be created and regularly updated for this listener to check if this listener is active.
(Inherited from Listener) |
CreateLogDataLines |
Creates lines for communication log of incoming/outgoing data formatted according to the listener settings.
(Inherited from Listener) |
DataConfirm | Called when some data send was confirmed by PLC channel. |
DataIndication | Called when some data was received from a PLC channel. |
Dispose |
IDisposable.Dispose implementation
(Inherited from Listener) |
DriverReset | Called when PLC driver was reset and PLC network needs to be built again. |
FindPrimeNodeByMac | Searches for the first node that matches the MAC address passed as a parameter. |
FindPrimeNodeByMeterID | Searches for the first node that matches the meter ID passed as a parameter. |
GetPrimeTopology | Returns descendants of switch with ID sid. |
IsCommunicatorForSource |
Returns true if communicator passed as parameter is the one that can accept incoming data of this listener. Otherwise it returns false.
(Inherited from Listener) |
LoadLog(DateTime) |
Loads specified log files and returns their contents.
(Inherited from Listener) |
LogDebug | Called when some message needs to be logged to the debug log. |
LogError | Called when some exception needs to be logged to the listener log. |
LogInfo | Called when some information message needs to be logged to the listener log. |
ManagerFailure | Called when PLC manager main thread stops due to fatal error. |
MeterConnected | Called when new meter was connected (or known meter was re-connected) to the PLC network. |
MeterDisconnected | Called when a meter was disconnected from the PLC network. |
RegisterCommunicator |
Registers a communicator to start receive incoming data of this listener.
(Inherited from Listener) |
ShutDown |
Stops listening and dispatching data.
(Inherited from Listener) |
Start |
Starts listening and dispatching incoming data.
(Inherited from Listener) |
Store |
Stores current listener to a xml file with file name indicated by FileName property.
(Inherited from Listener) |
UnregisterCommunicator |
Unregisters a communicator to stop receive incoming data of this listener.
(Inherited from Listener) |
AdditionalDispatch |
Procedure that is executed anytime some data are received by this listener. It allows to fire some additional action that is not
requested by any communicator. This procedure is executed in listener waiting loop and therefore should return immediately. Time
consuming operations (like database operations) should be executed in a new thread.
(Inherited from Listener) |
DefaultParamValues | Default values of the parameters in the ConnectionParams. |
LogLineAdded |
Procedure that is executed anytime a new line is added to a listener log.
(Inherited from Listener) |
OnBuildExceptionMessage |
Procedure that builds error message for log. If it is not set, only exception message is logged.
(Inherited from Listener) |
OnConnected |
Procedure used to notify about remote client connection. This procedure is executed in listener waiting loop and therefore should return immediately.
Time consuming operations (like database operations) should be executed in a new thread. Throwing an exception in this procedure could shut down
the listener.
(Inherited from Listener) |
OnDisconnected |
Procedure used to notify about remote client disconnection. This procedure is executed in listener waiting loop and therefore should return immediately.
Throwing an exception in this procedure could shut down the listener.
(Inherited from Listener) |
OnDriverReset | Procedure that is called when PLC driver was reset. |
OnFailure |
Procedure used to notify about listener shutdown due to an error.
(Inherited from Listener) |
OnGetCurrentTime |
Procedure that returns current date/time. This procedure can be set if other time than DateTime.Now needs to be returned as current date/time.
If this property is null, DateTime.Now is used as current date/time.
(Inherited from Listener) |
OnMeterConnected | Procedure that is executed when a meter was connected to the PLC network. |
OnMeterDisconnected | Procedure that is executed when a meter was disconnected from the PLC network. |
OnShutdown |
Procedure used to notify about successfull listener stop.
(Inherited from Listener) |
OnStartup |
Procedure used to notify about sucessfull listener startup.
(Inherited from Listener) |
PlcDriverBin | Index of the parameter "DriverBin" in the ListenerParams. |
PlcDriverDatPort | Index of the parameter "DriverDatPort" in the ListenerParams. |
PlcDriverDevice | Index of the parameter "DriverDevice" in the ListenerParams. |
PlcDriverIp | Index of the parameter "DriverIp" in the ListenerParams. |
PlcDriverMAC | Index of the parameter "DriverMAC" in the ListenerParams. |
PlcDriverMgmPort | Index of the parameter "DriverMgmPort" in the ListenerParams. |
PlcDriverPath | Index of the parameter "DriverPath" in the ListenerParams. |
PlcDriverType | Index of the parameter "DriverType" in the ListenerParams. |
PlcMaxHoursWithoutDataIndication | Index of parameter "MaxHoursWithoutDataIndication" in the ListenerParams. Zero means not used. |
PlcMaxRequestsWithoutResponse | Index of parameter "MaxRequestsWithoutResponse" in the ListenerParams. Zero means not used. |
PlcParamNames | Names of the parameters in the ListenerParams. |