void nodeParameterList_SetValue(object sender, Flobbster.Windows.Forms.PropertySpecEventArgs e) { string paramName = e.Property.Name; ccParameter param = activeNode.properties[paramName]; byte[] cmd = param.buildSetCmd(); if (cmd != null) { routedMessage msgValSet = new routedMessage(activeNode.address, cmd); SendRoutedMessage(msgValSet, SERIALCON); Debug.WriteLine(activeNode.name + ": set parameter: " + paramName + " to: " + param.Value.ToString()); } }
void cmdButton_Click(object sender, EventArgs e) { //call void function(void) on remote device Button b = sender as Button; if (b != null) { ccParameter param = b.Tag as ccParameter; if (param != null) { byte[] cmd = param.buildSetCmd(); if (cmd != null) { routedMessage msgValSet = new routedMessage(param.Owner.address, cmd); SendRoutedMessage(msgValSet, SERIALCON); } } } }