added load/save of random bias in GxsNetTunnel service

This commit is contained in:
csoler 2018-04-27 00:00:29 +02:00
parent 57bb31ece6
commit 5be57046f1
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
6 changed files with 56 additions and 19 deletions

View file

@ -44,6 +44,7 @@ RsItem* RsGxsUpdateSerialiser::create_item(uint16_t service,uint8_t item_subtype
case RS_PKT_SUBTYPE_GXS_SERVER_GRP_UPDATE: return new RsGxsServerGrpUpdateItem(SERVICE_TYPE);
case RS_PKT_SUBTYPE_GXS_SERVER_MSG_UPDATE: return new RsGxsServerMsgUpdateItem(SERVICE_TYPE);
case RS_PKT_SUBTYPE_GXS_GRP_CONFIG: return new RsGxsGrpConfigItem(SERVICE_TYPE);
case RS_PKT_SUBTYPE_GXS_RANDOM_BIAS: return new RsGxsTunnelRandomBiasItem(SERVICE_TYPE);
default:
return NULL ;
}
@ -76,6 +77,11 @@ void RsGxsServerGrpUpdateItem::clear()
grpUpdateTS = 0;
}
void RsGxsTunnelRandomBiasItem::clear()
{
mRandomBias.clear() ;
}
/**********************************************************************************************/
/* SERIALISER */
/**********************************************************************************************/
@ -134,5 +140,8 @@ void RsGxsGrpConfigItem::serial_process(RsGenericSerializer::SerializeJob j,RsGe
RsTypeSerializer::serial_process<uint32_t>(j,ctx,msg_send_delay,"msg_send_delay") ;
RsTypeSerializer::serial_process<uint32_t>(j,ctx,msg_req_delay,"msg_req_delay") ;
}
void RsGxsTunnelRandomBiasItem::serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx)
{
RsTypeSerializer::serial_process(j,ctx,mRandomBias,"random bias") ;
}