Commit 8e744aa1 authored by Marcus Nordenberg's avatar Marcus Nordenberg

gsdml attribute navigator: Add value enumeration + default value fix

parent 34dfa9a3
...@@ -64,6 +64,7 @@ typedef enum { ...@@ -64,6 +64,7 @@ typedef enum {
attrnav_eItemType_PnParValue, attrnav_eItemType_PnParValue,
attrnav_eItemType_PnParEnum, attrnav_eItemType_PnParEnum,
attrnav_eItemType_PnParEnumBit, attrnav_eItemType_PnParEnumBit,
attrnav_eItemType_PnParEnumValue,
attrnav_eItemType_PnModuleClass, attrnav_eItemType_PnModuleClass,
attrnav_eItemType_PnIOData, attrnav_eItemType_PnIOData,
attrnav_eItemType_PnInput, attrnav_eItemType_PnInput,
...@@ -509,7 +510,7 @@ class ItemPnParValue : public ItemPn { ...@@ -509,7 +510,7 @@ class ItemPnParValue : public ItemPn {
public: public:
ItemPnParValue(GsdmlAttrNav* attrnav, const char* item_name, ItemPnParValue(GsdmlAttrNav* attrnav, const char* item_name,
gsdml_Ref* item_value_ref, gsdml_eValueDataType item_datatype, gsdml_Ref* item_value_ref, gsdml_eValueDataType item_datatype,
unsigned char* item_data, brow_tNode dest, flow_eDest dest_code); unsigned char* item_data, unsigned char* item_data_reversed_endianess, brow_tNode dest, flow_eDest dest_code);
virtual ~ItemPnParValue() virtual ~ItemPnParValue()
{ {
} }
...@@ -517,6 +518,7 @@ public: ...@@ -517,6 +518,7 @@ public:
gsdml_Ref* value_ref; gsdml_Ref* value_ref;
gsdml_eValueDataType datatype; gsdml_eValueDataType datatype;
unsigned char* data; unsigned char* data;
unsigned char* data_reversed_endianess;
unsigned int byte_offset; unsigned int byte_offset;
unsigned int size; unsigned int size;
int first_scan; int first_scan;
...@@ -541,7 +543,7 @@ class ItemPnParEnum : public ItemPn { ...@@ -541,7 +543,7 @@ class ItemPnParEnum : public ItemPn {
public: public:
ItemPnParEnum(GsdmlAttrNav* attrnav, const char* item_name, ItemPnParEnum(GsdmlAttrNav* attrnav, const char* item_name,
gsdml_Ref* item_value_ref, gsdml_eValueDataType item_datatype, gsdml_Ref* item_value_ref, gsdml_eValueDataType item_datatype,
unsigned char* item_data, brow_tNode dest, flow_eDest dest_code); unsigned char* item_data, unsigned char* item_data_reversed_endianess, brow_tNode dest, flow_eDest dest_code);
virtual ~ItemPnParEnum() virtual ~ItemPnParEnum()
{ {
} }
...@@ -549,6 +551,7 @@ public: ...@@ -549,6 +551,7 @@ public:
gsdml_Ref* value_ref; gsdml_Ref* value_ref;
gsdml_eValueDataType datatype; gsdml_eValueDataType datatype;
unsigned char* data; unsigned char* data;
unsigned char* data_reversed_endianess;
unsigned int byte_offset; unsigned int byte_offset;
unsigned int bit_offset; unsigned int bit_offset;
unsigned int bit_length; unsigned int bit_length;
...@@ -566,7 +569,7 @@ public: ...@@ -566,7 +569,7 @@ public:
class ItemPnParEnumBit : public ItemPn { class ItemPnParEnumBit : public ItemPn {
public: public:
ItemPnParEnumBit(GsdmlAttrNav* attrnav, const char* item_name, ItemPnParEnumBit(GsdmlAttrNav* attrnav, const char* item_name,
gsdml_eValueDataType item_datatype, unsigned char* item_data, gsdml_eValueDataType item_datatype, unsigned char* item_data, unsigned char* item_data_reversed_endianess,
unsigned int item_byte_offset, unsigned int item_value, unsigned int item_byte_offset, unsigned int item_value,
unsigned int item_mask, int item_noedit, brow_tNode dest, unsigned int item_mask, int item_noedit, brow_tNode dest,
flow_eDest dest_code); flow_eDest dest_code);
...@@ -577,6 +580,33 @@ public: ...@@ -577,6 +580,33 @@ public:
gsdml_Assign* assign; gsdml_Assign* assign;
gsdml_eValueDataType datatype; gsdml_eValueDataType datatype;
unsigned char* data; unsigned char* data;
unsigned char* data_reversed_endianess;
unsigned int byte_offset;
unsigned int value;
unsigned int mask;
int first_scan;
unsigned int old_value;
int noedit;
int scan(GsdmlAttrNav* attrnav, void* p);
void update(GsdmlAttrNav* attrnav);
};
class ItemPnParEnumValue : public ItemPn {
public:
ItemPnParEnumValue(GsdmlAttrNav* attrnav, const char* item_name,
gsdml_eValueDataType item_datatype, unsigned char* item_data, unsigned char* item_data_reversed_endianess,
unsigned int item_byte_offset, unsigned int item_value,
unsigned int item_mask, int item_noedit, brow_tNode dest,
flow_eDest dest_code);
virtual ~ItemPnParEnumValue()
{
}
gsdml_Assign* assign;
gsdml_eValueDataType datatype;
unsigned char* data;
unsigned char* data_reversed_endianess;
unsigned int byte_offset; unsigned int byte_offset;
unsigned int value; unsigned int value;
unsigned int mask; unsigned int mask;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment