Hi,
I'm want to execute a method of an unkonwn object using Python.
In my exemple, i have :
item: an object cosem that generate automaticaly, so i dont have this type.
index: index of method is known
how i can execute the method with index for any item ?
Hi, It's not possible to…
Hi,
It's not possible to execute or read/write for the unknown object. You always need to know the object type. All objects should be in the association view.
BR,
Mikko
Thanks, The object is known…
Thanks,
The object is known from meter and it is present in association view, but for the user it is unknown, so i want to automaticaly execute the method related to a an index and obis code entered by the user.
More explanation: in my case…
More explanation:
in my case, i have a method that return object instance.
for exemple:
* method name : create_item()
* input: obis_code, method_index, data
==> item = create_item(obis_code, method_index, data)
if i want to execute the method 1 of object with obis_code '1.2.1.6.1.255', item will be 'GXDLMSExtendedRegister' instance, so item.reset(client) will be executed.
how i can do that?
Other question, For…
Other question,
For attributs , we have a method called 'getDataType' to return the dataType of attributs.
But how to get the dataType of method?
Hi, You need to find the…
Hi,
You need to find the object from the assciation view and use that object type.
Methods are more complex and you need to check what method you want to execute and give the correct parameters.
What you need to do is check what is the object type and then call wanted method with correct parameters.
With method the data types can be quite complex. For that reason it's not possible to return data type for the method.
BR,
Mikko
Hello, That means we cannot…
Hello,
That means we cannot get the data Type of methods?
Hi, Yes, you can't get the…
Hi,
Yes, you can't get the data type for the methods. Simple methods use only integer values, but with complex methdos, you need to write different kinds of arrays or structures.
BR,
Mikko
Thank you !
Thank you !