Search Results for

    Show / Hide Table of Contents

    Class TrigActInfo

    • C#
    • Visual Basic
    [Obfuscation(Exclude = true, ApplyToMembers = true)]
    [Serializable]
    public class TrigActInfo
    <Obfuscation(Exclude:=True, ApplyToMembers:=True)>
    <Serializable>
    Public Class TrigActInfo
    Inheritance
    System.Object
    TrigActInfo
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: HomeSeer.PluginSdk.Events
    Assembly: PluginSdk.dll


    The internal data stored by HomeSeer describing a particular event action or trigger. Instances of this class are created and managed by HomeSeer and are passed through the AbstractPlugin to the ActionTypeCollection and TriggerTypeCollection respectively. You shouldn't need to work with this class directly and can rely on the decoded pieces exposed through the AbstractActionType and AbstractTriggerType classes in most situations.


    Fields

    View Source

    DataIn

    Serialized data for this action or trigger that the plugin needs. This is stored within the HomeSeer database and serves as the configuration for the ActionTypeCollection and TriggerTypeCollection this is for.

    Declaration
    • C#
    • Visual Basic
    public byte[] DataIn
    Public DataIn As Byte()
    Field Value
    Type Description
    System.Byte[]
    Remarks

    This is automatically unpacked by AbstractActionType and AbstractTriggerType if it contains a JSON string describing a Page. If it contains any other data format, like data from an HS3 plugin, AbstractTriggerType.ConvertLegacyData or AbstractActionType.ConvertLegacyData will be called. You can override these methods to define your own method for unpacking the data.

    See Also
    AbstractTriggerType
    AbstractActionType
    View Source

    evRef

    This is the unique event reference ID number for the event that this trigger is a part of.

    Declaration
    • C#
    • Visual Basic
    public int evRef
    Public evRef As Integer
    Field Value
    Type Description
    System.Int32
    See Also
    EventData
    View Source

    Instance

    If the plug-in supports multiple instances and this trigger or action is for one of the instances, then this field will have the instance name in it.

    Declaration
    • C#
    • Visual Basic
    public string Instance
    Public Instance As String
    Field Value
    Type Description
    System.String
    Remarks

    Multi-instance plugins were supported in HS3, but support for them was not carried over to HS4. This may change in the future, but, for now, this is an unused field.

    View Source

    SubTANumber

    When a trigger has subtypes, this is used to identify which sub-trigger or trigger subtype, this trigger is set to.

    For example, in HomeSeer there is a TIME trigger - this might identify whether it is the type AT, BEFORE, or AFTER a time value.

    Declaration
    • C#
    • Visual Basic
    public int SubTANumber
    Public SubTANumber As Integer
    Field Value
    Type Description
    System.Int32
    Remarks

    This is only used for triggers and can be ignored in favor of managing a subtype directly. HomeSeer will present a list of trigger subtypes to choose from if SubTriggerCount > 1. HomeSeer does not do the same for actions, and there is no corresponding

    SubActionCount
    property.

    View Source

    TANumber

    This is for plugin reference only. Plugins can support multiple types of different triggers or actions. This identifies which type of trigger or action, out of the triggers or actions offered by the plugin, that this TrigActInfo is for.

    Declaration
    • C#
    • Visual Basic
    public int TANumber
    Public TANumber As Integer
    Field Value
    Type Description
    System.Int32
    See Also
    ActionTypes
    TriggerTypes
    ActionTypeCollection
    TriggerTypeCollection
    View Source

    UID

    This is the unique ID for the trigger or action within an event that this TrigActInfo is for.

    Declaration
    • C#
    • Visual Basic
    public int UID
    Public UID As Integer
    Field Value
    Type Description
    System.Int32
    Remarks

    When the trigger is true, the plugin will pass this to HomeSeer to trigger to cause HomeSeer to check the conditions and trigger the event if appropriate. When the action needs to be carried out, HomeSeer will invoke the Handle procedure in the action, and if there is action information stored by the plugin, this property can be used to retrieve it.

    Methods

    View Source

    DeserializeLegacyData<TOutObject>(Byte[], Boolean)

    Deserialize the specified byte array to an object of type TOutObject using the legacy HomeSeer method for deserializing trigger/action data.

    Declaration
    • C#
    • Visual Basic
    public static TOutObject DeserializeLegacyData<TOutObject>(byte[] inData, bool willLog = false)
        where TOutObject : class
    Public Shared Function DeserializeLegacyData(Of TOutObject As Class)(inData As Byte(), willLog As Boolean = False) As TOutObject
    Parameters
    Type Name Description
    System.Byte[] inData

    The byte array to deserialize.

    System.Boolean willLog

    Whether the method should write log messages to the console.

    Returns
    Type Description
    TOutObject

    An object of type TOutObject or null if it was unsuccessful.

    Type Parameters
    Name Description
    TOutObject

    The type of object to deserialize the data to. Must be a class.

    • View Source
    In This Article
    Back to top HomeSeer Technologies