Natural Access configuration file

The Natural Access configuration file (cta.cfg) specifies the Natural Access configuration. It includes the following specifications:

Natural Access provides a default cta.cfg that you can modify for your specifications.

This topic presents:

Default cta.cfg

The following example shows the default cta.cfg:

#==========================================================================
# cta.cfg
#
# This is an example of a file that specifies Natural Access configuration.
# It allows you to specify:
#    Generic operational settings that apply to Natural Access
#    Server (ctdaemon) and all Natural Access applications.
#    Note: these settings can be overwritten by a Natural Access
#           application via ctaInitialize.
#    Application specific settings.
#    Natural Access Server (ctdaemon) specific settings.
#    Service-specific parameter defaults.
#
#==========================================================================



#==========================================================================
#  Natural Access System Configuration (ctasys)
#
# Valid options are:
#   Service = name, dll   - tells the application about available "services"
#                       - tells the Natural Access Server what
#                             "services" to export
#
# Note: NCC should always precede ADI when both services are listed.
#==========================================================================
[ctasys]
Service = ppx, ppxmgr
Service = swi, swimgr
Service = vce, vcemgr

#==========================================================================
# Natural Access application configuration (application)
#
#==========================================================================
[application]
# DefaultServer = {inproc | localhost | server_name}
DefaultServer = inproc 

# ContextNameUniqueness = {0|1}  - Specification of responsibility for 
#                                  the context name uniqueness
#                                  (application or Natural Access Server)
# 0 - Natural Access Server is responsible for the context name uniqueness.
#     Allow context name modification by Natural Access Server to ensure 
#     name uniqueness (default)
# 1 - Application is responsible for the context name uniqueness.
#     Disallow context name modification by Natural Access Server, 
#     uniqueness error expected from Natural Access Server
ContextNameUniqueness = 0

SessionTimeout = 3

#==========================================================================
# Natural Access Server configuration (server)
#
#==========================================================================
[server]
# ParmFlags = {0|1}   -  Natural Access Server parameter flags
# 0 - Natural Access Server provides the same default parameters for in-
#     process contexts and contexts created on the server.
# 1 - Natural Access Server provides different parameters for in-process
#     contexts and for contexts created on the server.
ParmFlags = 0

# TraceMode = {0|1|2}   -  Natural Access Server trace mode
# 0 - Tracing is disabled is default mode  
# 1 - Enable tracing, immediate write to trace memory  (default mode) 
#     (requires ctdaemon to be running)
# 2 - Write trace memory on error only, keep local trace memory for each
#     context  
TraceMode = 1

 Remote tracing parameters
#   TraceMask = mask           - defines the default tracing mask
#   TraceFile = filename       - defines trace file name
#   StartCtaServer = {0|1}     - 0 disables starting of built-in 
#                                Natural Access Server
TraceMask = 0
# TraceFile = cta.log
StartCtaServer   = 1            

#
# DaemonAutoRestart parameter
#  0 - Do not automatically restart Natural Access Server after crash
#  1 - Automatically restart Natural Access Server after crash
#
DaemonAutoRestart = 0

# OAM Parameter
#  0 Configuration is not for an autonomous board
#  1 Assumes configuration is for autonomous board
AutonomousBoard = 0

#==========================================================================
# Natural Access Default Parameter Changes (ctapar)
#
# Valid syntax for changes is:
#   service[.x].category.field = value
#
#==========================================================================
[ctapar]

# by default, no changes are made

#==========================================================================
[eof]

cta.cfg sections

The default cta.cfg specifies the following information:

Section

Description

ctasys

Sets the services available to the application. The Natural Access system header is interpreted by Natural Access Server (ctdaemon) and by ctaInitialize.

application

Sets the default server with which an application works. The default server is either in-process, local, or remote. See Setting the default server.

This section also specifies whether or not Natural Access Server (ctdaemon) automatically renames contexts to ensure uniqueness. If this option is not activated, Natural Access Server returns an error when a context name is duplicated. The Session Timeout parameter defines the amount of time in seconds in which an application tries to establish communications between the application and a server.

server

Specifies how Natural Access Server (ctdaemon) runs. This section includes settings for Natural Access Server, parameter management, traceflags, and remote tracing. To run Natural Access on local and multiple remote servers, set StartCtaServer to 1.

The ParmFlags and TraceMode settings affect only the Natural Access Server (ctdaemon). All contexts created on this server see the same parameter settings.

TraceMode sets the style of tracing for applications. The TraceMode setting has no effect on contexts created on an in-process server. For contexts created on in-process servers, applications must define the style of tracing when they make the call to ctaInitialize. To define the style of tracing, set tracefields parameter within the CTA_INIT_PARMS structure.

Applications operating with contexts created on servers in different locations (for example, in-process, local, and remote) have tracing characteristics that are a combination of the servers and applications tracing settings.

If you set the DaemonAutoRestart parameter to 1, Natural Access Server (ctdaemon) starts automatically following some crashes.

ctapar

Specifies Natural Access default parameter overrides. This section is interpreted by Natural Access Server (ctdaemon) and by ctaLoadParameterFile.


Setting the default server

To set the default server, edit cta.cfg by setting the DefaultServer keyword in the application section to one of the following locations:

DefaultServer = inproc | localhost | server_name

Location

Description

inproc

The Natural Access Server functionality runs within the process address space. Contexts created using inproc are specific to the application and cannot be shared.

localhost

The Natural Access Server functionality runs in a Natural Access Server (ctdaemon) process that is separate from the application, but on the same host. Contexts created on Natural Access Server using localhost can be shared.

server_name

The Natural Access Server functionality runs in a Natural Access Server (ctdaemon) process that is separate from the application. A server_name or IP address specifies the host on which the server runs. The application may or may not be running on the same host. Contexts created on Natural Access Server using server_name can be shared.


Note: If an existing application uses a configuration file that sets the CTAmode statement, CTAmode = 0 or CTAmode = 2 are interpreted as if the DefaultServer statement is set to inproc. CTAmode = 1 is interpreted as a setting of localhost.

When you are finished, save the changes.