Class DPIFaultManager¶
Defined in File DPIFaultManager.h
Class Documentation¶
-
class
DPIFaultManager
¶ Implements a manager to retrieve new faults and clean its queue.
It use PrarameterObejcts instead of FaultObject because it doesn’t contain the needed information
Public Types
-
using
NewFaultObjectHandler
= std::function<void(const DPIFaultObject &fault)>¶
-
using
NewFaultHandler
= std::function<void(const DPIFaultParameter &fault)>¶
-
using
TrippedDeviceHandler
= std::function<void(bool)>¶
Public Functions
-
DPIFaultManager
()¶ Default constructor (clearFaults = true, resetDevice = false, getFaultDetails = false)
-
DPIFaultManager
(bool clearFaults, bool resetDevice, bool getFaultDetails)¶ Constructor.
- Parameters
clearFaults
: if true the manager clears the queue after it has retrieved a new faultresetDevice
: isn’t used yetgetFaultDetails
: if true the manager read all data from fault parameters
-
void
setNewFaultListener
(NewFaultHandler handler)¶ Sets a callback to receive a new fault.
- Parameters
handler
:
-
void
setTrippedDeviceListener
(TrippedDeviceHandler handler)¶ Sets a callback if the device changed trip-state.
- Parameters
handler
:
-
void
handleFaultParameters
(const SessionInfoIf::SPtr &si)¶ reads fault parameters and calls NewFaultHandler handler if it gets a new one
- Parameters
si
:
-
void
handleFaultParameters
(const SessionInfoIf::SPtr &si, const MessageRouter::SPtr &messageRouter)¶
-
void
writeCommand
(DPIFaultManagerCommands command, const SessionInfoIf::SPtr &si) const¶ Writs a command to DPI Fault Manager (e.g. clean fault or reset device)
- See
DPIFaultManagerCommands
- Parameters
command
: the command to sendsi
: the EIP session for explicit messaging
-
void
writeCommand
(DPIFaultManagerCommands command, const SessionInfoIf::SPtr &si, const MessageRouter::SPtr &messageRouter) const¶ - Note
used for testing
- Parameters
command
:si
:messageRouter
:
-
using