Multiple Associations - object lists

4 posts / 0 new
Last post
enemy235
Multiple Associations - object lists

Hi,
I'm trying to make server with multiple association objects and specify different set of objects to each association. It is possible to create it in that way? My first test ended up with Hardware fault and now I'm getting all the objects.

From my understanding, when you connect to different association, this should get "transferred" to Current association object, is that right? Or meter should just response to 0.0.40.0.0.255:2 with actual association, that is used?
For example: Request for association 0.0.40.0.0.255:2 gets response with content of 0.0.40.0.5.255:2?

Kurumi
Kurumi's picture

Hi,

You are right. Create associations and attach them to the association view as below.

static gxObject* NONE_OBJECTS[] = { BASE(associationNone), BASE(ldn), BASE(sapAssignment) };

static gxObject* ALL_OBJECTS[] = { BASE(associationNone), BASE(associationLow), BASE(associationHigh), BASE(associationHighGMac), BASE(securitySetupHigh), BASE(securitySetupHighGMac),
...

Attach object to the the association view.

OA_ATTACH(associationNone.objectList, NONE_OBJECTS);
OA_ATTACH(associationLow.objectList, ALL_OBJECTS);

BR,
Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi

enemy235

Thank you.
I just found out, that I never did association.setObjectList(myList). So that's why I was getting all the objects.
And in my first attempt I didn't fill all the association objects and because of that I was getting Hardware fault and error: SEVER: null...

Kurumi
Kurumi's picture

Hi,

Thanks for this info. I have thought about how to improve if all the objects are not set because it might cause problems as you have.

BR,
Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi