#protocols #pi #framework #heart #widgets #codde

macro codde_protocol_derive

Multi Communication protocol in heart of the C.O.D.D.E. Pi framework

1 unstable release

0.1.0 Feb 23, 2024

#15 in #heart

Download history 166/week @ 2024-02-18 77/week @ 2024-02-25 26/week @ 2024-03-03 33/week @ 2024-03-10 20/week @ 2024-03-17 28/week @ 2024-03-24 67/week @ 2024-03-31 71/week @ 2024-04-07 100/week @ 2024-04-14 21/week @ 2024-04-21 1/week @ 2024-04-28 4/week @ 2024-05-05 9/week @ 2024-05-12 24/week @ 2024-05-19 60/week @ 2024-05-26

97 downloads per month
Used in codde_protocol

Custom license

5KB

CODDE Protocol

Multi Communication protocol in heart of the C.O.D.D.E. Pi framework.

This Project is written in Rust, enabling fast serializing/deserializing and data processing. Client side is ported for Dart/Flutter applications, and server side has been translated in python.

Buy Me A Coffee

CODDE Protocol integrates data generated by CODDE Pi App widgets, and received by embedded systems. See https://codde-pi.com to stay tuned about new widgets integration.

Show me the code

With one code structure and a dozen of lines, you can receive data from socket, bluetooth of UART com. Just need a port address and registered actions on data is received :


import codde_pi_protocol as cp
import time

server = cp.CoddePiServer.use_socket('localhost:12345')

def action(*args):
    widget: cp.ToggleButton = args[0]
    print("value received : ", widget.value)
    server.callback(1, cp.ServerStatus.Idle, cp.ConfirmResult(True))

if __name__ == "__main__":
    print('open server...')
    server.open()
    server.on(1, "ToggleButton", action)
    # server.callback(1, cp.ServerStatus.Idle, cp.ConfirmResult(True))
    server.serve()
    time.sleep(2)
    server.close()

Roadmap

Protocols:

  • Socket
  • Bluetooth
  • UART
  • HTTP

Dependencies

~305–760KB
~18K SLoC