---
title: "Functions (RSOSI)"
canonical: "https://docs.cuesystem.com/space/CVCAPPLETS/665288773/Functions%20(RSOSI)"
format: markdown
---
## SetIsOccupied

This function sets the availability of the room. 

#### Syntax

```visualbasic
SetIsOccupied(
  sensornumber As Long, 
  isoccupied As Boolean, 
  Optional sensorisworkingwell As Boolean := True) 
As Boolean
```

#### Function parameters

- sensornumber - number of sensor, possible values are 1 to 150, only number of enabled sensor can be used.
- isoccupied - value of occupancy sensor. It is True, if the people are present in the room or False otherwise.
- sensorisworkingwell - sensor funcionality. You can use this optional parameter in case your sensor has built-in diagnostic. If your program recognize some failure in sensor functionality, set this parameter to False. In this case data from given sensor will not be used to evaluate room occupancy.

The function returns True on success or False if an error occurs. 

#### Example

```visualbasic
Private Process Page1_PushButton1_OnPush( ) Link Page1.PushButton1.OnPush

    // This sets the sensor 1 to the occupied. 
    ReservationSystemOccupancySensorIntegration1.SetIsOccupied(1, True)

End Process
```

## SetAllSensors

This function sets the sensors. Maximum number of sensor is 150. 

#### Syntax

```visualbasic
SetAllSensors(sensors As Array [] As SensorStructure)As Boolean
```

#### Function parameters:

sensors as SensorStrucutre

- Name - name of sensor
- Enabled - use of sensor

The function returns True on success or False if an error occurs.

## SetSensorParams

This function sets sensors parameters. 

#### Syntax

```visualbasic
SetSensorParams(
  sensornumber As Long, 
  isenabled As Boolean, 
  name As Text) 
As Boolean
```

#### Function parameters

- sensornumber - umber of sensor (1 - 150)
- isenabled - use of sensor
- name - name of sensor

The function returns True on success or False if an error occurs.

## GetSensorParams

This function return sensors parameters. 

#### Syntax

```visualbasic
GetSensorParams(
  sensornumber As Long, 
  ByRef isenabled As Boolean,
  ByRef name As Text)
As Boolean
```

#### Function parameters

- sensornumber - umber of sensor (1 - 150)
- isenabled - use of sensor
- name - name of sensor

The function returns True on success or False if an error occurs.

## GetMeetingInfo

This function returns the status of the current meeting, which takes place in the room that uses the sensor. Structure MeetingInfoStructure is described in chapter Structures. The function returns True on success or False if an error occurs.

#### Syntax

```visualbasic
GetMeetingInfo(
  sensorname As Text, 
  ByRef newmeetinginfo As MeetingInfoStructure) 
As Boolean
```