added mechanism to allow services to document the names of their items, and improved bandwidth graph to show names for GXS services. Other services still need to supply their own names

This commit is contained in:
csoler 2017-04-20 20:54:51 +02:00
parent f406b81238
commit 5f8bf03dfe
15 changed files with 280 additions and 81 deletions

View file

@ -328,6 +328,23 @@ RsGxsNetService::RsGxsNetService(uint16_t servType, RsGeneralDataService *gds,
mUpdateCounter = 0;
}
void RsGxsNetService::getItemNames(std::map<uint8_t,std::string>& names) const
{
names.clear();
names[RS_PKT_SUBTYPE_NXS_SYNC_GRP_REQ_ITEM ] = "Group Sync Request" ;
names[RS_PKT_SUBTYPE_NXS_SYNC_GRP_ITEM ] = "Group Sync" ;
names[RS_PKT_SUBTYPE_NXS_SYNC_GRP_STATS_ITEM ] = "Group Stats" ;
names[RS_PKT_SUBTYPE_NXS_GRP_ITEM ] = "Group Data" ;
names[RS_PKT_SUBTYPE_NXS_ENCRYPTED_DATA_ITEM ] = "Encrypted data" ;
names[RS_PKT_SUBTYPE_NXS_SESSION_KEY_ITEM ] = "Session Key" ;
names[RS_PKT_SUBTYPE_NXS_SYNC_MSG_ITEM ] = "Message Sync" ;
names[RS_PKT_SUBTYPE_NXS_SYNC_MSG_REQ_ITEM ] = "Message Sync Request" ;
names[RS_PKT_SUBTYPE_NXS_MSG_ITEM ] = "Message Data" ;
names[RS_PKT_SUBTYPE_NXS_TRANSAC_ITEM ] = "Transaction" ;
names[RS_PKT_SUBTYPE_NXS_GRP_PUBLISH_KEY_ITEM ] = "Publish key" ;
}
RsGxsNetService::~RsGxsNetService()
{
RS_STACK_MUTEX(mNxsMutex) ;

View file

@ -99,6 +99,7 @@ public:
virtual RsServiceInfo getServiceInfo() { return mServiceInfo; }
virtual void getItemNames(std::map<uint8_t,std::string>& names) const ;
public: