• RuleAction
  • RuleAction Class

    Describes an action for a nymeaserver::Rule. More...

    Header: #include <RuleAction>

    Public Types

    enum Type { TypeDevice, TypeInterface }

    Public Functions

    RuleAction(const ActionTypeId & actionTypeId = ActionTypeId(), const DeviceId & deviceId = DeviceId(), const RuleActionParamList & params = RuleActionParamList())
    RuleAction(const QString & interface, const QString & interfaceAction, const RuleActionParamList & params = RuleActionParamList())
    RuleAction(const RuleAction & other)
    ActionTypeId actionTypeId() const
    DeviceId deviceId() const
    ActionId id() const
    QString interface() const
    QString interfaceAction() const
    bool isEventBased() const
    bool isValid() const
    RuleActionParam ruleActionParam(const ParamTypeId & ruleActionParamTypeId) const
    RuleActionParam ruleActionParam(const QString & ruleActionParamName) const
    RuleActionParamList ruleActionParams() const
    void setRuleActionParams(const RuleActionParamList & ruleActionParams)
    Action toAction() const
    Type type() const
    void operator=(const RuleAction & other)

    Detailed Description

    Describes an action for a nymeaserver::Rule.

    A RuleAction describes a special form of an Action for a nymeaserver::Rule. The main difference is the RuleActionParam, which allows to use an EventTypeId within a nymeaserver::Rule to execute this RuleAction.

    See also nymeaserver::Rule and RuleActionParam.

    Member Type Documentation

    enum RuleAction::Type

    ConstantValueDescription
    RuleAction::TypeDevice0The RuleAction describes a device Action.
    RuleAction::TypeInterface1The RuleAction describes an interface based Action.

    Member Function Documentation

    RuleAction::RuleAction(const ActionTypeId & actionTypeId = ActionTypeId(), const DeviceId & deviceId = DeviceId(), const RuleActionParamList & params = RuleActionParamList())

    Constructs a RuleAction with the given by actionTypeId, deviceId and params.

    RuleAction::RuleAction(const QString & interface, const QString & interfaceAction, const RuleActionParamList & params = RuleActionParamList())

    Constructs a RuleAction with the given by interface and interfaceAction.

    RuleAction::RuleAction(const RuleAction & other)

    Constructs a copy of the given other RuleAction.

    ActionTypeId RuleAction::actionTypeId() const

    Returns the actionTypeId of this RuleAction.

    DeviceId RuleAction::deviceId() const

    Returns the deviceId of this RuleAction.

    ActionId RuleAction::id() const

    Return the ActionId of this RuleAction.

    QString RuleAction::interface() const

    Returns the name of the interface associated with this RuleAction.

    QString RuleAction::interfaceAction() const

    Returns the name of the action of the associated interface.

    bool RuleAction::isEventBased() const

    Return true, if this RuleAction contains a RuleActionParam which is based on an EventTypeId.

    bool RuleAction::isValid() const

    Return true, if the actionTypeId and the deviceId of this RuleAction are valid (set).

    RuleActionParam RuleAction::ruleActionParam(const ParamTypeId & ruleActionParamTypeId) const

    Returns the RuleActionParam of this RuleAction with the given ruleActionParamTypeId. If there is no RuleActionParam with th given id an invalid RuleActionParam will be returnend.

    See also RuleActionParam.

    RuleActionParam RuleAction::ruleActionParam(const QString & ruleActionParamName) const

    Returns the RuleActionParam of this RuleAction with the given ruleActionParamName. If there is no RuleActionParam with th given name an invalid RuleActionParam will be returnend.

    See also RuleActionParam.

    RuleActionParamList RuleAction::ruleActionParams() const

    Returns the RuleActionParamList of this RuleAction.

    See also setRuleActionParams() and RuleActionParam.

    void RuleAction::setRuleActionParams(const RuleActionParamList & ruleActionParams)

    Set the RuleActionParamList of this RuleAction to the given ruleActionParams.

    See also ruleActionParams() and RuleActionParam.

    Action RuleAction::toAction() const

    Converts this RuleAction to a normal Action.

    See also Action.

    Type RuleAction::type() const

    Returns whether this RuleAction is targetting a specific device or rather an interface.

    void RuleAction::operator=(const RuleAction & other)

    Copy the data to a RuleAction from an other rule action.