Server

class hive.trigger.Server(test=False, address='192.168.0.100', port=3001)

Bases: QThread, Trigger

Trigger to listen events from the maze.

Two type of events :

  • detection events: process in the task in method process_detection

  • battery level events: process in the task in method process_battery_level

To use it add in the config file the keyword = server

Task:
    mode : ...
    trigger :
        - name : server
Parameters
  • test (bool, opt) – automatically set the address ip to 127.0.0.1 and the port to 65430

  • address (str, optional) – ip address of the Peira server

  • port (int, optional) – port address of the Peira server

Note

The server continuously listen on the selected port in a second thread.

Attributes Summary

peira_event

trigger the peira_event process.

Methods Summary

run()

Run in a separate thread waiting for new event send by the maze.

who_to_connect_where()

Attributes Documentation

peira_event

trigger the peira_event process.

Type

str

Methods Documentation

run()

Run in a separate thread waiting for new event send by the maze.

Event process for the moment is :

  • when an animal is detected (code=31 with output=on)

  • when a device has a too low battery level (code=60)

who_to_connect_where()