Skip to content

Latest commit

 

History

History
65 lines (53 loc) · 3.7 KB

Prop.md

File metadata and controls

65 lines (53 loc) · 3.7 KB

Prop class reference

See also:

Props unified coding

Each flavor of PyProp base class either implements or redefines the Prop base class interface:

Constructor

Every Prop constructor expects:

  • client parameter
    • a Paho MQTT client created in main.py usually with mqtt_client = mqtt.Client(uuid.uuid4().urn, clean_session=True, userdata=None)

Regarding the Prop flavor you will have to provide more parameters, such as argv and others.

See:

Interface

The Prop class interface is consistent with the Prop class of the ArduinoProps library for Arduino boards.

  • addData(data)
    • registers a PropData instance to be treated by sendAllData() and sendDataChanges() methods
  • addPeriodicAction(title, func, time)
    • add an action func to be executed every time period (in seconds)
  • sendAllData()
    • sends the DATA message for all registered data
  • sendDataChanges()
    • sends the DATA message for all registered data that value has changed since last call.
  • sendData(data)
    • send the data string in a DATA message
  • sendDone(action)
    • send the action string in a DONE message
  • sendMesg(message, topic=None)
    • send the message string in a MESG message to the outbox or the topic parameter
  • sendOmit(action)
    • send the action string in a OMIT message
  • sendOver(challenge)
    • send the challenge string in a OVER message
  • sendProg(program)
    • send the program string in a PROG message
  • sendRequ(request, topic=None)
    • send the request string in a REQU message to the outbox or the topic parameter

For send----() methods see Room Outbox protocol

Author

Faure Systems (Apr 17th, 2020)