[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4762: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4764: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4765: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4766: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
nodo-domotica.nl • Toon onderwerp - BinarySwitch

BinarySwitch

Experimentele Plug-ins
Forumregels
LET OP: DIT IS HET EXPERIMENTELE GEDEELTE
BETREDEN OP EIGEN RISICO :lol:

BinarySwitch

Berichtdoor erik » 20 jan 2015, 14:11

//#######################################################################################################
//#################################### Plugin-252: BinarySwitch #######################################
//#######################################################################################################

/*********************************************************************************************\
* Deze plugin bewaart 28 binaire switches in een variable.
*
* BinarySwitch Var1, Var2, Par1, Par2
*
* Var1 geeft de variable aan waarin de switches worden bewaard.
* Var2 geeft de variable aan waarin het test resultaat (0|1) wordt gezet.
* Par1 is het nummer van de bit (=switch).
* Par2 bepaald de aktie: 1 = setten, 2 = resetten, 3 = testen
*
* BinarySwitch 1, 2, 20, 1 Switch 20 wordt aangezet in Variable 1
* BinarySwitch 1, 2, 20, 2 Switch 20 wordt uitgezet in Variable 1
* BinarySwitch 1, 2, 20, 3 Variable 2 bevat de waarde van switch nummer 20
*
*
*
* Auteur : Erik Couzy
* Support : www.nodo-domotica.nl (erik)
* Datum : jan 2015
* Versie : 1.1
* Nodo productnummer : <Nodo productnummer. Toegekend door Nodo team>
* Compatibiliteit : Vanaf Nodo build nummer <build nummer>
* Syntax : BinarySwitch Var1, <Var2>, Par1, Par2
*
***********************************************************************************************

https://www.dropbox.com/s/ypbdqsoz7c83h ... 252.c?dl=0
erik
 
Berichten: 59
Geregistreerd: 12 dec 2014, 18:04

Re: BinarySwitch

Berichtdoor Paul » 19 feb 2015, 19:39

Hoi Erik,

Deze is brilliant. Ik denk dat binaire vlaggen veel gebruikt kunnen worden. Aanwezigheid, deuren open/dicht, etc.etc. Ik heb hier al eerder aan zitten denken en wil dit wel in de Core opnemen van de Nodo. En dan een stuk of tig zouden handig zijn. Voor het bewaren van de switches heb ik een beter alternatief. Ik zou het ook zo kunnen maken dat de vlaggen/switches ' globaal' door de Nodo's worden beheerd. Hiermee bedoel ik dat je bv. 128 switches hebt die je op iedere Nodo kan gebruiken en wijzigen zonder je te bekommeren of de variabelen zijn verzonden. Dan is het een hele kleine moeite om ook een BreakOn... te maken die in de eventlist gebruikt kan worden. Uiteindelijk kun je de schaarse variabelen dan voor analoge zaken gebruiken.

Groeten Paul.
Groeten Paul
Paul
 
Berichten: 1152
Geregistreerd: 31 aug 2011, 20:33

Re: BinarySwitch

Berichtdoor erik » 20 feb 2015, 18:24

erik
 
Berichten: 59
Geregistreerd: 12 dec 2014, 18:04

Re: BinarySwitch

Berichtdoor Paul » 20 feb 2015, 18:57

Groeten Paul
Paul
 
Berichten: 1152
Geregistreerd: 31 aug 2011, 20:33

Re: BinarySwitch

Berichtdoor Paul » 20 feb 2015, 22:07

Groeten Paul
Paul
 
Berichten: 1152
Geregistreerd: 31 aug 2011, 20:33

Re: BinarySwitch

Berichtdoor manjh » 21 feb 2015, 09:03

Waarin ga je deze vlaggen opslaan? Een nieuw veldje?
En hou ga je ze over de Nodo's heen synchroniseren? Zeker met vlaggen as dit is het erg belangrijk dat elke Nodo de juiste vlaggen aan/uit heeft staan, dus het zal 100% secure moeten gebeuren!
En wat doen we met conflicten? Twee Nodo's die hetzelfde vlaggetje zetten De ene zet hem aan, de ander uit?

Zoals je al aangaf, een simpel en erg handig concept...
Hans
manjh
 
Berichten: 1173
Geregistreerd: 29 aug 2011, 14:39

Re: BinarySwitch

Berichtdoor erik » 21 feb 2015, 13:49

erik
 
Berichten: 59
Geregistreerd: 12 dec 2014, 18:04

Re: BinarySwitch

Berichtdoor manjh » 21 feb 2015, 14:36

Conflicten kunnen we voorkomen met de volgende aanpak.
1. hou de vlaggen per default alleen lokaal
2. commando nodig voor het setten/resetten van individuele vlaggen
2. commando voor het setten/resetten van alle vlaggen (zelfde als #2, met wildcards)
3. event genereren als een vlag wijzigt
4. commando SendFlags, 1 parameter: target Nodo. Geen wildcard. Transfer is 100% secure, a la SendTo.
5. commande SendFlags, zonder parameter: dit is een broadcast, elke ontvangende Nodo pikt hem op, geen confirmation (en dus niet 100% zeker dat iedere Nodo het ontvangen heeft)

Is dit wat? :)
Hans
manjh
 
Berichten: 1173
Geregistreerd: 29 aug 2011, 14:39

Re: BinarySwitch

Berichtdoor Paul » 21 feb 2015, 14:55

Groeten Paul
Paul
 
Berichten: 1152
Geregistreerd: 31 aug 2011, 20:33

Re: BinarySwitch

Berichtdoor Paul » 21 feb 2015, 15:00

Groeten Paul
Paul
 
Berichten: 1152
Geregistreerd: 31 aug 2011, 20:33

Volgende

Keer terug naar Plug-ins

Wie is er online?

Gebruikers in dit forum: Geen geregistreerde gebruikers. en 1 gast

cron