本文整理汇总了C#中ZWaveNode.RaiseUpdateParameterEvent方法的典型用法代码示例。如果您正苦于以下问题:C# ZWaveNode.RaiseUpdateParameterEvent方法的具体用法?C# ZWaveNode.RaiseUpdateParameterEvent怎么用?C# ZWaveNode.RaiseUpdateParameterEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZWaveNode
的用法示例。
在下文中一共展示了ZWaveNode.RaiseUpdateParameterEvent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetNodeHost
public void SetNodeHost(ZWaveNode node)
{
nodeHost = node;
nodeHost.RaiseUpdateParameterEvent(nodeHost, 0, ParameterType.PARAMETER_WATTS, 0);
}
示例2: GetEvent
public static ZWaveEvent GetEvent(ZWaveNode node, byte[] message)
{
ZWaveEvent nodeEvent = null;
byte cmdClass = message[7];
byte cmdType = message[8];
byte instanceCmdClass = message[9];
switch (cmdType)
{
case (byte)Command.MultiInstanceReport:
case (byte)Command.MultiInstaceV2Encapsulated:
byte[] instanceMessage;
byte instanceNumber = message[9];
// if it's a COMMAND_MULTIINSTANCEV2_ENCAP we shift key and val +1 byte
if (cmdType == (byte)Command.MultiInstaceV2Encapsulated)
{
instanceCmdClass = message[11];
instanceMessage = new byte[message.Length - 4];
System.Array.Copy(message, 4, instanceMessage, 0, message.Length - 4);
}
else
{
instanceCmdClass = message[10];
instanceMessage = new byte[message.Length - 3];
System.Array.Copy(message, 3, instanceMessage, 0, message.Length - 3);
}
switch (instanceCmdClass)
{
case (byte)CommandClass.Basic:
nodeEvent = Basic.GetEvent(node, instanceMessage);
break;
case (byte)CommandClass.Alarm:
nodeEvent = Alarm.GetEvent(node, instanceMessage);
break;
case (byte)CommandClass.SensorAlarm:
nodeEvent = SensorAlarm.GetEvent(node, instanceMessage);
break;
case (byte)CommandClass.SceneActivation:
nodeEvent = SceneActivation.GetEvent(node, instanceMessage);
break;
case (byte)CommandClass.SwitchBinary:
nodeEvent = SwitchBinary.GetEvent(node, instanceMessage);
if (nodeEvent != null)
{
node.RaiseUpdateParameterEvent(instanceNumber, EventParameter.MultiinstanceSwitchBinary, nodeEvent.Value);
}
break;
case (byte)CommandClass.SwitchMultilevel:
nodeEvent = SwitchMultilevel.GetEvent(node, instanceMessage);
if (nodeEvent != null)
{
node.RaiseUpdateParameterEvent(instanceNumber, EventParameter.MultiinstanceSwitchMultilevel, nodeEvent.Value);
}
break;
case (byte)CommandClass.SensorBinary:
nodeEvent = SensorBinary.GetEvent(node, instanceMessage);
if (nodeEvent != null)
{
node.RaiseUpdateParameterEvent(instanceNumber, EventParameter.MultiinstanceSensorBinary, nodeEvent.Value);
}
break;
case (byte)CommandClass.SensorMultilevel:
nodeEvent = SensorMultilevel.GetEvent(node, instanceMessage);
if (nodeEvent != null)
{
node.RaiseUpdateParameterEvent(instanceNumber, EventParameter.MultiinstanceSensorMultilevel, nodeEvent.Value);
}
break;
case (byte)CommandClass.Meter:
nodeEvent = Meter.GetEvent(node, instanceMessage);
break;
}
if (nodeEvent != null)
{
nodeEvent.Instance = (int)message[9];
}
break;
case (byte)Command.MultiInstanceCountReport:
byte instanceCount = message[10];
switch (instanceCmdClass)
{
case (byte)CommandClass.SwitchBinary:
nodeEvent = new ZWaveEvent(node, EventParameter.MultiinstanceSwitchBinaryCount, instanceCount, 0);
break;
case (byte)CommandClass.SwitchMultilevel:
nodeEvent = new ZWaveEvent(node, EventParameter.MultiinstanceSwitchMultilevelCount, instanceCount, 0);
break;
case (byte)CommandClass.SensorBinary:
nodeEvent = new ZWaveEvent(node, EventParameter.MultiinstanceSensorBinaryCount, instanceCount, 0);
break;
case (byte)CommandClass.SensorMultilevel:
nodeEvent = new ZWaveEvent(node, EventParameter.MultiinstanceSensorMultilevelCount, instanceCount, 0);
break;
//.........这里部分代码省略.........