Basic Usage

Applicaions written in Javascript or Visual Basic communicate with EDNet OCX by using Events and Attributes. Applications should use events to not only send commands but also receive notification from the network. The value of attributes can be fetched or changed with events.

EDNet OCX provides just two API functions for applications:

sendEvent (event, data);
getAttr (attr, value);

sendEvent() function is used to send events to EDNet OCX. The first parameter event is a integer value and stands for event type. The second parameter data is a string and contains event-related additional parameters.

getAttr() function is used to retrieve the value of a attribute. The first parameter attr is a integer value and stands for attribute type. The second parameter value is string variable to be stored value.

If events for the application occur, they are notified by calling following event handler of EDNet OCX. Applications should register callback function for this event handler in order to process events.

onEvent (event, data)

Like sendEvent() function, The first parameter event is a integer value and stands for event type. The second parameter data is a string and contains event-related additional parameters.