gxdn

Association Logical Name

Association Logical Name object is used to tell what kind of functionality (objects and services) meter can offer. It's also used to tell authentication information (level and password). There is own Association Logical Name object for each authentication level.

Properties

  • 1. Logical Name
    Logical name of the object.
  • 2. Object list
    List of objects what this authentication level can offer. List also contains access right for all the objects.
  • 3. Associated partners ID
    Client and server SAPs.
  • 4. Application context name
    Name of the application context.
  • 5. xDLMS context info
    Contains information from supported service (conformance) and maximum PDU size.
  • 6. Authentication mechanism name
    Contains information from used authentication mechanism (level).
  • 7. Secret
    Password.
  • 8. Association status.
    Is this object used.
  • 9. Security setup reference
    Logical name of used security setup object .
  • 10. User list
    List of users.
  • 11. Current user
    Identifier of the current user.

Actions

  • 1. Reply to HLS authentication
    This action is used when HLS connection is used to send CtoS challenge.
  • 2. Change HLS secret
    This action is used to change HLS password.
  • 3. Add object
    Add new object to object list..
  • 4. Remove object
    Remove object from the object list..
  • 3. Add user
    Add new user to user list..
  • 4. Remove user
    Remove user from the user list..

Access data from ANSI C

//Add new user to user list.
gxKey2 *it;
const char * name = "Gurux";
unsigned char len = strlen(name);
it = (gxKey2*)gxmalloc(sizeof(gxKey2));
it->key = 1;
it->value = gxmalloc(len + 1);
((char*)it->value)[len] = 0;
memcpy(it->value, name, len);
arr_push(&object->userList, it);
//Show users on user list.
int pos;
gxKey2 *it;
for (pos = 0; pos != object->userList.size; ++pos)
{
    if ((ret = arr_getByIndex(&object->userList, pos, (void**)&it)) != 0)
    {
        return ret;
    }
    printf("ID: %d\r\n", it->key);
    printf("Name: %s\r\n", (char*)it->value);
}
//Remove user from the user list..
int ret;
gxKey2 *it;
ret = arr_removeByIndex(&object->userList, 1, (void**) &it);
//Clear user name.
free(it->value);
//Clear removed object.
free(it);