adapted to latest changes in gwen, more work on data and nodes servers.
This commit is contained in:
@@ -25,17 +25,20 @@
|
||||
|
||||
#define AQH_MSGIPC_PING_OFFS_DESTADDR 0 /* 1 bytes */
|
||||
|
||||
#define AQH_MSGIPC_PING_MINSIZE (GWEN_MSGIPC_OFFS_PAYLOAD+1)
|
||||
#define AQH_MSGIPC_PING_PAYLOADSIZE 1
|
||||
#define AQH_MSGIPC_PING_MINSIZE (GWEN_MSGIPC_OFFS_PAYLOAD+AQH_MSGIPC_PING_PAYLOADSIZE)
|
||||
|
||||
|
||||
|
||||
|
||||
GWEN_MSG *AQH_PingIpcMsg_new(uint16_t code, uint8_t destAddr)
|
||||
GWEN_MSG *AQH_PingIpcMsg_new(uint16_t code, uint32_t msgId, uint32_t refMsgId, uint8_t destAddr)
|
||||
{
|
||||
GWEN_MSG *msg;
|
||||
uint8_t *ptr;
|
||||
|
||||
msg=GWEN_IpcMsg_new(AQH_IPC_PROTOCOL_NODES_ID, AQH_IPC_PROTOCOL_NODES_VERSION, code, AQH_MSGIPC_PING_MINSIZE, NULL);
|
||||
msg=GWEN_IpcMsg_new(AQH_IPC_PROTOCOL_NODES_ID, AQH_IPC_PROTOCOL_NODES_VERSION, code,
|
||||
msgId, refMsgId,
|
||||
AQH_MSGIPC_PING_PAYLOADSIZE, NULL);
|
||||
ptr=GWEN_Msg_GetBuffer(msg);
|
||||
ptr[GWEN_MSGIPC_OFFS_PAYLOAD+AQH_MSGIPC_PING_OFFS_DESTADDR]=destAddr & 0xff;
|
||||
|
||||
@@ -55,7 +58,8 @@ void AQH_PingIpcMsg_DumpToBuffer(const GWEN_MSG *msg, GWEN_BUFFER *dbuf, const c
|
||||
{
|
||||
if (GWEN_Msg_GetBytesInBuffer(msg)>=AQH_MSGIPC_PING_MINSIZE) {
|
||||
GWEN_Buffer_AppendArgs(dbuf,
|
||||
"PING (code=%d, proto=%d, proto version=%d, dest addr=%02x)\n",
|
||||
"PING %s (code=%d, proto=%d, proto version=%d, dest addr=%02x)\n",
|
||||
sText?sText:"",
|
||||
GWEN_IpcMsg_GetCode(msg),
|
||||
GWEN_IpcMsg_GetProtoId(msg),
|
||||
GWEN_IpcMsg_GetProtoVersion(msg),
|
||||
|
||||
Reference in New Issue
Block a user