In the meantime, to make a disconnect / reconnect button, you can use a bit
of JavaScript that will do a CF.setSystemProperties() on each system and disable then
enable it.
Florent
--
Florent Pillet - Software Engineering Lead
www.commandfusion.com
I know you are working hard to solve the conection problems and i
still believe in a good solution but it's not only your problem i
guess.
My costumers walk from one room to another and then the connection can
also be lost.
Most people don't understand why that can happen and then it might be
easier to say that they have to push a button to reconnect. I now it's
not the nicest solution but i think it can be effective.
Can you help me with the Javascript on how to do this using
CF.setSystemProperties() please?
Op 27 mrt. 2012 om 22:13 heeft Florent Pillet <fpi...@gmail.com> het
volgende geschreven:
> --
> You received this message because you are subscribed to the Google Groups "CommandFusion" group.
> To post to this group, send email to comman...@googlegroups.com.
> To unsubscribe from this group, send email to commandfusio...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/commandfusion?hl=en.
>
// Toggle the enabled state of all systems, forcing a disconnection
// then a reconnection. Use a small delay (1/10s) after disconnection
// to not stress remote systems
function onDisconnectReconnectAll() {
enableAllSystems(false);
setTimeout(function() {
enableAllSystems(true);
}, 100);
}
// Function to enable or disable all systems. Disabling a
// system disconnects it, enabling it lets it connect if it is
// not already enabled.
function enableAllSystems(onOrOff) {
for (var name in CF.systems) {
if (CF.systems.hasOwnProperty(name)) {
CF.setSystemProperties(name, {enabled: onOrOff});
}
}
}
On Mar 27, 2012, at 10:31 PM, Joep van den Aker wrote:
> Can you help me with the Javascript on how to do this using
> CF.setSystemProperties() please?
--
Keep up the good work!
Op 27 mrt. 2012 om 22:42 heeft Florent Pillet <fpi...@gmail.com> het
volgende geschreven:
> Here is an example. To use this code, simply edit your button in guiDesigner
// Toggle the enabled state of all systems, forcing a disconnection
// then a reconnection. Use a small delay (1/10s) after disconnection
// to not stress remote systems
function onDisconnectReconnectAll() {
enableAllSystems(false);
setTimeout(function() {
enableAllSystems(true);
}, 100);
}
// Function to enable or disable all systems. Disabling a
// system disconnects it, enabling it lets it connect if it is
// not already enabled.
function enableAllSystems(onOrOff) {
for (var name in CF.systems) {
if (CF.systems.hasOwnProperty(name)) {
CF.setSystemProperties(name, {enabled: onOrOff});
}
}
}
--
You received this message because you are subscribed to the Google Groups "CommandFusion Software" group.
To view this discussion on the web visit https://groups.google.com/d/msg/commandfusion/-/cL9pLIAP5YgJ.
--
You received this message because you are subscribed to the Google Groups "CommandFusion Software" group.
To view this discussion on the web visit https://groups.google.com/d/msg/commandfusion/-/cL9pLIAP5YgJ.