# Substitute of packages com.inductiveautomation.opcua

**URL:** <https://forum.inductiveautomation.com/t/substitute-of-packages-com-inductiveautomation-opcua/20929>\
**Category:** Ignition Early Access\
**Tags:** sdk\
**Created:** [November 18, 2018, 2:33pm UTC](https://forum.inductiveautomation.com/t/substitute-of-packages-com-inductiveautomation-opcua/20929 "2018-11-18T14:33:38Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [November 18, 2018, 2:33pm UTC](https://forum.inductiveautomation.com/t/substitute-of-packages-com-inductiveautomation-opcua/20929/1 "2018-11-18T14:33:38Z")

</div>

I try to adapt a module driver based on 7.9 **AbstractTagDriver**  
Package com.inductiveautomation.opcua has gone in Ignition 8.0.  
What are the substitute for :

com.inductiveautomation.opcua.types.NodeId  
com.inductiveautomation.opcua.types.StatusCode  
com.inductiveautomation.opcua.UAException  
com.inductiveautomation.opcua.types.\*

com.inductiveautomation.xopc.driver.api.tags  
and com.inductiveautomation.xopc.driver.api.configuration.DeviceSettingsRecord

---

<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:** [November 18, 2018, 3:07pm UTC](https://forum.inductiveautomation.com/t/substitute-of-packages-com-inductiveautomation-opcua/20929/2 "2018-11-18T15:07:51Z")

</div>

Everything under `com.inductiveautomation.opcua` has a counterpart somewhere in `org.eclipse.milo.opcua` except the old `DataType`, which is `BuiltinDataType` in Milo.

`com.inductiveautomation.xopc.driver.api.tags` still exists.

`DeviceSettingsRecord` is at `com.inductiveautomation.ignition.gateway.opcua.server.api`

Delete the unresolved imports and then place your cursor on a class that’s missing an import and hit option/alt+Enter in IntelliJ and it will usually find and suggest the new import.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [November 18, 2018, 4:37pm UTC](https://forum.inductiveautomation.com/t/substitute-of-packages-com-inductiveautomation-opcua/20929/3 "2018-11-18T16:37:21Z")

</div>

> [@Kevin.Herron](#):
>
> BuiltinDataType

Thanks @Kevin.Herron, it's indeed simpler when we delete the unused import !

How to get BuiltinDataType from DataValue ????

```
public VariantDriverTag(String address, Object localValue, StatusCode statusCode) {
    this.localAddress = address;
    try {
        if (localValue == null){
            // crée un dataValue de type variant avec valeur null
            this.dataValue = new DataValue(statusCode);
            this.dataType = BuiltinDataType.Int64;
        }else {
            this.dataValue = new DataValue(new Variant(localValue),
                    statusCode,
                    new DateTime(),
                    new DateTime());
            this.dataType = dataValue.getValue().getType(); <=== 
            this.typeIndetermine = false;
            logger.info("construtor VariantDriverTag : address={},dataType={}",address,this.dataType);
        }
    } catch (UAException e) {
        logger.error(e.getMessage());
    }
}

```

---

<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:** [November 18, 2018, 6:13pm UTC](https://forum.inductiveautomation.com/t/substitute-of-packages-com-inductiveautomation-opcua/20929/4 "2018-11-18T18:13:41Z")

</div>

As long as the `DataValue` isn’t holding a null value you can get the class of the underlying value and try `BuiltinDataType.fromBackingClass()`.

---

<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:** [November 18, 2018, 7:28pm UTC](https://forum.inductiveautomation.com/t/substitute-of-packages-com-inductiveautomation-opcua/20929/5 "2018-11-18T19:28:44Z")

</div>

> [@Kevin.Herron](#):
>
> hit option/alt+Enter in IntelliJ and it will usually find and suggest the new import.

Eclipse is similar. But I find it convenient to use ctrl-shift-O to "Organize Imports" for the whole file at once. It rarely gets it wrong. (-:

---

<div class="post-metadata">

**Author:** ![chi](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@chi](https://forum.inductiveautomation.com/u/chi)\
**Post date:** [January 23, 2019, 9:11pm UTC](https://forum.inductiveautomation.com/t/substitute-of-packages-com-inductiveautomation-opcua/20929/6 "2019-01-23T21:11:28Z")

</div>

> [@Kevin.Herron](#):
>
> Everything under `com.inductiveautomation.opcua`

Can you please give me a hint how to replace the NodeBuilders (com.inductiveautomation.opcua.nodes.builders.NodeBuilder, ObjectNodeBuilder, VariableNodeBuilder)?  
I found the VariableTypeManager.VariableNodeConstructor interface but have no idea how to get an actual instance of it.  
Is there a javadoc for milo somewhere? The source on github seems to have verly limited comments.

---

<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:** [January 23, 2019, 9:22pm UTC](https://forum.inductiveautomation.com/t/substitute-of-packages-com-inductiveautomation-opcua/20929/7 "2019-01-23T21:22:52Z")

</div>

> <https://github.com/inductiveautomation/ignition-sdk-examples/blob/5d80f499b8938e668793255cee5dbd6828e830a3/opc-ua-device/opc-ua-device-gateway/src/main/java/com/inductiveautomation/ignition/examples/tagdriver/ExampleDevice.java#L121-L165>

---

<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:** [January 23, 2019, 9:24pm UTC](https://forum.inductiveautomation.com/t/substitute-of-packages-com-inductiveautomation-opcua/20929/8 "2019-01-23T21:24:49Z")

</div>

The [ExampleNamespace](https://github.com/eclipse/milo/blob/dev/0.3/milo-examples/server-examples/src/main/java/org/eclipse/milo/examples/server/ExampleNamespace.java) from Milo is also worth looking at if you’re playing with the new Device API, since it’s basically just an extension of a Milo Namespace.

There’s also some node builder usages in there.

---

<div class="post-metadata">

**Author:** ![chi](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@chi](https://forum.inductiveautomation.com/u/chi)\
**Post date:** [January 23, 2019, 9:30pm UTC](https://forum.inductiveautomation.com/t/substitute-of-packages-com-inductiveautomation-opcua/20929/9 "2019-01-23T21:30:43Z")

</div>

Thank you, those examples are very helpful!
