Documentation for Axxon PSIM 2.0. Documentation for other versions of Axxon PSIM is available too.

Previous page Next page


The IsAvailableObject method is used to determine the current access rights to an object.

Syntax for method invocation:

function IsAvailableObject(compname: String, objtype: String, id: String, param : String) : String

The method returns 0 if the current user has not been assigned rights of the param type to access the object. The method returns 1 if rights have been assigned.

Method arguments:

  1. compname is a required argument. It corresponds to the name of the Computer object on the basis of which the object was created in the hardware tree.
  2. objtype is a required argument. It corresponds to the type of system object access rights to which you want to clarify. Possible values: String type, range is limited by object types registered in the system.
  3. id is a required argument. It corresponds to the identification (registration) number of the object specified by the objtype argument. Possible values: String type, range is limited by the identification numbers of objects of the specified type registered in the system.
  4. param is a required argument. It corresponds to the number of the type of rights that you want to find out if they exist. A description of rights is given in Restriction of administration, control, and monitoring rights. Possible values:
    1. 0—rightsNoView access rights. The method will return 1 if there are no administrative, control, or monitoring rights to the object (red "x").
    2. 1—rightsNoControl access rights. The method will return 1 if there are only monitoring rights (letter M).
    3. 2—rightsViewAndControl access rights. The method will return 1 if there are control and monitoring rights to the object (green checkbox).
    4. 3—rightsViewOrControl access rights. The method will return 1 if there are either monitoring or control rights to the object.
    5. 4—rightsNot access rights.
    6. 5—rightsConfigure access rights. The method will return 1 if there are administrative, control, and monitoring rights to the object (grey checkbox).

Example. A Camera object with the identifier 1 has been created in the hardware tree on the basis of the Computer object with the "Comp" name. Find out the current access rights to the object.

var i = 0;
for(i = 0; i <= 5; i++)
{
     var result =
    IsAvailableObject('Comp','CAM','1', i);
    DebugLogString("right "+i+" = "+result);
}
  • No labels