fixed bug in history serializer

This commit is contained in:
csoler 2017-05-03 22:43:16 +02:00
parent 214aaa7c9b
commit 4f4240d570
3 changed files with 5 additions and 5 deletions

View File

@ -51,12 +51,12 @@ void RsHistoryMsgItem::serial_process(RsGenericSerializer::SerializeJob j,RsGene
RsTypeSerializer::serial_process (j,ctx,TLV_TYPE_STR_MSG,message,"message") ;
}
RsItem *RsHistorySerialiser::create_item(uint8_t serial_class,uint8_t serial_type) const
RsItem *RsHistorySerialiser::create_item(uint8_t item_type,uint8_t item_subtype) const
{
if(serial_class != RS_PKT_CLASS_CONFIG)
if(item_type != RS_PKT_TYPE_HISTORY_CONFIG)
return NULL ;
if(serial_type == RS_PKT_SUBTYPE_DEFAULT)
if(item_subtype == RS_PKT_SUBTYPE_DEFAULT)
return new RsHistoryMsgItem();
return NULL ;

View File

@ -63,7 +63,7 @@ public:
RsHistorySerialiser() : RsConfigSerializer(RS_PKT_CLASS_CONFIG, RS_PKT_TYPE_HISTORY_CONFIG) {}
virtual ~RsHistorySerialiser() {}
virtual RsItem *create_item(uint8_t service,uint8_t type) const ;
virtual RsItem *create_item(uint8_t item_type,uint8_t item_subtype) const ;
};
/**************************************************************************/

View File

@ -289,7 +289,7 @@ public:
/*! create_item
* should be overloaded to create the correct type of item depending on the data
*/
virtual RsItem *create_item(uint8_t /* class */, uint8_t /* item_type */) const=0;
virtual RsItem *create_item(uint8_t /* item_type */, uint8_t /* item_sub_type */) const=0;
RsItem *deserialise(void *data,uint32_t *size) ;
};