预订演示
前页 后页

Sparx 英特尔服务配置

SparxIntelService.exe 程序为Enterprise Architect运行一项或多项英特尔服务。该程序与Enterprise Architect位于相同的安装文件夹中,它使用一个配置文件来运行可以在本地计算机上运行的服务。

在本主题的示例中,程序将尝试使用文件c:\mystuff\myservices.config。它会寻找一个名为EA的服务,如果找到,就启动它I

SparxIntelService.exe监听服务= EA config= c:\mystuff\myservices.config

The Config File Format

The configuration file has this format:
# comment
# comment
# comment
{ # start of service definition
    ... # list of directives as pairs
} # end of service definition
{ # start of service definition
   ... # list of directives as pairs
} # end of service definition

Comments are indicated by the # character.
If the config directive is omitted (not recommended), the program will look for a config file of the same name as the program, in the same directory as the program.
In this example the program will attempt to use the file SparxIntelService.config in the same folder:
     SparxIntelService.exe listen service:EA

Directive

Description

See also

姓名

在命令行上命名服务时,将启动具有匹配名称属性的服务。

状态

状态=ON时,服务将被启动;否则,将不会启动。

懒加载

lazyload为“true”时,任何代码矿工数据库都将延迟加载,直到向服务发出英特尔请求。

日志级别

将记录的信息级别定义为由“|”分隔的关键字 {information,warning,error} 的组合。例如:

loglevel=信息|警告|错误

日志输出

指定要写入的log文件的完整路径名。例如:

     日志输出=c:\logfiles\intel-service-project1。 log

数据库

指定要加载的代码矿工数据库的全路径名。例如:

     数据库=c:\intel--service\project1.cdb

允许多个“数据库”指令,每个指令指定一个不同的数据库。

允许

标识允许连接到端口上的服务的 IP 地址。例如:

允许=本地主机

允许=127.0.0。 1

allow=172.160.*(当 'network' 允许使用通配符

指令的值为“网络”或“公共”,

但不是“本地”)

网络

允许限制服务连接。

  • 本地 - 服务不会侦听除localhost以外的任何连接
  • 网络 - 当与通配符“允许”指令一起使用时,允许使用允许的 IP 地址通配符的客户端进行连接
  • 公共 - 允许任何连接

节目

当为“真”时,将显示服务的控制台窗口;默认值为“ false ”。

港口

服务将侦听的端口。

The Service Configuration Template

When choosing the 'Execute > Tools > Services > Code Miner Service > Edit Configuration File' ribbon option you display the Windows 'Save As' browser through which you can choose either the config file to open or where a file should be created.
If no config file is recorded in the registry and you specify a non-existent filename, that file is created, filled with a 'bare bones' configuration skeleton and saved. The selected/new configuration is then shown in the Enterprise Architect default editor.
The 'bare bones' template is shown here.

#--------------------------------------------------------------------------------
# Sparx Intel Service Configuration File
# ---------------------------------------------------------------------------------
# This file is used to describe one or more intel services and the code miner databases that they support
# This file can be used in EA to manage a number of services on the local machine
# ---------------------------------------------------------------------------------
# Service Attributes
# ---------------------------------------------------------------------------------
# name The unique name of the service in this file
# status "ON" - service can run, "OFF" service will never run
# lazyload "true" - databases are loaded n demand, "false" - databases are loaded when service starts
# port           Unique Port number that service will listen on and EA will connect to
# network          [optional,default=local] Restricts service to listening to locahost only (local), to a range of addresses (network) or any address (public)
# allow Allows a specific IP address or wildcard IP address to connect (if network is NOT local)
# (There can be multiple allow directives present)
# autoupdate           "true" - will detect updates to listed databases and reload them, "false" default, changes are not detected
# show [optional,default=false] shows the console window for the service
# logoutput          [optional] The path of a log file which service can write to
# loglevel          [optional] The levels of information logged. Combine with '|' character, e.g.: { information|warning|error }
# database          [Required] The full path to a codeminer database which usually has the .cdb file extension
# (There can be multiple database directives present)
#
# ---------------------------------------------------------------------------------
# Attribute Values
# ---------------------------------------------------------------------------------
#
# <string>   - text. (do not include quotes)
# <boolean>  - text, { true, false, ON, OFF }
# <path>     - fully specified file path to codeminer database
# <number>   - digits
# ---------------------------------------------------------------------------------
#
{
name=<string>,
status=<boolean>,
lazyload=<boolean>,
port=<number>,
allow=<string>,
allow=<string>,
network=<string>,
autoupdate=<string>,
show=<boolean>,
logoutput=<string>,
loglevel=<string>,
database=<path>,
database=<path>,
database=<path>
},
{
name=Project1,
status=ON,
lazyload=TRUE,
allow=localhost,
allow=127.0.0.1,
port=9999,
autoupdate=true,
database=c:\Project1\Project1.cdb
}

Sparx Intel 服务功能区选项

当服务配置文件存在时,您可以使用代码矿工菜单选项组中“执行 > 工具 > 服务”功能区选项中的许多选项来编辑或执行它。

选项

描述

视图所有服务的状态

(在所有服务类别之上。)此选项显示一个视图,其中列出了在当前配置文件中状态的每个Enterprise Architect服务的状态及其状态。

开始

该选项读取当前的Service配置文件,启动配置为运行的服务,停止运行未配置为运行的运行。 A以下情况下配置服务:

  1. 它在配置文件中命名。
  2. 它具有属性状态:ON。

停止所有

此选项停止当前正在运行的所有服务。

编辑配置文件

此选项提示要使用的服务配置文件,然后在Enterprise Architect文本编辑器中打开该文件。系统会记住文件所在的位置。

自动开始使用 EA

此选项会在模型打开时自动启动具有“状态:ON”属性的服务。

当模型打开时,此处记录到系统输出窗口的消息表明该服务已经在运行。

关闭时自动停止

此选项在Enterprise Architect关闭时自动停止运行服务。