Main Content

get

Properties of Bloomberg B-PIPE connection V3

Since R2021a

Description

example

v = get(c) returns a structure where each field name is the name of a property of the bloombergBPIPE object c, which uses the Bloomberg® B-PIPE® 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

Create a Bloomberg B-PIPE connection using the IP address of the machine running the Bloomberg B-PIPE process. This example uses the Bloomberg B-PIPE C++ interface and assumes the following:

  • The authentication is Windows® authentication when you set authtype to 'OS_LOGON'.

  • The application name is blank because you are not connecting to Bloomberg B-PIPE using an application.

  • The IP address for the machine running the Bloomberg B-PIPE process is '111.11.11.112'.

  • The port number of the machine running the Bloomberg B-PIPE process is 8194.

c is a bloombergBPIPE object.

authtype = 'OS_LOGON';
appname = '';
ipaddress = {'111.11.11.112'};
port = 8194;

c = bloombergBPIPE(authtype,appname,ipaddress,port);

Retrieve the Bloomberg connection properties.

v = get(c)
ans = 

  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)

Create a Bloomberg B-PIPE connection using the IP address of the machine running the Bloomberg B-PIPE process. This example uses the Bloomberg B-PIPE C++ interface and assumes the following:

  • The authentication is Windows authentication when you set authtype to 'OS_LOGON'.

  • The application name is blank because you are not connecting to Bloomberg B-PIPE using an application.

  • The IP address for the machine running the Bloomberg B-PIPE process is '111.11.11.112'.

  • The port number of the machine running the Bloomberg B-PIPE process is 8194.

c is a bloombergBPIPE object.

authtype = 'OS_LOGON';
appname = '';
ipaddress = {'111.11.11.112'};
port = 8194;

c = bloombergBPIPE(authtype,appname,ipaddress,port);

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)

Create a Bloomberg B-PIPE connection using the IP address of the machine running the Bloomberg B-PIPE process. This example uses the Bloomberg B-PIPE C++ interface and assumes the following:

  • The authentication is Windows authentication when you set authtype to 'OS_LOGON'.

  • The application name is blank because you are not connecting to Bloomberg B-PIPE using an application.

  • The IP address for the machine running the Bloomberg B-PIPE process is '111.11.11.112'.

  • The port number of the machine running the Bloomberg B-PIPE process is 8194.

c is a bloombergBPIPE object.

authtype = 'OS_LOGON';
appname = '';
ipaddress = {'111.11.11.112'};
port = 8194;

c = bloombergBPIPE(authtype,appname,ipaddress,port);

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 B-PIPE connection, specified as a bloombergBPIPE 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

Version History

Introduced in R2021a