.Net Code For HAI OmniLink Notifications

pdkwork

New Member
I am completely stuck. I have tried to figure out how to program code to receive notifications sent by an OmniPro II. I can use the SDK but I am trying to use my own code. My code works to send and receive data to the OPII but I just don't know how to code for notifications. Can anyone share a code fragment or point me in the right direction?

Thanks
 
Processing notifications is a multi-step process.

1. Connect to panel and set callback function:
HAC.Connection.Connect(AddressOf HandleConnectStatus, AddressOf HandleUnsolicitedPackets)


2. Enable notifications:
HAC.Connection.Send(New clsOL2EnableNotifications(HAC.Connection, True), Nothing)


3. Process notifications in your callback function:
Private Function HandleUnsolicitedPackets(ByVal B() As Byte) As Boolean
 
It's been a while since I worked with the .Net SDK.  But the first thing that comes to mind is whether or not you have enabled notifications.  To enable notifications you would execute the following statement.

 HAC.Connection.Send(new clsOL2EnableNotifications(HAC.Connection, true), null);
 
Refer to the HandleUnsolicitedPackets method in the Example1 project from the SDK for an example on how to handle the received notifications.
 
 
 
Thanks everyone for the replies. I have used the dll from the HAI SDK in my code but I need to write my own dll instead of using the SDK dll. I plan on using the code cross platform which is why I can't use the dll.
 
Back
Top