ssCore.SerialIO.open

Open a COM port for communication.


Availability:

First available in version 3.8 build 333.


Input Parameters:

port - The device name of the serial port you want to use e.g. 'com1', 'com2', etc.

baudRate - Baud Rate Valid values include: 110,300,600,1200,2400,4800,9600,14400,19200,38400,56000,57600,115200,128000,256000.

dataBits - Data Bits Valid values include: 5,6,7,8.

parity - Parity Valid values include: NONE,ODD,EVEN,MARK,SPACE.

stopBits - Stop Bits Valid values include: 1,1,5,2.


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.open( paramsObject [, callbackParamsObject] [, errorParamsObject] );


Synchronous Mode:

When this method is called synchronously, a return object containing the output parameters is returned to the caller immediately.

var returnObject = ssCore.SerialIO.open( paramsObject );


Notes:

None.


Examples:

var r:Object = ssCore.SerialIO.open({port:"com1", baudRate:"115200", parity:"none", dataBits:8, stopBits:1});
if (!r.success) ssDebug.trace("open failed: " + r.Error.description);