Class TrigActInfo
[Obfuscation(Exclude = true, ApplyToMembers = true)]
[Serializable]
public class TrigActInfo
Inheritance
Inherited Members
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 SourceDataIn
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
public byte[] DataIn
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
View SourceevRef
This is the unique event reference ID number for the event that this trigger is a part of.
Declaration
public int evRef
Field Value
Type | Description |
---|---|
System.Int32 |
See Also
View SourceInstance
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
public string Instance
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.
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
public int SubTANumber
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.
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
public int TANumber
Field Value
Type | Description |
---|---|
System.Int32 |
See Also
View SourceUID
This is the unique ID for the trigger or action within an event that this TrigActInfo is for.
Declaration
public int UID
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 SourceDeserializeLegacyData<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
public static TOutObject DeserializeLegacyData<TOutObject>(byte[] inData, bool willLog = false)
where TOutObject : class
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 |
Type Parameters
Name | Description |
---|---|
TOutObject | The type of object to deserialize the data to. Must be a class. |