ssCore.SerialIO.read

Read data from the serial port, and send it to Flash using the event notification system.


Availability:

First available in version 3.8 build 333.


Input Parameters:

None.


Output Parameters:

No output parameters.


Asynchronous Mode:

When this method is called asynchronously, a return object containing the output parameters is passed to the specified callback function.

ssCore.SerialIO.read( paramsObject [, callbackParamsObject] [, errorParamsObject] );


Synchronous Mode:

This method can only be called asynchronously.


Notes:

None.


Examples:

ssCore.SerialIO.open({port:"com1", baudRate:"115200", parity:"none", dataBits:8, stopBits:1});

ssCore.SerialIO.setNotify({event:"onReceive"}, {callback:onReceiveHandler});

function onReceiveHandler(ret_obj, cb_obj, err_obj)
{
if (ret_obj.success)
        ssDebug.trace(ret_obj.result);
}

// No data is received by onReceiveHandler function until you call
// the SerialIO.read function.

ssCore.SerialIO.read({}, {sync:false}); MUST be called asynchronously