Advertisement
kpfp_linux

Propozycja protobuf

Oct 19th, 2012
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. message msg {
  2. enum MsgType {
  3. OKAY = 1; // wszystko ok
  4. ZONK = 2; // coś nie tak
  5. TIMEOUT = 3; // przekroczenie limitu czasu
  6. MEASURMENT = 5; // dane pomiarowe z urządzenia
  7. CONTROL = 6; // polecenie sterowania urządzeniem
  8. HELLO = 8; // rejestracja klienta u mediatora
  9. DEVS_REQ = 9; // pobranie listy modułów
  10. DEVS_LST = 10; // lista modułów
  11. DEV_LISTEN = 11; // (A) nasłuch na danym module
  12. DEV_LEAVE = 12; // (AI) koniec nasłuchu na podanym module
  13. DEV_TAKE = 13; // (A) wyłączność do zapisu do urządzenia
  14. DEV_RELEASE = 14; // (AI) oddanie zapisu od urządzenia
  15. KTHXBYE = 15; // wylogowanie klienta od mediatora
  16. }
  17.  
  18. required MsgType type = 1; // typ wiadomości
  19. optional int32 id = 2; // id nadawcy (ustala mediator)
  20. repeated int32 receivers = 3 [packed = true]; // identyfikacja odbiorców (rozumiane przez mediatora)
  21. repeated int32 modules_id = 5 [packed = true]; // lista modułów
  22.  
  23. optional int32 ext_id = 4; // numer rozszerzenia
  24. extensions 8 to 63;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement