ASPEN_GetServerInfo

 

Related Topics

 

 

Purpose

Get information about a Server's configuration.

 

 

Call Syntax

#include <aspen.h>

AspenRequest(GLOBAL_session, ASPEN_GetServerInfo, NULL, &serverInfo);

 

 

Parameters

Input

None.

 

Output

The output parameter for this service is a pointer to a ASPEN_GETSERVERINFO_OUTPUT structure that receives the Aspen Server's configuration information.

 

 

Structures

typedef struct

{

   int               data_feed;

   int               time_zone;

   ASPEN_TIME        time;

   int               seconds;

   int               intraday_bar_width;

   char              server_name[10];

   int               security_mode;

   long              max_watchlist_size;

   unsigned long     system_ID;

   int               server_number;

   int               authorized_user_limit;

   int               max_user_profiles;

}ASPEN_GETSERVERINFO_OUTPUT;

 

 

Remarks

ASPEN_GETSERVERINFO_OUTPUT receives information on the Server's configuration. This information includes:

 

  • Server Name
    The Server’s name, as given by a Server administrator.
     

  • Data Feed
    An integer identifying which feed the Server parses. See, Data Feeds.
     

  • Intraday Bar Width
    An integer identifying the time base of the Server’s intraday bar database. This value will be either 15 (fifteen minutes) or 5 (five minutes).
     

  • Server's Time Zone
    Identifies the time zone in which the Server is collecting data. See, Figure 3 Aspen time zone values.
     

  • Time
    The Server’s current, absolute time.
     

  • Seconds
    Indicates the second within the minute.
     

  • Security Mode
    Identifies the Server’s security mode. See, Aspen_Security_Mode.
     

  • Max Watchlist Size
    Identifies the length of a Server’s watchlist.
     

  • System ID number
    Identifies the Server’s identification number.
     

  • Server Number
    Identifies the Server number. This number will be 0 unless the server is a member of a fail-over scheme.
     

  • Authorized User Limit
    The maximum number of users that can login at once. This number will be between 1 and 100.
     

  • Max User Profiles
    The maximum number of user Profiles that can be defined. This number will be between 1 and 100.

 

 

Return Value

ASPEN_OK

Server information returned successfully.

 

 

See Also

ASPEN_TIME

AspenRequest()

ASPEN_GETSERVERINFO_OUTPUT

 

 

Example

int CAspenRequestDlg::DoASPEN_GetServerInfo()

{

   ASPEN_GETSERVERINFO_OUTPUT serverInfo;

   server_list                *slp = list;

   unsigned long              dayOfCentury;

   struct tm                  localTime;

   char                       timeStr[80];

   int                        retval;

   int                        serverTimeZone;

   CString                    strText;

 

   retval = AspenRequest(slp->server_session, ASPEN_GetServerInfo, NULL, &serverInfo);

   if (!retval)

   {

      serverTimeZone = serverInfo.time_zone;

      AspenTimeToANSITime(serverInfo.time, serverInfo.seconds, serverTimeZone, (struct tm *)(&localTime), &dayOfCentury);

      strcpy(timeStr, asctime(&localTime));

      strText.Format("Name : %s", serverInfo.server_name);

      m_HistoryEdit.AppendString(strText);

      strText.Format("DataFeed : %d", serverInfo.data_feed);

      m_HistoryEdit.AppendString(strText);

      strText.Format("IntradayBarWidth : %d", serverInfo.intraday_bar_width);

      m_HistoryEdit.AppendString(strText);

      strText.Format("TimeZone : %d", serverInfo.time_zone);

      m_HistoryEdit.AppendString(strText);

      strText.Format("Time : %s", timeStr);

      m_HistoryEdit.AppendString(strText);

      strText.Format("Seconds : %d", serverInfo.seconds);

      m_HistoryEdit.AppendString(strText);

      strText.Format("Security Mode : %d", serverInfo.security_mode);

      m_HistoryEdit.AppendString(strText);

      strText.Format("Max Watchlist Size : %d", serverInfo.max_watchlist_size);

      m_HistoryEdit.AppendString(strText);

      strText.Format("System ID number : %ld", serverInfo.system_ID);

      m_HistoryEdit.AppendString(strText);

      strText.Format("Server Number : %d", serverInfo.server_number);

      m_HistoryEdit.AppendString(strText);

      strText.Format("Authorized User Limit : %d", serverInfo.authorized_user_limit);

      m_HistoryEdit.AppendString(strText);

      strText.Format("Max User Profiles : %d", serverInfo.max_user_profiles);

      m_HistoryEdit.AppendString(strText);

   }

   return retval;

}

 

©2006 Aspen Research Group, Ltd. All rights reserved. Terms of Use.