Change AQH_Value field NameForDriver to Name and make it only contain the value name.

Previously this field contained the device name, too. This would make it
necessary for drivers to remove the device part of the name when SetValue
is called. Instead the device name is now always provided by the driver in
the appropriate field DeviceNameForDriver.
This commit is contained in:
Martin Preuss
2023-10-03 13:31:05 +02:00
parent 253b3862da
commit 17d4ce5125
7 changed files with 15 additions and 28 deletions

View File

@@ -59,7 +59,7 @@
<flags>own</flags>
</member>
<member name="nameForDriver" type="char_ptr" maxlen="128">
<member name="name" type="char_ptr" maxlen="128">
<default>0</default>
<preset>0</preset>
<access>public</access>

View File

@@ -173,7 +173,7 @@ void _writeValueFieldsAsTagsToBuffer(const AQH_VALUE *value, GWEN_BUFFER *buf)
if (s && *s)
GWEN_Tag16_WriteStringTagToBuffer(AQH_IPCDATA_VALUE_TAGS_DRIVER, s, buf);
s=AQH_Value_GetNameForDriver(value);
s=AQH_Value_GetName(value);
if (s && *s)
GWEN_Tag16_WriteStringTagToBuffer(AQH_IPCDATA_VALUE_TAGS_NAMEFORDRIVER, s, buf);
@@ -318,7 +318,7 @@ AQH_VALUE *_readValueFromTag(const uint8_t *ptr, uint32_t len)
break;
case AQH_IPCDATA_VALUE_TAGS_NAMEFORDRIVER:
s=GWEN_Tag16_GetTagDataAsNewString(tag, NULL);
AQH_Value_SetNameForDriver(value, s);
AQH_Value_SetName(value, s);
free(s);
break;
case AQH_IPCDATA_VALUE_TAGS_NAMEFORSYSTEM: