... 12 OWERING CRM-WIC C ETERMINE ONNECTION DHCP NABLING ISABLING CRM-WIC CCESSING THE THROUGH THE ONFIGURING THROUGH THE ONFIGURING THROUGH THE USING THE CRM-WIC ... 15 ... 15 ESTING ARDWARE PLOADING IRMWARE PGRADES ... 15 IEWING ERVER PLOADING USTOM ANAGING...
Page 3
EXAMPLE #2: Net_GetSubnetMask ... 47 ... 48 AULT ODES SING ACROMEDIA LASH STEP 1: Pass CRM-WIC IP Address to Flash... 48 Step 2: Call RPC with HTTP Post ... 49 Step 3: Response Tokens... 50 ... 50 ISUAL ASIC CRIPTING ...
Introduction Xantech’s Commercial Room Monitor – Web Intelligent Controller is a stand-alone room controller and also the long awaited ‘glue’ piece providing dynamic RS232 feedback module from any RS232 device for the Commercial CSPLCD TouchPanel displays. On it’s own, the Web Intelligent Controller is an Event driven component with two RS232 ports (configurable for RS422 and RS485) and a single IP port.
Hardware User Interface Hardware User Interface for the CRM-WIC...
Page 9
422/485, and Handshaking for Serial Ports 1 and 2. It is possible to override the dipswitch settings by using the Admin Web Pages Green LED The green LED indicates that the CRM-WIC is Indicator for powered. Power Power Adapter The CRM-WIC is powered using the included Port Power Adapter.
Specifications Size Weight Power Adapter Processor Memory Ports Monitoring Network Access CRM-WIC Input Voltage Network Adapter RS-232/RS-422/485 * Available Flash Memory may vary based on firmware version. Pin-Outs 5.4" H x 4.4" W x 0.95" D 0.6 lbs. 12V DC...
9600 19200 38000 57600 115000 Position 5: Number Bits 8 Bits 7 Bits 10.10.10.10 255.255.255.0 10.10.10.1 CRM-WIC admin Position 6-7: Parity Position 8: Stop Bits Position 9: Serial Port RS-422-485 Position 10-11: Handshaking (Jump to None Even 1 Bits 2 Bits ON...
STEP 1: Powering Up Locate the power adapter which came with your CRM-WIC. Plug the small end into the power supply port on the upper right side of the CRM-WIC, and the large plug into a wall socket or compatible power supply.
DHCP Enabled IP Address Subnet Mask Gateway After all the LEDs flash once, wait for the blue LED to start blinking slowly. The CRM-WIC will then be ready to accept connections. 10.10.10.11 255.255.255.0 10.10.10.1 Automatic...
Accessing the CRM-WIC through the Network Once the CRM-WIC is physically connected to the network, and the blue light is blinking slowly, you may access the CRM-WIC through your web browser, ftp client, and other network clients. Upload User-Defined Web pages to:...
Web Pages , page 20} Uploading Firmware Upgrades Firmware upgrade files may be uploaded, one file at a time, to the CRM-WIC after the CRM-WIC is set to firmware upgrade mode. The CRM-WIC may be set to firmware upgrade mode through the serial Boot Menu or the Admin Web Pages.
Page 16
For full details, see the RPC section at the end of this manual.
Accessing the Boot Menu with a Serial Connection Connect the Serial 1 Port of the CRM-WIC to your computer with an RS-232 Data Transfer Cable (also known as a Null Modem Cable). Using Hyper Terminal (or similar software), connect to the CRM-WIC with the default Serial Settings: Baud Rate: 9600, Data bits: 8, Parity: None, Stop bits: 1, and Flow control: None.
• OS Filename 1: Restore Factory Defaults This option restores the CRM-WIC’s network settings to the factory defaults. {see Factory Default Configurations on page 11}. 2: Configure IP Settings You may enable DHCP or manually set an IP address, subnet mask, and gateway IP address.
Select "5" to upgrade the OS (*.AFW) or bootstrap loader (*.ABT) file. The Boot Menu display will first indicate some network initialization, and then the CRM-WIC will prompt you to use a tftp (trivial ftp) client to upload your upgrade file to the CRM-WIC at a specific IP address.
• DIAGNOSTIC – serial port configuration settings, firmware upgrade instructions, logs, options, and other diagnostic tools for using and/or monitoring CRM-WIC hardware. • EVENT MANAGER {see separate section, The Event Manager, page 30} - powerful non- programming tool to automate CRM-WIC tasks.
This web page allows you to set several administrative options. Many of these options are also available from the Boot Menu. Firmware Version The firmware version installed on the CRM-WIC is displayed. Date / Time The current date and time is displayed. You may also set the date and time using the pulldown menus.
Network Settings If DHCP is enabled for the CRM-WIC, the IP Address, Subnet Mask, and Default Gateway are automatically assigned, and the values will be grey and uneditable. If the DHCP is disabled, the values for IP Address, Subnet Mask, and Default Gateway will be black and editable.
SERIAL: Serial Port Diagnostics The serial port diagnostics are available for the CRM-WIC From this web page, you may access three diagnostics for the serial ports. Serial Send & Receive Histories First, you may monitor the send and receive histories from either serial port.
Page 25
Send String The second diagnostic allows you to send a byte stream through the port specified at the top of the page. The byte stream you wish to send must be a URL-encoded send string: To send a URL-encoded string, follow these three rules for encoding: 1.
You may also choose whether to use RS-232 or RS-422/285 signal levels. MEMORY: System Memory Information System memory information is available for the CRM-WIC. File space reflects the hard disk space available for custom web pages. RAM reflects the status of the system memory.
LOG: Log Files Log files for the CRM-WIC servers are available for the CRM-WIC. An admin may review or clear (reset) the logs from this page: RPC Server Info Displays the build date and version number of the RPC server. Also displays all tokens and methods available from the server.
-i [IP Address] put [Filename with Full Path] If ActiveX is enabled for your web browser, you may also request that the CRM-WIC create a batch file CRM-WICload.bat that will execute this command. The batch file will be placed at the root of your local drive.
Details of the Event Manager are described in the section, The Event Manager. Files This link will simply take you to the CRM-WIC's ftp server: ftp://[IP Address or Host Name]/ Any custom web pages uploaded to the /wwwpub directory may be viewed at:...
The Event Manager The Event Manager is a feature of the CRM-WIC that allows you to program the CRM-WIC to perform operations autonomously. With the Event Manager, you can associate different hardware or software events with actions to be performed directly on the CRM-WIC. There is then no need to continuously control the CRM-WIC using some client side software.
The Event Manager Web Page The Event Manager page may be accessed by clicking on "Events" at the top of any page. This page is organized by events, actions, and variables. Note that actions are always associated with its event. Selecting an event will highlight the event and display all its associated actions.
Events Creating and Editing Events Selecting the "Add event" button from the Event Manager page will create a new event, while selecting the "Edit" button above the Event list will allow you to edit whichever event is highlighted. You will be prompted for the name of the event, the type of event, and any options associated with the event, as described in the next two sections.
While Clock Events allow you to schedule recurring tasks based on fixed, regular calendar periods (daily, weekly, etc,), Timer Events allow you to schedule recurring tasks based on user-defined time periods. For example, a Timer Event may be triggered every 27 seconds or 36 hours. Variable A Variable Event is triggered when the value of a variable matches a constant or expression.
Actions Creating and Editing Actions Actions are the tasks performed when an event is triggered, so they are always associated and displayed with their events. Actions may be created from the main Event Manager web page by first selecting an event, highlighting it, and then selecting the "Add action"...
If the "(expression)" check box is CHECKED, the Output Variable will be assigned the value calculated for the specified expression in the Output Value text box. The interpretation and calculation of expressions are detailed in the Expressions section. Serial A Serial Action allows you to send an Output Value to a specified port. If the "(expression)" check box is UNCHECKED, the value in the Output Value text box will be sent as a string to the specified port.
The storage of the Current Value does take some time, since it is stored into flash. Therefore, if a variable is changed often, such as a counter, the CRM-WIC will perform more efficiently if you set a Default Value, and UNCHECK the "Persist" check box.
Current Value The Current Value is the working value of the variable. It is the value accessed in all Event and Action expressions. In addition, Variable Actions [[see page]] send their outputs to the Current Value. The Current Value is set to the Default Value during system start-up, if the Persistent flag is not set. Types of Variables Number A Number Variable can have an integer value between -2...
(NOTE: Variable Events and Actions automatically interpret the value based on its variable type On the other hand, if the "(expression)" option is CHECKED, the CRM-WIC will treat the values as expressions and evaluate them before matching on a trigger or sending an output.
Operators The operators that are supported are: • Arithmetic operations: +, -, *, / • Logical comparison operators: ==, != , <, > • Logical operators: &&, ||, ! • Bitwise operators: &, | , ~ • Range operator: in Addition/Plus (+) Operator The ‘+’...
Page 40
Multiplication/Times (*) Operator This operator multiplies two numbers, or can be used for creating a string with a repeating value. The numbers and strings can be either variables or literals. For example: This expression... "Hello"*3 3*"Hello" Division/Divide (/) Operator The divide operator is valid only for numerical values and variables. Use this operator to divide one numerical value by another.
Page 41
Not-Equal Comparison (!=) Operator The not-equal comparison operator will compare two tokens, which can be strings or integers. Exactly opposite to the equal comparison operator, the expression will return 0 if the two tokens are equivalent, and 1 if they are NOT equal. For example, assuming MyNumber has an integer value of 4, and MyName has a string value of "John": This expression...
Page 42
If Expression1 is... True (1) True (1) False (0) False (0) In other words: This expression... (3==3)&&(4==4) 1&&(4==5) 0&&(4==4) (3==6)&&0 Logical-Or (||) Operator Assume you have two Boolean expressions, Expression1 and Expression2, each returning true (1) or false (0). The logical-or operator determines the true or false state of the complex expression Expression1||Expression2 using the rules applying to a traditional logical OR statement: If Expression1 is...
Page 43
This expression..resolves to this value. !(4==3) !("Hello"=="Hello")
Page 44
Bitwise-And (&) Operator The bitwise-and operator performs the logical AND operation bit by bit between two integers. This is better understood by looking at the example of 12&10. The binary value of 12 is 1100, and the binary value of 10 is 1010. 12&10 is computed by performing an AND between each of the corresponding four bits: 12&10: Therefore: 12&10 = (Hex) 1000 = (Decimal) 8...
Range (in) Operator The ‘in’ operator compares a numerical value or variable against a range variable. The resultant type is an integer value of either 0 or 1. If the value is within the range, 1 is returned; otherwise, 0 is returned. For example, assume Count has a value of 15, Range10 has a value of 1 to 10, and Range20 has a value of 1 to 20 This expression...
Remote Procedure Calls The CRM-WIC supports remote procedure calls (RPCs) for most web interfaces, including HTML, Flash (.fla), and Active Server Pages (.asp). Methods are typically called using the HTTP Post syntax for HTML and Flash, and Visual Basic scripting for Active Server Pages.
Response Tokens The response tokens are: • status - 0 for Failure, 1 for Success • faultCode - If status is 0 (failure). faultCode will be an integer representing a specific error {Fault Codes, page 48}. This token is NOT returned if status is 1 (success). •...
STEP 1: Pass CRM-WIC IP Address to Flash To begin, you must pass the IP address of CRM-WIC to your Flash file. There is more than one way to do this, but below, we describe one sample method using JavaScript. NOTE: In this script, the .html and.swf files must reside on the CRM-WIC to determine the IP address.
Once you have the IP address, you are able to access the RPC server. Load the method and it's parameters into a LoadVars() object as shown below, then make the call with sendAndLoad(). // Get CRM-WIC IP RPCServerIP = [callerID, or whatever you used to get the IP address of the CRM-WIC];...
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 Dim CRM-WICUser...
Note on Error Checking The HRESULT, referred to in the Syntax of each method, ALWAYS returns "S_OK", so it is not useful in error checking. Instead, use the error checking values described in the HTTP Post and Visual Basic above, and the Error Information Methods below[[]] Errors are based on the type of a function’s out/retval value.
Parameters ErrorString [out, retval] String describing an error. Remarks ErrorString corresponds to response1 of an HTTP Post response when status is 0 (failure). GetLastExtendedErrorString ( ) Returns an extended description of the error from the last failed method call. Syntax HRESULT GetLastExtendedErrorString( [out, retval] BSTR* ExtErrorString Parameters...
Time_GetDate ( ) Returns current time and date on the device. Syntax HRESULT Time_GetDate( [out, retval] DATE* Date Parameters Date [out, retval] DATE object. Remarks If the returned DATE object represents a date before 1900, the returned value will be negative, signifying an error. The format is [year],[month],[day],[hour],[minute],[second],[millisecond]"...
Net_GetSubnetMask ( ) Returns the current subnet mask of the device. Syntax HRESULT Net_GetSubnetMask( [out, retval] BSTR* SubnetMask Parameters SubnetMask [out, retval] String containing the current subnet mask of the device, such as "255.255.255.0".
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.
Serial_Read ( Port ) Returns the contents of the serial read buffer for the specified serial port. Syntax HRESULT Serial_Read( [in] long Port, [out, retval] BSTR* Read Parameters Port [in] Port number for the serial port. Valid values are 1 and 2. Read [out, retval] URL encoded string read from the specified port.
Event Methods Most of the Event methods use the Event’s ID to retrieve information about an Event. The Event’s ID is set when an Event is created, and is unique to the Event. The ID is re-issued when the system is powered up or the reset button is pressed.
GetEventIdxById ( EventId ) Returns the index into the Event list for an Event with a specified ID. Syntax HRESULT GetEventIdxById( [in] long EventId, [out, retval] long* Idx Parameters EventId [in] ID for the specified event. [out, retval] The index of the Event in the Event list. Remarks The index returned will be in the range 0 to Count-1, where Count is the value returned by GetEventCount.
Remarks Type is returned as one of the following values: Value Type Unknown Scheduled Timer Variable Serial Input Digital Input A/D Input GetEventOption ( EventId, OptionType ) Returns the value of a specified option for a specified event. Syntax HRESULT GetEventOption( [in] long EventId, [in] long OptionType, [out, retval] long* OptionVal...
GetEventConcurrent ( EventId ) GetEventConcurrent returns a value signifying whether an Event’s Actions should run concurrently or sequentially. Syntax HRESULT GetEventConcurrent( [in] long EventId, [out, retval] long* Concurrent Parameters EventId [in] ID for the specified event. Concurrent [out, retval] 1 if actions should be executed concurrently, 0 if actions should be executed sequentially. Remarks When Actions are set to execute sequentially, the next Action in the list will not execute until the previous Action has completely executed.
GetEventMatch ( EventId ) Returns the expression to be evaluated or data to be compared when the Event is notified of a change in data Syntax HRESULT GetEventMatch( [in] long EventId, [out, retval] BSTR* Match Parameters EventId [in] ID for the specified event. Match [out, retval] [???]] Remarks...
GetEventSchRecurType ( EventId ) Returns the type of schedule used by the specified Event. Syntax HRESULT GetEventSchRecurType( [in] long EventId, [out, retval] long* RecurType Parameters EventId [in] ID for the specified event. RecurType [out, retval] Type of schedule to apply Valid values for RecurType are: Value Description Once...
Parameters EventId [in] ID for the specified event. MaskDay [out, retval] Day of the month, or a mask of bits for the days of the week. MaskDay values for weekly Events: Sunday Monday Tuesday Wednesday Thursday Friday Saturday Remarks This function is valid only for Clock Events. GetEventSchMonth ( EventId ) Returns the month value for the Event’s schedule.
GetEventSchYear ( EventId ) Returns the year part of the Event’s schedule. Syntax HRESULT GetEventSchYear( [in] long EventId, [out, retval] long* Year Parameters EventId [in] ID for the specified event. Year [out, retval] Integer representing the scheduled year (for example, "1984" or "2003"). Remarks This function gets a value that is not used by the Event Manager.
Parameters EventId [in] ID for the specified event. Hour [out, retval] Integer representing the scheduled hour. Values range from 0 to 23. Remarks This function is valid only for Clock and Timer Events. GetEventSchMinute ( EventId ) Returns the minute that the Event is to be triggered. Syntax HRESULT GetEventSchMinute( [in] long EventId,...
SetEventById ( EventId, Name, Type, Concurrent, Source, Match ) Sets the basic information about an existing Event. Syntax HRESULT SetEventById( [in] long EventId, [in] BSTR Name, [in] long Type, [in] long Concurrent, [in] BSTR Source, [in] BSTR Match, [out, retval] VARIANT_BOOL* Success Parameters EventId [in] ID for the specified event.
Syntax HRESULT SetEventByName( [in] BSTR Name, [in] long Type, [in] long Concurrent, [in] BSTR Source, [in] BSTR Match, [out, retval] VARIANT_BOOL* Success Parameters Name [in] Name of the Event to set the information for. Type [in] Type of Event, e.g. Clock Set Type to one of the following values: Value Type Scheduled...
Page 68
[in] BSTR OptionVal, [out, retval] VARIANT_BOOL* Success Parameters EventId [in] ID of the event to modify. OptionType [in] Integer specifying which option to modify. OptionVal [in] New value for the option. Success [out, retval] TRUE if specified option was successfully set, FALSE if setting the option failed. Remarks Pass one of the following values into OptionType: Value Option...
SetEventSchedule ( EventId, Recur, MaskOrDay, Month, Year, RecurEveryN, Hour, Minute, Second ) Modify the schedule settings of a specified event. Syntax HRESULT SetEventSchedule( [in] long EventId, [in] long Recur, [in] long MaskOrDay, [in] long Month, [in] long Year, [in] long RecurEveryN, [in] long Hour, [in] long Minute, [in] long Second,...
Remarks This function is valid only for Clock and Timer Events. If both SetEventSchedule and SetEventOption need to be called for an Event, then SetEventOption should be called before SetEventSchedule. CloneEventById ( EventId, CloneActions, NewName ) Clone (duplicate) an Event specified by its ID. Syntax HRESULT CloneEventById( [in] long EventId,...
Concurrent [in] Set to 1 to execute Actions concurrently, and 0 otherwise. [in] Port, variable, etc. to be used for the source of the Event’s trigger. The value of Source depends on the type of Source Event. Event Type Clock and Timer Variable Serial Match...
SortEvents ( SortType, Direction ) Sorts the list of Events by the sort type and direction. Syntax HRESULT SortEvents( [in] long SortType, [in] long Direction, [out, retval] VARIANT_BOOL* Success Parameters SortType [in] Type of sort to apply to the list. Direction [in] Direction of the sort: ascending (1) or descending (0).
Action Methods GetActionByIdx ( EventId, Idx ) Returns the Action ID for a specified Event ID and Action index number. Syntax HRESULT GetActionByIdx( [in] long EventId, [in] long Idx, [out, retval] long* ActionId Parameters EventId [in] ID of the Event that contains the Action. [in] Index number for the Action.
MoveActionByIdx ( EventId, Idx, Where ) Changes the order of execution for the Actions under the specified Event. Syntax HRESULT MoveActionByIdx( [in] long EventId, [in] long Idx, [in] long Where, [out, retval] VARIANT_BOOL* Success Parameters EventId [in] ID of specified event. [in] Index number for the Action of interest Where [in] Direction to move the Action in the execution order.
Remarks Action types that the CRM-WIC supports, depends on the device’s hardware capabilities. Type values are: Value Action Type Set a Variable’s value CRM-WIC Send serial data Trigger another Event GetActionOption ( ActionId, OptionType ) Returns the option for an Action, specified by its ID and the option type.
GetActionDelay ( ActionId ) Returns the “Delay before start” value for the specified Action. Syntax HRESULT GetActionDelay( [in] long ActionId, [out, retval] double* Delay Parameters ActionId [in] ID of the action to examine. Delay [out, retval] Number of seconds to delay. A millisecond is represented as 0.001 seconds. Remarks For Actions that execute concurrently and for the first Action in the execution list, the value returned by this function is the number of seconds that the Event Manager will wait after the owning Event has been triggered before executing the Action.
Parameters ActionId [in] ID of the action to examine. StopAfter [out, retval] The number of times to execute the Action Remarks If -1 is returned in StopAfter, then the Action will execute continuously until the owning Event is specifically canceled by an Action of type “Event”.
Remarks The output value for the Action depends on the type of Action. Action Type Returned values for Output Variable Depends on the type of Variable being assigned Serial A simple string or complex expression Event “0”: Cancel the Event “1”: Execute the Event “2”: Disable the Event “3”: Enable the Event...
Page 79
Variable. For Actions that execute or cancel an Event, the Port value is the name of the Event. In all other cases, Port is the name of the port of the associated device, e.g. “Port1”. Action types that the CRM-WIC supports, depends on the device’s hardware capabilities. Type values are: Value Action Type Set a Variable’s value CRM-WIC...
Variable. For Actions that execute or cancel an Event, the Port value is the name of the Event. In all other cases, Port is the name of the port of the associated device, e.g. “Port1”. Action types that the CRM-WIC supports, depends on the device’s hardware capabilities. Type values are: Value Action Type Set a Variable’s value CRM-WIC...
Variable. For Actions that execute or cancel an Event, the Port value is the name of the Event. In all other cases, Port is the name of the port of the associated device, e.g. “Port1”. Action types that the CRM-WIC supports, depends on the device’s hardware capabilities. Type values are: Value Action Type Set a Variable’s value CRM-WIC...
Syntax HRESULT SetActionOption( [in] long ActionId, [in] long OptionType, [in] long OptionVal [out, retval] VARIANT_BOOL* Success Parameters ActionId [in] ID for specified action. OptionType [in] Type of option to modify. OptionVal [in] Updated value for the option. Success [out, retval] TRUE if the specified action option was updated, FALSE if updating the option failed. Remarks Two options are supported for Actions: OptionType...
Variable. For Actions that execute or cancel an Event, the Port value is the name of the Event. In all other cases, Port is the name of the port of the associated device, e.g. “Port1”. Action types that the CRM-WIC supports, depends on the device’s hardware capabilities. Type values are: Value Action Type Set a Variable’s value CRM-WIC...
Page 85
Variable. For Actions that execute or cancel an Event, the Port value is the name of the Event. In all other cases, Port is the name of the port of the associated device, e.g. “Port1”. Action types that the CRM-WIC supports, depends on the device’s hardware capabilities. Type values are: Valid values for Output...
Value Action Type Set a Variable’s value CRM-WIC Send serial data Trigger another Event DeleteActionById ( ActionId ) Delete an Action with the given ID. Syntax HRESULT DeleteActionById( [in] long ActionId, [out, retval] VARIANT_BOOL* Success Parameters ActionId [in] ID of the Action to delete.
DeleteActionByIdx ( EventId, Idx ) Delete an Action from the specified Event’s list of Actions. Syntax HRESULT DeleteActionByIdx( [in] long EventId, [in] long Idx, [out, retval] VARIANT_BOOL* Success Parameters EventId [in] ID of the Event that owns the Action. [in] Index into the Event’s list of Actions that identifies which Action to delete. Success [out, retval] TRUE if the specified Action was successfully deleted, FALSE if deleting the Action failed.
Parameters SortType [in] Type of sort to perform Direction [in] Direction of the sort: 1 for ascending, and 0 for descending. Success [out, retval] TRUE if the Actions were successfully sorted, FALSE if sorting the Actions failed. Remarks This function is not supported in the version 2.0 firmware. GetActionCount ( EventId ) Returns the total number of Actions associated with an Event.
GetVariableByName ( Name ) Returns a Variable’s ID (not the value) from its name. Syntax HRESULT GetVariableByName( [in] BSTR Name, [out, retval] long* VarId Parameters Name [in] Name of Variable to get the ID of. VarId [out, retval] ID of the named Variable. GetVariableName ( VarId ) Returns the Variable’s name from its ID.
GetVariableType ( VarId ) Returns the type of the specified variable. Syntax HRESULT GetVariableType( [in] long VarId, [out, retval] long* Type Parameters VarId [in] ID of specified Variable. Type [out, retval] The type of value stored in the Variable. Valid types are: Type Value Description GetVariableDefault ( VarId ) Returns the default value of the specified variable.
Syntax HRESULT GetVariableValue( [in] long VarId, [out, retval] BSTR* Value Parameters VarId [in] ID of specified variable. Value [out, retval] String containing the current value of the specified variable. Remarks The returned value is a string that represents the stored value of the Variable. The string value will need to be converted by the caller into the actual type, e.g.
Page 92
Parameters VarId [in] ID of the Variable. Name [in] Name of the specified Variable (can be modified). Type [in] Variable type Valid types are: Type Value Description Default [in] Default value for the Variable. Value [in] Current value for the Variable. Persist [in] Set to 1 to make the Variable persistent.
SetVariableByName ( Name, Type, Default, Value, Persist ) Modifies a Variable, specified by its name. Syntax HRESULT SetVariableByName( [in] BSTR Name, [in] long Type, [in] BSTR Default, [in] BSTR Value, [in] long Persist, [out, retval] VARIANT_BOOL* Success Parameters Name [in] Name of the Variable to change. Type [in] Variable type Valid types are:...
Remarks Use SetVariableByID to modify the Variable’s name. Default and Value The returned value is a string that represents the stored value of the Variable. The string value will need to be converted by the caller into the actual type, e.g. a variable of type long. The format for the returned string depends on the Variable’s type.
Parameters Name [in] Name to give the newly added Variable. Type [in] Type of Variable to add. Valid types are: Type Value Description Default [in] Default value of the new Variable. Value [in] Current value of the new Variable. Persist [in] Set to 1 to make the Variable persistent, 0 if not.
Parameters VarId [in] ID of the Variable to delete. Success [out, retval] TRUE if the specified Variable was successfully deleted, FALSE if deleting the Variable failed. Remarks Get the ID of the variable by calling either GetVariableByName or GetVariableByIdx. DeleteVariableByName ( Name ) Delete a Variable specified by its name.
GetVariableCount ( ) Returns the total number of variables. Syntax HRESULT GetVariableCount( [out, retval] long* NumVariables Parameters NumVariables [out, retval] Total number of variables in the system. Remarks Use this function in conjunction with GetVariableByIdx to enumerate the list of available Variables.
Limited Warranty Xantech Corp. warrants that this product is free of defects in both materials and workmanship for a period of 1 year for parts and labor from date of purchase. During the warranty period, and upon proof of purchase, the product will be repaired or replaced (with same or similar model) at our option without charge for parts or labor for the specified warranty period (1 year parts and labor).
Need help?
Do you have a question about the CRM-WIC and is the answer not in the manual?
Questions and answers