Main Content

get

Properties of Bloomberg Server connection V3

Description

example

v = get(c) returns a structure where each field name is the name of a property of the bloombergServer object c, which uses the Bloomberg® Server C++ interface, and each field contains the value of that property.

example

v = get(c,properties) returns the value of the specified properties properties for the Bloomberg V3 connection object.

Examples

collapse all

Connect to the Bloomberg Server using the IP address of the machine running the Bloomberg Server. This example uses the Bloomberg Server C++ interface and assumes the following:

  • The Bloomberg UUID is 12345678.

  • The IP address for the machine running the Bloomberg Server is '111.11.11.111'.

c is a bloombergServer object.

uuid = 12345678;
ipaddress = '111.11.11.111';

c = bloombergServer(uuid,ipaddress);

Retrieve the Bloomberg connection properties.

v = get(c)
v = 

  struct with fields:

      session: [1×1 datafeed.internal.BLPSession]
    ipaddress: "localhost"
         port: 8194.00

v is a structure containing the Bloomberg session object, IP address, port number, and timeout value.

Close the Bloomberg connection.

close(c)

Connect to the Bloomberg Server using the IP address of the machine running the Bloomberg Server. This example uses the Bloomberg Server C++ interface and assumes the following:

  • The Bloomberg UUID is 12345678.

  • The IP address for the machine running the Bloomberg Server is '111.11.11.111'.

c is a bloombergServer object.

uuid = 12345678;
ipaddress = '111.11.11.111';

c = bloombergServer(uuid,ipaddress);

Retrieve the port number from the Bloomberg connection object by specifying 'port' as a character vector.

property = "port";
v = get(c,property)
v =

        8194

v is a double that contains the port number of the Bloomberg connection object.

Close the Bloomberg connection.

close(c)

Connect to the Bloomberg Server using the IP address of the machine running the Bloomberg Server. This example uses the Bloomberg Server C++ interface and assumes the following:

  • The Bloomberg UUID is 12345678.

  • The IP address for the machine running the Bloomberg Server is '111.11.11.111'.

c is a bloombergServer object.

uuid = 12345678;
ipaddress = '111.11.11.111';

c = bloombergServer(uuid,ipaddress);

Create a cell array properties with character vectors 'session' and 'port'. Retrieve the Bloomberg session object and port number from the Bloomberg connection object.

properties = ["session" "port"];
v = get(c,properties)
v = 

  struct with fields:

    session: [1x1 com.bloomberglp.blpapi.Session]
       port: 8194

v is a structure containing the Bloomberg session object and port number.

Close the Bloomberg connection.

close(c)

Input Arguments

collapse all

Bloomberg Server connection, specified as a bloombergServer object.

Property names, specified as a character vector, string scalar, cell array of character vectors, or string array containing Bloomberg connection property names. The property names are session, ipaddress, port, and timeout.

Data Types: char | cell | string

Output Arguments

collapse all

Bloomberg connection properties, returned as these data types depending on the requested properties.

Requested PropertiesData Type

Port number or timeout

Numeric scalar

IP address

Character vector

Bloomberg session

Object

All properties

Structure

Introduced in R2021a