Cicode Programming Reference > Cicode Function Categories > Server Functions > ServerBrowseOpen

ServerBrowseOpen

The ServerBrowseOpen function initiates a new browse session and returns a handle to the new session that can be used in subsequent data browse function calls.

This function is a blocking function. It blocks the calling Cicode task until the operation is complete.

Syntax

ServerBrowseOpen(STRING Filter , STRING Fields , STRING Clusters)

Filter:

A semicolon delimited list of field name=field value pairs, specifying the records to return during the browse. An empty string indicates that all records will be returned.

The following regular expressions are supported: *expr, expr*, and *expr*. To specify an exclusion filtering condition, use the NOT keyword after the = operator.

Fields:

Specifies via a comma-delimited string the columns to be returned during the browse. An empty string indicates that the server will return available columns. Supported fields are:

NAME, TYPE, COMMENT, CLUSTER, MODE, NETADDR, PORT, LEGACYPORT.

See Browse Function Field Reference for information about fields.

Clusters:

An optional parameter that specifies via a comma delimited string the subset of clusters to browse. An empty string indicates that connected clusters will be browsed.

Return Value

An integer handle to the browse session. Returns -1 on error.

The returned entries will be ordered alphabetically by name.

Related Functions

ServerBrowseClose, ServerBrowseFirst, ServerBrowseGetField, ServerBrowseNext, ServerBrowseNumRecords, ServerBrowsePrev

Example

INT hServers = ServerBrowseOpen("Type=alarm;Mode=1, "Name", "");

See Also

Published June 2018