Difference between revisions of "Component: Simulation Switch Template (Controls)"
From Flowcode Help
Jump to navigationJump to search| Line 15: | Line 15: | ||
A base for building switches that do not download to chip. Mouse interaction can send 'System.User' events with the following data... ID = The handle of the switch component sending the message Message = 1 (on) or 0 (off) Current state can also be read via simulation macros. | A base for building switches that do not download to chip. Mouse interaction can send 'System.User' events with the following data... ID = The handle of the switch component sending the message Message = 1 (on) or 0 (off) Current state can also be read via simulation macros. | ||
| − | ==Component | + | ==Component Source Code== |
| − | + | Please click here for the component source code: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_sim_switch_base.fcfx FC_Comp_Source_sim_switch_base.fcfx] | |
==Detailed description== | ==Detailed description== | ||
| + | |||
| + | |||
| Line 34: | Line 36: | ||
==Examples== | ==Examples== | ||
| + | |||
| + | |||
| Line 136: | Line 140: | ||
|- | |- | ||
| colspan="2" | Default state of the indicator when loading the project or starting the simulation runtime. | | colspan="2" | Default state of the indicator when loading the project or starting the simulation runtime. | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
|} | |} | ||
Revision as of 17:54, 9 November 2022
| Author | Matrix Ltd |
| Version | 1.3 |
| Category | Controls |
Contents
Simulation Switch Template component
A base for building switches that do not download to chip. Mouse interaction can send 'System.User' events with the following data... ID = The handle of the switch component sending the message Message = 1 (on) or 0 (off) Current state can also be read via simulation macros.
Component Source Code
Please click here for the component source code: FC_Comp_Source_sim_switch_base.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Downloadable macro reference
| GetState | |
| Read the current state of the switch. Returns BOOL true when the switch is on, or BOOL false when off. | |
| Return | |
| SetState | |
| Sets the current state of the switch. BOOL true when the switch is on, or BOOL false when off. | |
| SwitchState | |
| Sets the state of the switch | |
| Return | |