This function may have adverse effects on the touch screen when the user interface is also configured with a real control system program. Use this for emulating the user interface on a touch screen. NOTE: Using serviceModule.addEmulatorScenario(url) will always use the control system emulator.
serviceModule.addEmulatorScenario(url) will unconditionally load the JSON configuration file of the serialized emulation configuration JavaScript object.If you are using the Crestron Template Project, the serviceModule provides two functions Configure Emulation in the Template Project
When project sends a boolean true for join 11 (a ? or a ), toggle the value of state join 11.NOTE: Within the array of “onStart”, which emulates the initial state of the system when the user interface interacts with the control system emulator, the author can indicate the state joins that will be sent to the touch screen project when the emulation is loaded. The numeric state join will decrement the value of the “offset” property.Īs a special feature to emulate a preset or ramp of an numeric value, where the value changes over a period of time, the type of “o”/ ”object “ with a special “rcb” object can be provided. decrement: (Numeric Only) Paired with “offset” property.The numeric state join will increment the value of the “offset” property. increment: (Numeric Only) Paired with “offset” property.pulse: (Boolean Only) The value goes high (true) and then low (false).toggle: (Boolean Only) Reads the current state and changes it to the opposite state.set: Paired with “value”, with the combination setting the value of the state join returned.In the event of a cast failure, the value will be set to false, 0, or "" (empty string). Using this between incompatible join types will attempt to cast the value. This is applicable to all types provided that the event type matches the state type. link: Indicates the value of the event join is returned in the state join.state: Represents the join number or the state name defined in the contract.type: Values are same as the encapsulating event definition.Each item in the array can be set as follows: The actions are an array of states to be sent when the event condition is received by the emulator utility. There is a special trigger value that is valid for all three types of event as “&change”, which indicates the state joins should be sent for any value of the event. For string type, the type of the trigger should be a “string” surrounded by double quotes.For numeric type, the type of the trigger should be a number between 5.For Boolean type, the type of the trigger should be true or false.In general, the trigger, value is compared to the value received from the touch screen project and when same, the state joins are sent to the touch screen project. The trigger is the condition in which the emulator will send the state joins back to the touch screen project. It can be a join number or events names as defined in the Contract Editor. The event field represents the event name. o or object: For an object state or event.s or string: For a string state or event.n or number or numeric: For a number state or event.b or Boolean: For a Boolean state or event.The type for cue or for action can be one of the following values: Within the array of cues, the author can indicate which events, when received from the touch screen project, will send back a state message. The JSON below shows a serialized version of an empty configuration object The value of the state or event for a cue or for an action is a string which represents the name of that state or action.
An action is defined by: type:string, state:string, logic:string, plus other fields (depending on type).A cue is defined by: type:string, event:string, trigger:boolean|string|number, and actions:array.The Emulator Scenario JSON contains an array of cues and an optional array onStart. The CH5 Control System emulation utility can be thought of as a simplistic control system program that only interacts with the CH5 project. The emulation utility is configured via a JavaScript Object configuration. Emulation also allows a developer to demonstrate a CH5 project without setting up a control system. While the emulation feature cannot emulate all the features of a control system, this can be useful during the development process to implement your CH5 project prior to the control system program being ready or the equipment being available. The CH5 Component library provides a utility to emulate interactions with a control system.