Extensionbyhandle, Getpermission – Echelon OpenLNS User Manual

Page 899

Advertising
background image

OpenLNS Programmer's Reference

862

ExtensionByHandle

Summary

Retrieves an Extension object by its handle property.

Extension records are defined for OpenLNS objects such as

the Channel, DeviceTemplate, AppDevice, Subnet, Subsystem,

LonMarkObject, and Router objects.
You can use the ExtensionByHandle method of the System

object

to get an Extension object in the network database

through its handle property—regardless of the collection

containing the Extension object. This may be particularly

useful when processing events reported by OnChangeEvent

with an objectType of lcaChangeEventExtensions, and a non-

zero networkHandle.
If the networkHandle in the OnChangeEvent

is 0, use the

ExtensionByHandle method of the ObjectServer instead.

Availability

Local, full, and lightweight clients.

Syntax

extension = system.ExtensionByHandle

Element

Description

Extension

The Extension object.

system

The System object.

handle

The handle of the Extension to be

retrieved.

Added to API

OpenLNS.

GetPermission

Summary

Returns the permission value for a specified client.

This method is provided to facilitate the testing of permission

strings by a local OpenLNS application. Lightweight clients

cannot use this method to determine access permission

because they will be unable to access the

Network

and

System

objects unless they already have permission to

operate on the network.

Availability

Local, full, and lightweight clients.

Syntax

permValue = systemObject.GetPermission(clientId)

Element

Description

permValue

A Long value containing the

permission level.
A return value of 0 indicates that

permission is denied.
A return value of 1 indicates that

permission is given.

systemObject

The System

object to be acted on.

clientId

A String containing an IP address

Advertising