90 lines
2.8 KiB
C
90 lines
2.8 KiB
C
//
|
|
// Created by nicolas on 20/03/18.
|
|
//
|
|
|
|
#ifndef ESC_TCP_MESSAGES_H
|
|
#define ESC_TCP_MESSAGES_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#define MESSAGE_HEARTBEATREQUEST 0x01
|
|
#define MESSAGE_HEARTBEATRESPONSE 0x02
|
|
|
|
#define MESSAGE_PING 0x03
|
|
#define MESSAGE_PONG 0x04
|
|
|
|
#define MESSAGE_PREPAREACK 0x05
|
|
#define MESSAGE_COMMITACK 0x06
|
|
|
|
#define MESSAGE_SLAVEASSIGNMENT 0x07
|
|
#define MESSAGE_CLONEASSIGNMENT 0x08
|
|
|
|
#define MESSAGE_SUBSCRIBEREPLICA 0x10
|
|
#define MESSAGE_REPLICALOGPOSITIONACK 0x11
|
|
#define MESSAGE_CREATECHUNK 0x12
|
|
#define MESSAGE_RAWCHUNKBULK 0x13
|
|
#define MESSAGE_DATACHUNKBULK 0x14
|
|
#define MESSAGE_REPLICASUBSCRIPTIONRETRY 0x15
|
|
#define MESSAGE_REPLICASUBSCRIBED 0x16
|
|
|
|
|
|
//Client Messages
|
|
|
|
#define MESSAGE_WRITEEVENTS 0x82
|
|
#define MESSAGE_WRITEEVENTSCOMPLETED 0x83
|
|
|
|
#define MESSAGE_TRANSACTIONSTART 0x84
|
|
#define MESSAGE_TRANSACTIONSTARTCOMPLETED 0x85
|
|
#define MESSAGE_TRANSACTIONWRITE 0x86
|
|
#define MESSAGE_TRANSACTIONWRITECOMPLETED 0x87
|
|
#define MESSAGE_TRANSACTIONCOMMIT 0x88
|
|
#define MESSAGE_TRANSACTIONCOMMITCOMPLETED 0x89
|
|
|
|
#define MESSAGE_DELETESTREAM 0x8A
|
|
#define MESSAGE_DELETESTREAMCOMPLETED 0x8B
|
|
|
|
#define MESSAGE_READEVENT 0xB0
|
|
#define MESSAGE_READEVENTCOMPLETED 0xB1
|
|
#define MESSAGE_READSTREAMEVENTSFORWARD 0xB2
|
|
#define MESSAGE_READSTREAMEVENTSFORWARDCOMPLETED 0xB3
|
|
#define MESSAGE_READSTREAMEVENTSBACKWARD 0xB4
|
|
#define MESSAGE_READSTREAMEVENTSBACKWARDCOMPLETED 0xB5
|
|
#define MESSAGE_READALLEVENTSFORWARD 0xB6
|
|
#define MESSAGE_READALLEVENTSFORWARDCOMPLETED 0xB7
|
|
#define MESSAGE_READALLEVENTSBACKWARD 0xB8
|
|
#define MESSAGE_READALLEVENTSBACKWARDCOMPLETED 0xB9
|
|
|
|
#define MESSAGE_SUBSCRIBETOSTREAM 0xC0
|
|
#define MESSAGE_SUBSCRIPTIONCONFIRMATION 0xC1
|
|
#define MESSAGE_STREAMEVENTAPPEARED 0xC2
|
|
#define MESSAGE_UNSUBSCRIBEFROMSTREAM 0xC3
|
|
#define MESSAGE_SUBSCRIPTIONDROPPED 0xC4
|
|
#define MESSAGE_CONNECTTOPERSISTENTSUBSCRIPTION 0xC5
|
|
#define MESSAGE_PERSISTENTSUBSCRIPTIONCONFIRMATION 0xC6
|
|
#define MESSAGE_PERSISTENTSUBSCRIPTIONSTREAMEVENTAPPEARED 0xC7
|
|
#define MESSAGE_CREATEPERSISTENTSUBSCRIPTION 0xC8
|
|
#define MESSAGE_CREATEPERSISTENTSUBSCRIPTIONCOMPLETED 0xC9
|
|
#define MESSAGE_DELETEPERSISTENTSUBSCRIPTION 0xCA
|
|
#define MESSAGE_DELETEPERSISTENTSUBSCRIPTIONCOMPLETED 0xCB
|
|
#define MESSAGE_PERSISTENTSUBSCRIPTIONACKEVENTS 0xCC
|
|
#define MESSAGE_PERSISTENTSUBSCRIPTIONNAKEVENTS 0xCD
|
|
#define MESSAGE_UPDATEPERSISTENTSUBSCRIPTION 0xCE
|
|
#define MESSAGE_UPDATEPERSISTENTSUBSCRIPTIONCOMPLETED 0xCF
|
|
|
|
#define MESSAGE_SCAVENGEDATABASE 0xD0
|
|
#define MESSAGE_SCAVENGEDATABASECOMPLETED 0xD1
|
|
|
|
|
|
|
|
#define MESSAGE_BADREQUEST 0xF0
|
|
#define MESSAGE_NOTHANDLED 0xF1
|
|
#define MESSAGE_AUTHENTICATE 0xF2
|
|
#define MESSAGE_AUTHENTICATED 0xF3
|
|
#define MESSAGE_NOTAUTHENTICATED 0xF4
|
|
#define MESSAGE_IDENTIFYCLIENT 0xF5
|
|
#define MESSAGE_CLIENTIDENTIFIED 0xF6
|
|
|
|
char * get_string_for_tcp_message(uint8_t message);
|
|
|
|
#endif //ESC_TCP_MESSAGES_H
|