![background image](http://html1.mh-extra.com/html/xantech/crm-wic/crm-wic_reference-manual_3156372055.webp)
55
Serial Methods
Serial_GetSettings ( Port )
Returns the port settings for the specified serial port. Use the CRM-WIC DIP switches or Web interface to set these
parameters.
Syntax
HRESULT Serial_GetSettings(
[in] long Port,
[out, retval] BSTR* Settings
);
Parameters
Port
[in] Port number for the serial port. Valid values are 1 and 2.
Settings
[out, retval] Comma separated string representing the current port settings. On error, this parameter is returned as
NULL or “”. The format of the string is: baud-rate, parity, stop-bits, RS422-flag, flow-control, e.g.
"9600,8,NONE,1,0,HARDWARE".
Remarks
Valid values for the different settings are:
Baud: 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, and 115200
Parity: ODD, EVEN, NONE
Stop Bits: 1, 2
Flow Control: HARDWARE, SOFTWARE, NONE
Serial_Send ( Port, Msg, MaxWaitMS )
Sends a string to the specified port.
Syntax
HRESULT Serial_Send(
[in] long Port,
[in] BSTR Msg,
[in] long MaxWaitMS,
[out, retval] long* NotSent
);
Parameters
Port
[in] Port number for the serial port. Valid values are 1 and 2.
Msg
[in] URL encoded string to be sent to the port.
MaxWaitMS
[in] The number of milliseconds allowed to complete the sending of the serial data before timing out.
NotSent
[out, retval] If an error occurred or the timeout expired, then this is the number of bytes not sent; otherwise, this value
is set to 0.
Remarks
The Msg parameter text should be passed in as a URL encoded string. To have a Nul character sent out the serial port, pass a
“%00” as part of the Msg string.
Summary of Contents for CRM-WIC
Page 1: ...Reference Manual Programming Guide Room Monitor Web Intelligent Controller Model CRM WIC...
Page 8: ...8 Hardware User Interface Hardware User Interface for the CRM WIC...
Page 16: ...16 For full details see the RPC section at the end of this manual...
Page 43: ...43 This expression resolves to this value 0 1 4 3 1 Hello Hello 0...
Page 98: ...98 Index...