int tsmGet ( TsmConnection connect, TsmSetting setting ) Query a connection variable
Query a connection variable.The tsmGet function lets you query various characteristics of a connection; a number of which may be changed with the associated tsmSet function. The setting value can be any of the following. In each case we state whether a settings can only be read (i.e. returned by tsmGet), or if it can also be changed (i.e. using tsmSet).
N.B. this function always returns an int. We note where this should be cast to another type, e.g. name = (char *) tsmGet( connect, TSM_DATASET_NAME );
- TSM_CONNECT_PROTOCOL: The connection protocol being used: one of TSM_DPSS, TSM_LOCAL, or TSM_HTTP. You should cast this to a (TsmConnectionType). (READ ONLY)
- TSM_DATASET_NAME: The name of the dataset that was connected to using the tsmConnect function call. You should cast this to a (char *). (READ ONLY)
- TSM_DATASET_URL: The full URL for the dataset that was connected to using the tsmConnect function call. You should cast this to a (char *). (READ ONLY)
- TSM_DATASET_TSPEC: The Pyramid Tspec structure for the connection. You should cast this to a (Pyramid *). (READ ONLY)
- TSM_TSPEC_URL: The location where the dataset's tspec file was loaded from, e.g. for DPSS sets this could be from the DPSS itself or from some metadata URL. (READ ONLY)
- TSM_IMAGE_FORMAT: One of TSM_LRBT_FORMAT, TSM_JPEG_FORMAT, or TSM_LZW_FORMAT. (READ ONLY)
- TSM_IMAGE_FORMAT_STRING: One of "lrbt-raster", "jpeg-compressed", or "lzw-compressed". You should cast this value to a (char *). (READ ONLY)
- TSM_TILE_FORMAT: One of TSM_NONE_TILES, TSM_RAW_TILES, TSM_TIFF_TILES, or TSM_DPSS_TILES. The raw and tiff formats are used for local disk tiles, while the dpss format means that the tile data are stored on a DPSS. You should cast this to a (TsmTileFormat) value. (READ ONLY)
- TSM_TILE_FORMAT_STRING: One of "none", "raw-tiles", "blocked-tiff", "dpss". You should cast this to a (char *) value. (READ ONLY)
- TSM_DATASET_TYPE: One of TSM_DEM_DATASET, TSM_IMAGE_DATASET, TSM_VRML_DATASET, or TSM_UNKNOWN_DATASET. You should case this to a (TsmDataSetType). (READ ONLY)
- TSM_DATASET_TYPE_STRING: One of "dem", "image", "vrml", or "unknown". You should case this to a (char *). (READ ONLY)
- TSM_READWRITE_MODE: One of TSM_READ_ONLY, TSM_WRITE_ONLY, or TSM_READ_WRITE, describing the connection mode. This should be case to a (TsmAccessMode). (READ ONLY)
- TSM_READWRITE_MODE_STRING: One of "read-only", "write-only", or "read/write" describing the connection mode. This should be case to a (char *). (READ ONLY)
- TSM_TILE_SIZE: The size of a single tile for the connection, given in bytes. (READ ONLY)
- TSM_DPSS_SETID: Returns the set ID for a dataset on a DPSS. If you ask this value for a non DPSS set, you will get a value of -1. (READ ONLY)
- TSM_DPSS_SERVERS: Returns a string containing a list of whitespace-separated server names for a DPSS dataset. Returns an empty string if dataset is not on a DPSS. (READ ONLY)
- TSM_DONT_READ_TILES: A value of TRUE means that the tsmReadTile and tsmReadNextTile functions will not make any disk/network access (and hence not read the tile data). This allows programs to test all overhead and computation without doing any I/O. (default = FALSE, READ/WRITE)
- TSM_JPEG_QUALITY: A value between 5 and 100 (inclusive) that specifies the JPEG quality percentage used when compressing tiles to JPEG, i.e. 100% means highest quality but largest file size. (default = 75, READ/WRITE)
- TSM_PROGRESS_METER: TRUE means that you want to have tsmApi display a progress meter for operations that take a potentially long time, e.g. tsmCopyLevelTiles, tsmCopyAllTiles, tsmCreateLevelTiles, tsmCreateAllTiles, etc. Use a value of FALSE to keep these routines silent. (default = TRUE, READ/WRITE)
- TSM_FINISH_LOAD_ON_DISCONNECT: If this value is TRUE then whenever you create a new DPSS dataset, that set will be marked as loaded when you do a tsmDisconnect. If this value is FALSE, then the set is left open when you disconnect and you can continue loading tiles during another session if you connect to the set specifying its set-id. (default = TRUE, READ/WRITE)
- TSM_REQUEST_TIMEOUT: This will return the current timeout (secs) being used between sending a request list to a DPSS. This setting applies only to DPSS connections - any other types of connections will simply return zero. You must cast this result to (float).