# Abstract Tag Driver Example

**URL:** <https://forum.inductiveautomation.com/t/abstract-tag-driver-example/10469>\
**Category:** 3rd Party Modules\
**Created:** [September 15, 2015, 2:38pm UTC](https://forum.inductiveautomation.com/t/abstract-tag-driver-example/10469 "2015-09-15T14:38:15Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![joaopmrod2](https://avatars.discourse-cdn.com/v4/letter/j/90ced4/32.png) [@joaopmrod2](https://forum.inductiveautomation.com/u/joaopmrod2)\
**Post date:** [September 15, 2015, 2:38pm UTC](https://forum.inductiveautomation.com/t/abstract-tag-driver-example/10469/1 "2015-09-15T14:38:15Z")

</div>

Why do I get this when I try to simply change the name of the TagCount setting name to TagCount2 (and I did it everywhere) I get this in the Gateway? The same happens when I try to create a new Category or new setting.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 15, 2015, 2:55pm UTC](https://forum.inductiveautomation.com/t/abstract-tag-driver-example/10469/2 "2015-09-15T14:55:38Z")

</div>

Look at the …DriverSettings.properties file. That’s where the text keys are translated into actual displayed strings. That’s to support future internationalization of the driver (create a matching file with translated strings for each key).

---

<div class="post-metadata">

**Author:** ![joaopmrod2](https://avatars.discourse-cdn.com/v4/letter/j/90ced4/32.png) [@joaopmrod2](https://forum.inductiveautomation.com/u/joaopmrod2)\
**Post date:** [September 15, 2015, 3:14pm UTC](https://forum.inductiveautomation.com/t/abstract-tag-driver-example/10469/3 "2015-09-15T15:14:36Z")

</div>

This is what I have there:

ExampleCategory=Example Category

TCPCategory=TCP Category

TagCount2.Name=Tag Count2  
TagCount2.Desc=The number of tags this device will expose.

Port.Name=TCP Port  
Port.Desc=Device TCP Port.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 15, 2015, 4:09pm UTC](https://forum.inductiveautomation.com/t/abstract-tag-driver-example/10469/4 "2015-09-15T16:09:26Z")

</div>

Hmmm. Looks like those properties are getting loaded by BundleUtils. You’ll need to look at your hook class to see if that’s happening, and with the correct names.

---

<div class="post-metadata">

**Author:** ![joaopmrod2](https://avatars.discourse-cdn.com/v4/letter/j/90ced4/32.png) [@joaopmrod2](https://forum.inductiveautomation.com/u/joaopmrod2)\
**Post date:** [September 15, 2015, 4:24pm UTC](https://forum.inductiveautomation.com/t/abstract-tag-driver-example/10469/5 "2015-09-15T16:24:29Z")

</div>

What is the difference between the DriverTag, the DynamicDriverTag and WritableDriverTag? How can I implement the method called when someone write to a tag? Where can I find the documentation of the com.inductiveautomation.xopc.driver.api.tags package?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [September 15, 2015, 5:09pm UTC](https://forum.inductiveautomation.com/t/abstract-tag-driver-example/10469/6 "2015-09-15T17:09:59Z")

</div>

Ah, it looks like we’re not deploying the javadocs with the rest of the artifacts. We’ll have to fix that on our end for the next release.

I think the downloadable SDK does include javadocs though. The package itself doesn’t have documentation, but the DriverTag and WritableDriverTag interfaces do.

When using the AbstractTagDriver, to accept writes you just implement and add a WritableDriverTag and do something with the value given to you in setValue() when it’s called.

---

<div class="post-metadata">

**Author:** ![joaopmrod2](https://avatars.discourse-cdn.com/v4/letter/j/90ced4/32.png) [@joaopmrod2](https://forum.inductiveautomation.com/u/joaopmrod2)\
**Post date:** [October 16, 2015, 9:09pm UTC](https://forum.inductiveautomation.com/t/abstract-tag-driver-example/10469/7 "2015-10-16T21:09:01Z")

</div>

> [@pturmel](#):
>
> Hmmm. Looks like those properties are getting loaded by BundleUtils. You'll need to look at your hook class to see if that's happening, and with the correct names.

I'm doing this:

```
@Override
public void setup(GatewayContext context) {
    BundleUtil.get().addBundle(ATDExampleDriver.class);

    super.setup(context);
}

```

is it correct?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 17, 2015, 3:49pm UTC](https://forum.inductiveautomation.com/t/abstract-tag-driver-example/10469/8 "2015-10-17T15:49:04Z")

</div>

[quote=“joaopmrod2”]I’m doing this:[/quote]I’m gonna guess you need (untested):[code] @Override  
public void setup(GatewayContext context) {  
BundleUtil.get().addBundle(ATDExampleDriver.class);  
BundleUtil.get().addBundle(ATDExampleDriverSettings.class);

```
    super.setup(context);
}[/code]and then update the contents of ATDExampleDriverSettings.properties for your use case.
```

---

<div class="post-metadata">

**Author:** ![joaopmrod2](https://avatars.discourse-cdn.com/v4/letter/j/90ced4/32.png) [@joaopmrod2](https://forum.inductiveautomation.com/u/joaopmrod2)\
**Post date:** [October 20, 2015, 1:03pm UTC](https://forum.inductiveautomation.com/t/abstract-tag-driver-example/10469/9 "2015-10-20T13:03:28Z")

</div>

How can I set the tag quality using a AbstarctTagDriver?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [October 20, 2015, 1:09pm UTC](https://forum.inductiveautomation.com/t/abstract-tag-driver-example/10469/10 "2015-10-20T13:09:33Z")

</div>

Return a DataValue that has a bad StatusCode from DriverTag#getValue()
