get
Description
returns a
structure where each field name is the name of a property of the v
= get(c
)bloombergServer
object c
, which uses the Bloomberg® Server C++ interface, and each field contains the value of that
property.
returns the value of the specified properties v
= get(c
,properties
)properties
for the
Bloomberg V3 connection object.
Examples
Retrieve Bloomberg Connection Properties
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)
Retrieve One Bloomberg Connection Property
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)
Retrieve Two Bloomberg Connection Properties
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
c
— Bloomberg Server connection
bloombergServer
object
Bloomberg Server connection, specified as a bloombergServer
object.
properties
— Property names
character vector | string scalar | cell array of character vectors | string array
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
v
— Bloomberg connection properties
numeric scalar | character vector | object | structure
Bloomberg connection properties, returned as these data types depending on the requested properties.
Requested Properties | Data Type |
---|---|
Port number or timeout | Numeric scalar |
IP address | Character vector |
Bloomberg session | Object |
All properties | Structure |
Version History
Introduced in R2021a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)