DDS  ver. 1.6
ProtocolCommands.h
Go to the documentation of this file.
1 // Copyright 2014 GSI, Inc. All rights reserved.
2 //
3 //
4 //
5 #ifndef PROTOCOLCOMMANDS_H_
6 #define PROTOCOLCOMMANDS_H_
7 // MiscCommon
8 #include "def.h"
9 
10 #define NAME_TO_STRING(NAME) #NAME
11 
12 // define current protocol version version
13 //
14 // We wanted to track protocol changes by versions, but at the moment it is a kinda overkill.
15 // At the moment it doesn't matter which versions peers have, once the version is different, we break the connection.
16 // In the future we might want to support backward compatibility. In this case protocol version, command will be
17 // organized in separate structures and enums.
18 //
19 const uint16_t g_protocolCommandsVersion = 3;
20 
21 namespace dds
22 {
23  namespace protocol_api
24  {
25  enum ECmdType
26  {
27 
28  cmdUNKNOWN = -1,
30  cmdHANDSHAKE, // attachment: SVersionCmd
31  cmdSUBMIT, // attachment: SSubmitCmd
32  cmdSIMPLE_MSG, // attachment: SSimpleMsgCmd
34  cmdREPLY_HANDSHAKE_ERR, // attachment: SSimpleMsgCmd
36  cmdREPLY_HOST_INFO, // attachment: SHostInfoCmd
38  cmdREPLY_PID, // attachment: SSimpleMsgCmd. The message contains the pid of the responder.
39  cmdBINARY_ATTACHMENT, // attachment: SBinanryAttachmentCmd. The message contains binary attachment.
40  cmdBINARY_ATTACHMENT_RECEIVED, // attachment: SBinaryAttachmentReceivedCmd.
41  cmdBINARY_ATTACHMENT_START, // attachment: SBinaryAttachmentStartCmd.
43  cmdREPLY_ID, // attachment: SUUIDCmd
44  cmdSET_ID, // attachment: SUUIDCmd
47  cmdREPLY_AGENTS_INFO, // attachment: SAgentsInfoCmd
48  cmdASSIGN_USER_TASK, // attachment: SAssignUserTaskCmd
49  cmdACTIVATE_AGENT, // this command activates a given agent and triggers a start of an assigned user task
51  cmdUSER_TASK_DONE, // attachment: SUserTaskDoneCmd
53  cmdUPDATE_KEY, // attachment: SUpdateKeyCmd
54  cmdUPDATE_KEY_ERROR, // attachment: SUpdateKeyErrorCmd
55  cmdDELETE_KEY, // attachment: SDeleteKeyCmd
58  cmdPROGRESS, // attachment: SProgressCmd
60  cmdSET_TOPOLOGY, // attachment: SSetTopologyCmd
61  cmdUPDATE_TOPOLOGY, // attachment: SUpdateTopologyCmd
65  cmdCUSTOM_CMD // attachment: SCustomCmdCmd
66  };
67 
68  static std::map<uint16_t, std::string> g_cmdToString{
107  };
108  }
109 }
110 
111 #endif /* PROTOCOLMESSAGES_H_ */
Definition: ProtocolCommands.h:52
Definition: ProtocolCommands.h:48
Definition: ProtocolCommands.h:61
Definition: ProtocolCommands.h:44
Definition: ProtocolCommands.h:33
Definition: ProtocolCommands.h:47
Definition: ProtocolCommands.h:46
Definition: ProtocolCommands.h:37
Definition: ProtocolCommands.h:60
Definition: ProtocolCommands.h:29
#define NAME_TO_STRING(NAME)
Definition: ProtocolCommands.h:10
Definition: ProtocolCommands.h:59
Definition: ProtocolCommands.h:62
Definition: ProtocolCommands.h:34
Definition: ProtocolCommands.h:58
Definition: ProtocolCommands.h:42
Definition: ProtocolCommands.h:32
Definition: ProtocolCommands.h:41
const uint16_t g_protocolCommandsVersion
Definition: ProtocolCommands.h:19
Definition: ProtocolCommands.h:31
Definition: ProtocolCommands.h:35
Definition: dds-agent/src/AgentConnectionManager.h:16
Definition: ProtocolCommands.h:65
Definition: ProtocolCommands.h:53
Definition: ProtocolCommands.h:56
Definition: ProtocolCommands.h:50
Definition: ProtocolCommands.h:63
Definition: ProtocolCommands.h:64
Definition: ProtocolCommands.h:43
Definition: ProtocolCommands.h:49
Definition: ProtocolCommands.h:36
Definition: ProtocolCommands.h:45
Definition: ProtocolCommands.h:38
Definition: ProtocolCommands.h:54
Definition: ProtocolCommands.h:40
Definition: ProtocolCommands.h:51
Definition: ProtocolCommands.h:39
Definition: ProtocolCommands.h:30
Definition: ProtocolCommands.h:55
Definition: ProtocolCommands.h:57
ECmdType
Definition: ProtocolCommands.h:25
Definition: ProtocolCommands.h:28