50
Step 3: Response Tokens
At this point, if you used the script template above, you may now examine, use, and/or display the
contents of:
CRM-WIC_Response.status
CRM-WIC_Response.faultCode
CRM-WIC_Response.response1
CRM-WIC_Response.response2
CRM-WIC_Response.response3
[etc.]
The response tokens, like methods and call tokens, are all in the form of URL-encoded strings.
Visual Basic Scripting
To access an RPC using Visual Basic, first create a CRM-WIC object of type "CRM-WIC.UserAPI.1".
Then, call the method with the object, specifying any parameters in parentheses. For example, this script
in an Active Server Page retrieves the IP address of the CRM-WIC and the settings for serial ports 1 and
2.
Dim CRM-WICUser
Dim strIP, strErr
Dim strPort1, strPort2
set CRM-WICUser = CreateObject("CRM-WIC.UserAPI.1")
strIP = CRM-WICUser.Net_GetIPAddress
if(strIP = "") then
strErr = CRM-WICUser.GetLastErrorString
end if
strPort1 = CRM-WICUser.Serial_GetSettings(1)
strPort2 = CRM-WICUser.Serial_GetSettings(2)
Some notes:
•
Parameters and returned values are strings, integers, or Booleans, depending on the method.
•
The above example includes error checking for Net_GetIPAddress. Methods will report
errors based on the type of its return value. Strings will return the null string, integers will
return -1, and Booleans will return FALSE.
•
See the detailed list of methods at the end of this reference for details about the parameters
and return values for any given method. Parameter values are denoted by the text "
[in]
" in
the Syntax and Parameters sections. Similarly, the return value is denoted by the text
"
[out, retval]
".
•
String values should be passed in as URL encoded values. Returned strings are also URL
encoded.
Содержание CRM-WIC
Страница 1: ...Reference Manual Programming Guide Room Monitor Web Intelligent Controller Model CRM WIC...
Страница 7: ...7 Box Contents Box Contents for the CRM WIC Web Intelligent Controller Model CRMWIC Power Adapter...
Страница 8: ...8 Hardware User Interface Hardware User Interface for the CRM WIC...
Страница 16: ...16 For full details see the RPC section at the end of this manual...
Страница 43: ...43 This expression resolves to this value 0 1 4 3 1 Hello Hello 0...
Страница 98: ...98 Index...