Hi,
I'm trying to implement znp-bringup.zjs in C#. I gave reference to TI.ZPI.dll in my program. Definition for every thing except ZEngine are found.
Can you please give path to definition of ZEngine.
BR
Srikanth
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
I'm trying to implement znp-bringup.zjs in C#. I gave reference to TI.ZPI.dll in my program. Definition for every thing except ZEngine are found.
Can you please give path to definition of ZEngine.
BR
Srikanth
Hi,
I made following changes in the script in my C# program:
ZPort portArray ;
ps[0] = new PortSettings("COM11", true);
portArray = new ZPort(ps[0]);
MessageAvailHandle = new ZPort.MsgAvailEventHandler(this.MessageHandler1);
portArray.AddOnMsgAvail(MessageAvailHandle);
private void MessageHandler1(ZPort zp, MsgAvailEventArgs msg)
{
msgHandler(zp.Name, (MESSAGE_ID)msg.ID1, msg.Message);
}
Similarly, I changed ZEngine.Send to
portArray.SendMsg(req);
1. But I'm not receiving any events in MessageHandler1. Any reasons why it is not working?
2. Also, what are the advantages of implementing ZNP. Currently, the only drawback I'm experiencing in the normal approach are:
a. While sending messages to the coordinator over COM port, I need to wait for the previous message to go over the air, before writing another message to the port.
b. When the coordinator receives messages from multiple sources at the same time, the messages are getting mixed up and I need to separate them in my program.
But, even in ZNP script whenever, ZEngine.Send is called, immediately ZEngine.Pause is called to create a delay and send message coordination is not automatically taken care even in ZNP. So, what are the other advantages to prefer ZNP over normal approach?
BR
Srikanth
Hi,
But, why to add the delay immedately after sending afdatarequest.
I'm yet to run the framework. I will get back with my observations.
BR
Srikanth
Thanks!
I'll take a look at the znp host framework. Is there any where in particular you started with or a resource that you found helpful?
Cheers,
KD
There are some 4 examples provided by ti. I started with dataSendRcv. In the initial stage you can just ensure that devices are joining the network before making suitable modifications to suit your requirement.