MCP/API/EvtBotoeira

De uTech Tecnologia
(Diferença entre revisões)
Ir para: navegação, pesquisa
(Evento)
(Evento)
 
(2 edições intermediárias de um usuário não apresentadas)
Linha 13: Linha 13:
 
| align="left"| '''type''' || '''button'''
 
| align="left"| '''type''' || '''button'''
 
|-
 
|-
| align="left"| '''Interface''' || '''Interface do porteiro'''
+
| align="left"| '''Interface''' || '''Interface de acionamento'''
 
* '''1''': Interface 1 - '''BNT1''' ('''READER1''').
 
* '''1''': Interface 1 - '''BNT1''' ('''READER1''').
 
* '''2''': Interface 2 - '''BNT2''' ('''READER2''').
 
* '''2''': Interface 2 - '''BNT2''' ('''READER2''').
 
* '''3''': Interface 3 - '''BNT3''' ('''READER3''').
 
* '''3''': Interface 3 - '''BNT3''' ('''READER3''').
 
* '''4''': Interface 4 - '''BNT4''' ('''READER4''').
 
* '''4''': Interface 4 - '''BNT4''' ('''READER4''').
'''5 a 32''': Interfaces externas. (Ver [[MCP/ConfiguracaoWEB#Leitores|'''Leitores'''])
+
'''5 a 32''': Interfaces externas. (Ver [[MCP/ConfiguracaoWEB#Leitores|'''Leitores''']])
 
|-
 
|-
 
| align="left"| '''state''' || '''estado da botoeira'''
 
| align="left"| '''state''' || '''estado da botoeira'''
Linha 70: Linha 70:
 
<br/>
 
<br/>
 
<br/>
 
<br/>
[[MPI/API#Eventos|'''Voltar''']]
+
[[MCP/API#Eventos|'''Voltar''']]
 
-----
 
-----

Edição atual tal como 20h01min de 20 de março de 2019

Tabela de conteúdo


O Evento botoeira é enviado pela central MCP para a aplicação, informando novo estado da botoeira.

[editar] Evento

Parâmetros enviados pela central MCP
request door
type button
Interface Interface de acionamento
  • 1: Interface 1 - BNT1 (READER1).
  • 2: Interface 2 - BNT2 (READER2).
  • 3: Interface 3 - BNT3 (READER3).
  • 4: Interface 4 - BNT4 (READER4).

5 a 32: Interfaces externas. (Ver Leitores)

state estado da botoeira
  • on: Habilitado
  • off: Desabilitado

[editar] Exemplo

http://ip:porta/url/?request=door&type=button&interface=1&state=on

Resposta: A aplicação deve responder:

  • 401 => Erro de Autenticação.
  • 200 => OK.



[editar] PHP

<?php
 
$vars = $_REQUEST;
 
if(!isset($vars))
        exit(0);
 
if(isset($vars['request']) && strcmp($vars['request'],"door") == 0)
        $event = $vars['request'];
else {
        echo "Evento invalido!\n";
        exit(1);
}
 
printf("Evento: %s<BR>\n", $vars['request']);
printf("=>      Type: %s<BR>\n", $vars['type']);
printf("=> Interface: %s<BR>\n", $vars['interface']);
printf("=>     State: %s<BR>\n", $vars['state']);
 
?>




Voltar


Ferramentas pessoais
Espaços nominais

Variantes
Visualizações
Ações
Navegação
Ferramentas