Compare commits
10 Commits
9bf9ac6479
...
psap
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d2d6e4792c | ||
|
|
60f5d5331b | ||
|
|
ea9b35e6b0 | ||
|
|
caacd242a8 | ||
|
|
e402a5cc2b | ||
|
|
f4230d1809 | ||
|
|
1ba62fb7c1 | ||
|
|
f2ac091e62 | ||
|
|
b73aff3a91 | ||
|
|
e594a5f19a |
10
bin/build.sh
10
bin/build.sh
@@ -56,10 +56,10 @@ if [ ! -d ${GitLocalRoot} ]; then
|
||||
exit 3
|
||||
fi
|
||||
|
||||
ProjectL=psap
|
||||
ProjectU=PSAP
|
||||
ProjectL=omc
|
||||
ProjectU=OMC
|
||||
PROJECT=${ProjectL}
|
||||
VERSION=1.2506.2
|
||||
VERSION=1.2508.1
|
||||
RelDate=`date +%Y%m%d`
|
||||
RelVer=${VERSION}-${RelDate}
|
||||
Ky10Arch=ky10.aarch64
|
||||
@@ -355,7 +355,9 @@ case "${pkgtype}" in
|
||||
echo "Finish to make ${pkgtype} package <======"
|
||||
;;
|
||||
psapdeb)
|
||||
ProjectL="psap"
|
||||
ProjectL="omc"
|
||||
ProjectU="OMC"
|
||||
ProjectTag="psap"
|
||||
echo "Begin to make ${pkgtype} package ======>"
|
||||
ReleasePkgDir=${ReleaseDir}/debs/${RelArch}
|
||||
ProcList="restagent"
|
||||
|
||||
@@ -42,7 +42,7 @@ fi
|
||||
# Use a new parameter list
|
||||
set -- "${new_args[@]}"
|
||||
|
||||
rootdir=${HOME}/omc.git
|
||||
rootdir=${HOME}/psap.git
|
||||
m_arg="*"
|
||||
while getopts "m:r:c:d" option; do
|
||||
case $option in
|
||||
|
||||
@@ -1,189 +0,0 @@
|
||||
# file: log file name
|
||||
# level: /trace/debug/info/warn/error/fatal, default: debug
|
||||
# duration: rotation time with xx hours, example: 1/12/24 hours
|
||||
# count: rotation count of log, default is 30 rotation
|
||||
logger:
|
||||
file: /usr/local/omc/log/restagent.log
|
||||
level: warn
|
||||
duration: 24
|
||||
count: 90
|
||||
|
||||
# rest agent listen ipv4/v6 and port, support multiple routines
|
||||
# ip: 0.0.0.0 or ::0, support IPv4/v6
|
||||
# clientAuthType: 0:NoClientCert (default), 1:RequestClientCert, 2:RequireAnyClientCert,
|
||||
# 3:VerifyClientCertIfGiven, 4:RequireAndVerifyClientCerts
|
||||
rest:
|
||||
- ipv4: 0.0.0.0
|
||||
ipv6:
|
||||
port: 33030
|
||||
- ipv4: 0.0.0.0
|
||||
ipv6:
|
||||
port: 33443
|
||||
schema: https
|
||||
clientAuthType: 0
|
||||
caFile: /usr/local/omc/etc/certs/omc-ca.crt
|
||||
certFile: /usr/local/omc/etc/certs/omc-server.crt
|
||||
keyFile: /usr/local/omc/etc/certs/omc-server.key
|
||||
|
||||
webServer:
|
||||
enabled: true
|
||||
rootDir: /usr/local/omc/htdocs/front
|
||||
listen:
|
||||
- addr: :80
|
||||
schema: http
|
||||
- addr: :443
|
||||
schema: https
|
||||
clientAuthType: 0
|
||||
caFile: /usr/local/omc/etc/certs/omc-ca.crt
|
||||
certFile: /usr/local/omc/etc/certs/omc-server.crt
|
||||
keyFile: /usr/local/omc/etc/certs/omc-server.key
|
||||
|
||||
database:
|
||||
type: mysql
|
||||
user: root
|
||||
password: 1000omc@kp!
|
||||
host: 127.0.0.1
|
||||
port: 33066
|
||||
name: psap_db
|
||||
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
|
||||
backup: /usr/local/omc/database
|
||||
|
||||
# Redis data cache
|
||||
redis:
|
||||
dataSource:
|
||||
# OMC system db
|
||||
default:
|
||||
port: 6379 # Redis port
|
||||
host: "127.0.0.1" # Redis host
|
||||
password: "helloearth"
|
||||
db: 10 # Redis db_num
|
||||
# used to specify the default data source for multiple data resourece
|
||||
defaultDataSourceName: "default"
|
||||
|
||||
# sleep: time delay for after write buffer (millisecond)
|
||||
# deadLine: timeout for io read and write (second)
|
||||
mml:
|
||||
sleep: 200
|
||||
deadLine: 10
|
||||
sizeRow: 600
|
||||
sizeCol: 128
|
||||
bufferSize: 65535
|
||||
mmlHome: ./mmlhome
|
||||
|
||||
# Tracking configuration
|
||||
trace:
|
||||
enabled: false
|
||||
host: "172.16.5.100" # Fill in the specific IP address
|
||||
port: 33033
|
||||
|
||||
# NE config
|
||||
ne:
|
||||
user: omcuser
|
||||
etcdir: /usr/local/etc
|
||||
bindir: /usr/local/bin
|
||||
omcdir: /usr/local/omc
|
||||
scpdir: /tmp
|
||||
licensedir: /usr/local/etc/{neType}/license
|
||||
# backup etc list of IMS, does not contain spaces
|
||||
etcListIMS: '{*.yaml,mmtel,vars.cfg}'
|
||||
etcListDefault: '{*.yaml,*.conf,*.cfg}'
|
||||
# true/false to overwrite config file when dpkg ne software
|
||||
dpkgOverwrite: false
|
||||
# dpkg timeout (second)
|
||||
dpkgTimeout: 180
|
||||
|
||||
# chk2ne: true/false, if put OmcNeConfig parameters to NE
|
||||
omc:
|
||||
uriPrefix: "/omc/rest"
|
||||
neType: OMC
|
||||
neId: 001
|
||||
rmUID: 4400HX101
|
||||
neName: OMC
|
||||
province: ""
|
||||
vendor: ""
|
||||
dn: ""
|
||||
chk2ne: false
|
||||
capability: 50
|
||||
sn: "-"
|
||||
expiryDate: "-"
|
||||
checksign: false
|
||||
rootDir: /usr/local/omc
|
||||
binDir: /usr/local/omc/bin
|
||||
backup: /usr/local/omc/backup
|
||||
upload: /usr/local/omc/upload
|
||||
frontUpload: /usr/local/omc/htdocs/front/upload
|
||||
frontTraceDir: /usr/local/omc/htdocs/front/trace
|
||||
software: /usr/local/omc/software
|
||||
license: /usr/local/omc/license
|
||||
gtpUri: gtp:192.168.2.119:32152
|
||||
checkContentType: false
|
||||
testMode: false
|
||||
rbacMode: true
|
||||
runDir: /usr/local/omc/run
|
||||
cmdTimeout: 120
|
||||
|
||||
# Alarm module setting
|
||||
# Forward interface:
|
||||
# TLS Skip verify: true/false
|
||||
# email/sms
|
||||
# smProxy: sms(Short Message Service)/smsc(SMS Centre)
|
||||
# dataCoding: 0:GSM7BIT, 1:ASCII, 2:BINARY8BIT1, 3:LATIN1,
|
||||
# 4:BINARY8BIT2, 6:CYRILLIC, 7:HEBREW, 8:UCS2
|
||||
alarm:
|
||||
alarmEmailForward:
|
||||
enable: true
|
||||
emailList:
|
||||
smtp: mail.smtp.com
|
||||
port: 25
|
||||
user: smtpext@smtp.com
|
||||
password: "1000smtp@omc!"
|
||||
tlsSkipVerify: true
|
||||
alarmSMSForward:
|
||||
enable: true
|
||||
mobileList:
|
||||
smscAddr: "192.168.13.114:2775"
|
||||
systemID: "omc"
|
||||
password: "omc123"
|
||||
systemType: "UTRAN"
|
||||
dataCoding: 0
|
||||
serviceNumber: "OMC"
|
||||
sms:
|
||||
apiURL: http://smsc.xxx.com/
|
||||
accessKeyID: xxxx
|
||||
accessKeySecret: xxxx
|
||||
signName: xxx SMSC
|
||||
templateCode: 1000
|
||||
smProxy: smsc
|
||||
|
||||
# User authorized information
|
||||
# crypt: mysql/md5/bcrypt
|
||||
# token: true/false to check accessToken
|
||||
# expires for session, unit: second
|
||||
# Support single/multiple session of user
|
||||
#
|
||||
auth:
|
||||
crypt: bcrypt
|
||||
token: true
|
||||
expires: 1800
|
||||
session: multiple
|
||||
publicKey: /usr/local/omc/etc/certs/omc
|
||||
privateKey: /usr/local/omc/etc/certs/omc
|
||||
|
||||
# Parameter for limit number
|
||||
# rmuid_maxnum: the max number of rmUID, default: 50
|
||||
# alarmid_maxnum: the max number of AlarmID, default: 50
|
||||
# pmid_maxnum: the max number of pmID, default: 50
|
||||
# subid_maxnum: the max number of subscription ID, default: 20
|
||||
# uri_maxlen: the max length of uri, default: 8192
|
||||
# rmuid_regexp: regexp pattern of rmUID
|
||||
params:
|
||||
rmuidmaxnum: 50
|
||||
alarmidmaxnum: 50
|
||||
pmidmaxnum: 50
|
||||
subidmaxnum: 20
|
||||
urimaxlen: 2100000
|
||||
rmuidregexp: "[0-9]{4}[A-Z]{2}[A-Z]{2}[0-9A-Z]{1}[0-9A-Z]{3}[0-9A-Z]{1,16}"
|
||||
|
||||
testConfig:
|
||||
enabled: false
|
||||
file: /usr/local/omc/etc/testconfig.yaml
|
||||
@@ -1,9 +1,12 @@
|
||||
Package: PSAP
|
||||
Version: 1.2506.2-20250616
|
||||
Package: omc
|
||||
Version: 1.2508.1-YYYYMMDD
|
||||
Section: AGrandTech
|
||||
Prioritt: optional
|
||||
Architecture: amd64
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Maintainer: Simon Zhangsz
|
||||
Depends:
|
||||
Description: psap
|
||||
Description: PSAP Operations Management Center
|
||||
PSAP (Public Safety Answering Point) Operations Management Center
|
||||
provides comprehensive management and monitoring capabilities for
|
||||
emergency communication systems
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ UsrLocalBinDir=/usr/local/bin
|
||||
OmcDaemon=omcd
|
||||
NginxEtcDir=/etc/nginx
|
||||
NginxConfDir=${NginxEtcDir}/conf.d
|
||||
CFileList="restconf.yaml sshsvc.yaml omc.conf"
|
||||
CFileList=$(find ${OMCEtcDir}/default -maxdepth 1 -type f \( -name "*.yaml" -o -name "*.conf" \) -exec basename {} \;)
|
||||
LogoFileList="zh_brand.png zh_icon.png en_brand.png en_icon.png"
|
||||
|
||||
echo ""
|
||||
|
||||
@@ -1,189 +0,0 @@
|
||||
# file: log file name
|
||||
# level: /trace/debug/info/warn/error/fatal, default: debug
|
||||
# duration: rotation time with xx hours, example: 1/12/24 hours
|
||||
# count: rotation count of log, default is 30 rotation
|
||||
logger:
|
||||
file: /usr/local/omc/log/restagent.log
|
||||
level: warn
|
||||
duration: 24
|
||||
count: 90
|
||||
|
||||
# rest agent listen ipv4/v6 and port, support multiple routines
|
||||
# ip: 0.0.0.0 or ::0, support IPv4/v6
|
||||
# clientAuthType: 0:NoClientCert (default), 1:RequestClientCert, 2:RequireAnyClientCert,
|
||||
# 3:VerifyClientCertIfGiven, 4:RequireAndVerifyClientCerts
|
||||
rest:
|
||||
- ipv4: 0.0.0.0
|
||||
ipv6:
|
||||
port: 33030
|
||||
- ipv4: 0.0.0.0
|
||||
ipv6:
|
||||
port: 33443
|
||||
schema: https
|
||||
clientAuthType: 0
|
||||
caFile: /usr/local/omc/etc/certs/omc-ca.crt
|
||||
certFile: /usr/local/omc/etc/certs/omc-server.crt
|
||||
keyFile: /usr/local/omc/etc/certs/omc-server.key
|
||||
|
||||
webServer:
|
||||
enabled: true
|
||||
rootDir: /usr/local/omc/htdocs/front
|
||||
listen:
|
||||
- addr: :80
|
||||
schema: http
|
||||
- addr: :443
|
||||
schema: https
|
||||
clientAuthType: 0
|
||||
caFile: /usr/local/omc/etc/certs/omc-ca.crt
|
||||
certFile: /usr/local/omc/etc/certs/omc-server.crt
|
||||
keyFile: /usr/local/omc/etc/certs/omc-server.key
|
||||
|
||||
database:
|
||||
type: mysql
|
||||
user: root
|
||||
password: 1000omc@kp!
|
||||
host: 127.0.0.1
|
||||
port: 33066
|
||||
name: psap_db
|
||||
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
|
||||
backup: /usr/local/omc/database
|
||||
|
||||
# Redis data cache
|
||||
redis:
|
||||
dataSource:
|
||||
# OMC system db
|
||||
default:
|
||||
port: 6379 # Redis port
|
||||
host: "127.0.0.1" # Redis host
|
||||
password: "helloearth"
|
||||
db: 10 # Redis db_num
|
||||
# used to specify the default data source for multiple data resourece
|
||||
defaultDataSourceName: "default"
|
||||
|
||||
# sleep: time delay for after write buffer (millisecond)
|
||||
# deadLine: timeout for io read and write (second)
|
||||
mml:
|
||||
sleep: 200
|
||||
deadLine: 10
|
||||
sizeRow: 600
|
||||
sizeCol: 128
|
||||
bufferSize: 65535
|
||||
mmlHome: ./mmlhome
|
||||
|
||||
# Tracking configuration
|
||||
trace:
|
||||
enabled: false
|
||||
host: "172.16.5.100" # Fill in the specific IP address
|
||||
port: 33033
|
||||
|
||||
# NE config
|
||||
ne:
|
||||
user: omcuser
|
||||
etcdir: /usr/local/etc
|
||||
bindir: /usr/local/bin
|
||||
omcdir: /usr/local/omc
|
||||
scpdir: /tmp
|
||||
licensedir: /usr/local/etc/{neType}/license
|
||||
# backup etc list of IMS, does not contain spaces
|
||||
etcListIMS: '{*.yaml,mmtel,vars.cfg}'
|
||||
etcListDefault: '{*.yaml,*.conf,*.cfg}'
|
||||
# true/false to overwrite config file when dpkg ne software
|
||||
dpkgOverwrite: false
|
||||
# dpkg timeout (second)
|
||||
dpkgTimeout: 180
|
||||
|
||||
# chk2ne: true/false, if put OmcNeConfig parameters to NE
|
||||
omc:
|
||||
uriPrefix: "/omc/rest"
|
||||
neType: OMC
|
||||
neId: 001
|
||||
rmUID: 4400HX101
|
||||
neName: OMC
|
||||
province: ""
|
||||
vendor: ""
|
||||
dn: ""
|
||||
chk2ne: false
|
||||
capability: 50
|
||||
sn: "-"
|
||||
expiryDate: "-"
|
||||
checksign: false
|
||||
rootDir: /usr/local/omc
|
||||
binDir: /usr/local/omc/bin
|
||||
backup: /usr/local/omc/backup
|
||||
upload: /usr/local/omc/upload
|
||||
frontUpload: /usr/local/omc/htdocs/front/upload
|
||||
frontTraceDir: /usr/local/omc/htdocs/front/trace
|
||||
software: /usr/local/omc/software
|
||||
license: /usr/local/omc/license
|
||||
gtpUri: gtp:192.168.2.119:32152
|
||||
checkContentType: false
|
||||
testMode: false
|
||||
rbacMode: true
|
||||
runDir: /usr/local/omc/run
|
||||
cmdTimeout: 120
|
||||
|
||||
# Alarm module setting
|
||||
# Forward interface:
|
||||
# TLS Skip verify: true/false
|
||||
# email/sms
|
||||
# smProxy: sms(Short Message Service)/smsc(SMS Centre)
|
||||
# dataCoding: 0:GSM7BIT, 1:ASCII, 2:BINARY8BIT1, 3:LATIN1,
|
||||
# 4:BINARY8BIT2, 6:CYRILLIC, 7:HEBREW, 8:UCS2
|
||||
alarm:
|
||||
alarmEmailForward:
|
||||
enable: true
|
||||
emailList:
|
||||
smtp: mail.smtp.com
|
||||
port: 25
|
||||
user: smtpext@smtp.com
|
||||
password: "1000smtp@omc!"
|
||||
tlsSkipVerify: true
|
||||
alarmSMSForward:
|
||||
enable: true
|
||||
mobileList:
|
||||
smscAddr: "192.168.13.114:2775"
|
||||
systemID: "omc"
|
||||
password: "omc123"
|
||||
systemType: "UTRAN"
|
||||
dataCoding: 0
|
||||
serviceNumber: "OMC"
|
||||
sms:
|
||||
apiURL: http://smsc.xxx.com/
|
||||
accessKeyID: xxxx
|
||||
accessKeySecret: xxxx
|
||||
signName: xxx SMSC
|
||||
templateCode: 1000
|
||||
smProxy: smsc
|
||||
|
||||
# User authorized information
|
||||
# crypt: mysql/md5/bcrypt
|
||||
# token: true/false to check accessToken
|
||||
# expires for session, unit: second
|
||||
# Support single/multiple session of user
|
||||
#
|
||||
auth:
|
||||
crypt: bcrypt
|
||||
token: true
|
||||
expires: 1800
|
||||
session: multiple
|
||||
publicKey: /usr/local/omc/etc/certs/omc
|
||||
privateKey: /usr/local/omc/etc/certs/omc
|
||||
|
||||
# Parameter for limit number
|
||||
# rmuid_maxnum: the max number of rmUID, default: 50
|
||||
# alarmid_maxnum: the max number of AlarmID, default: 50
|
||||
# pmid_maxnum: the max number of pmID, default: 50
|
||||
# subid_maxnum: the max number of subscription ID, default: 20
|
||||
# uri_maxlen: the max length of uri, default: 8192
|
||||
# rmuid_regexp: regexp pattern of rmUID
|
||||
params:
|
||||
rmuidmaxnum: 50
|
||||
alarmidmaxnum: 50
|
||||
pmidmaxnum: 50
|
||||
subidmaxnum: 20
|
||||
urimaxlen: 2100000
|
||||
rmuidregexp: "[0-9]{4}[A-Z]{2}[A-Z]{2}[0-9A-Z]{1}[0-9A-Z]{3}[0-9A-Z]{1,16}"
|
||||
|
||||
testConfig:
|
||||
enabled: false
|
||||
file: /usr/local/omc/etc/testconfig.yaml
|
||||
@@ -1,8 +1,11 @@
|
||||
Package: OMC
|
||||
Version: 1.2506.2-YYYYMMDD
|
||||
Package: omc
|
||||
Version: 1.2508.1-YYYYMMDD
|
||||
Section: AGrandTech
|
||||
Prioritt: optional
|
||||
Architecture: amd64
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Maintainer: Simon Zhangsz
|
||||
Depends:
|
||||
Description: OMC
|
||||
Description: PSAP Operations Management Center
|
||||
PSAP (Public Safety Answering Point) Operations Management Center
|
||||
provides comprehensive management and monitoring capabilities for
|
||||
emergency communication systems
|
||||
|
||||
@@ -10,7 +10,7 @@ UsrLocalBinDir=/usr/local/bin
|
||||
OmcDaemon=omcd
|
||||
NginxEtcDir=/etc/nginx
|
||||
NginxConfDir=${NginxEtcDir}/conf.d
|
||||
CFileList="restconf.yaml sshsvc.yaml omc.conf"
|
||||
CFileList=$(find ${OMCEtcDir}/default -maxdepth 1 -type f \( -name "*.yaml" -o -name "*.conf" \) -exec basename {} \;)
|
||||
LogoFileList="zh_brand.png zh_icon.png en_brand.png en_icon.png"
|
||||
|
||||
echo ""
|
||||
|
||||
402
docs/quickstart/01-PSAP OMC 安装指南.md
Normal file
402
docs/quickstart/01-PSAP OMC 安装指南.md
Normal file
@@ -0,0 +1,402 @@
|
||||
# PSAP OMC安装指南
|
||||
|
||||
## 1 安装环境及依赖包
|
||||
|
||||
X86_64通用服务器:
|
||||
|
||||
```
|
||||
计算机或者虚拟机环境(最低配置):CPU: 4, Memory: 8.00 GB, Disk: 500 GB
|
||||
操作系统环境:Ubuntu 22.04
|
||||
数据库环境:mariadb-10.3.38-GA
|
||||
安装包名称格式:psap-r1.2506.1-20250616-ub22-amd64.deb (其中: 'r1.2506.1'为版本号, '20250616'是构建日期, 'ub22'是操作系统, md64'为硬件平台名称)
|
||||
```
|
||||
|
||||
麒麟arm64服务器:
|
||||
|
||||
```
|
||||
计算机或者虚拟机环境(最低配置):CPU: 2, Memory: 8.00 GB, Disk: 200 GB
|
||||
操作系统环境:银河麒麟 kylin server v10
|
||||
数据库环境:mariadb-10.3.35-1.p01.ky10.aarch64
|
||||
WEB服务: nginx 1.16.1-11.p01.ky10.aarch64
|
||||
安装包名称格式:OMC-PSAP16.1.1.arm64.rpm (其中,'PSAP16.1.1'为版本号, 'arm64'为硬件平台名称)
|
||||
```
|
||||
|
||||
注意事项:
|
||||
|
||||
```tips
|
||||
* 以下操作以银河麒麟arm64硬件平台为例
|
||||
* 全新安装方式,数据库的数据会被全部清除
|
||||
```
|
||||
|
||||
### 1.1 安装数据库
|
||||
|
||||
注意:非第一次安装或者全新安装请跳过此步骤
|
||||
|
||||
mariadb版本:mariadb-server-3:10.3.35-1.p01.ky10.aarch64
|
||||
|
||||
软件安装
|
||||
|
||||
银河麒麟OS(CentOS)
|
||||
|
||||
```bash
|
||||
# yum clean all
|
||||
# yum makecache
|
||||
# yum -y update
|
||||
# yum install -y mariadb
|
||||
# yum install -y mariadb-server-3:10.3.35-1.p01.ky10.aarch64
|
||||
```
|
||||
|
||||
配置修改
|
||||
|
||||
修改/etc/my.cnf.d/mariadb-server.cnf
|
||||
增加或者修改如下三行:
|
||||
|
||||
```
|
||||
bind-address=0.0.0.0
|
||||
port=33066
|
||||
max_connections=1000
|
||||
```
|
||||
|
||||
验证测试
|
||||
|
||||
```bash
|
||||
# systemctl enable mariadb
|
||||
# systemctl restart mariadb
|
||||
# systemctl status mariadb
|
||||
```
|
||||
|
||||
正常显示结果如下:
|
||||
|
||||
```bash
|
||||
[root@ems omc]# systemctl status mariadb
|
||||
● mariadb.service - MariaDB 10.3.35 database server
|
||||
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
|
||||
Active: active (running) since Sun 2023-04-30 11:09:56 CST; 7h ago
|
||||
Docs: man:mysqld(8)
|
||||
https://mariadb.com/kb/en/library/systemd/
|
||||
Main PID: 5127 (mysqld)
|
||||
Status: "Taking your SQL requests now..."
|
||||
Tasks: 37
|
||||
Memory: 101.0M
|
||||
CGroup: /system.slice/mariadb.service
|
||||
└─5127 /usr/libexec/mysqld
|
||||
```
|
||||
|
||||
修改mysql数据库root密码:
|
||||
|
||||
```tips
|
||||
!!!注意!!!: 修改后的密码需要更新到/usr/local/omc/etc/restconf.yaml, crontask.yaml和nbi_alarm.json等配置文件中的数据库信息配置项
|
||||
```
|
||||
|
||||
```bash
|
||||
[root@ems ~]# mysql -u root
|
||||
MariaDB [none]> use mysql
|
||||
|
||||
MariaDB [mysql]> update user set password=PASSWORD('******') where User='root';
|
||||
|
||||
MariaDB [mysql]> flush privileges;
|
||||
|
||||
MariaDB [mysql]> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '******'
|
||||
|
||||
MariaDB [mysql]> quit
|
||||
```
|
||||
|
||||
通过以下登录命令确认修改成功
|
||||
|
||||
```
|
||||
[root@ems ~]# mysql -u root -h 192.168.0.229 -P 33066 -p
|
||||
Enter password:
|
||||
Welcome to the MariaDB monitor. Commands end with ; or \g.
|
||||
Your MariaDB connection id is 95
|
||||
Server version: 10.3.35-MariaDB MariaDB Server
|
||||
|
||||
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
|
||||
|
||||
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
|
||||
|
||||
MariaDB [(none)]>
|
||||
|
||||
```
|
||||
|
||||
### 1.2 安装WEB服务(可选)
|
||||
|
||||
注意:非第一次安装或者全新安装请跳过此步骤
|
||||
|
||||
OMC Web服务可通过nginx代理进行访问,也可不需要代理进行访问
|
||||
|
||||
WEB服务: nginx-1.16.1-11.p01.ky10.aarch64
|
||||
|
||||
* 软件安装
|
||||
|
||||
```bash
|
||||
# yum clean all
|
||||
# yum makecache
|
||||
# yum -y update
|
||||
# yum install -y nginx
|
||||
```
|
||||
|
||||
* 验证测试
|
||||
|
||||
```bash
|
||||
# systemctl enable nginx
|
||||
# systemctl daemon-reload
|
||||
# systemctl start nginx
|
||||
# systemctl status nginx
|
||||
● nginx.service - The nginx HTTP and reverse proxy server
|
||||
Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)
|
||||
Active: active (running) since Tue 2023-05-02 20:57:48 CST; 3h 12min ago
|
||||
Main PID: 23163 (nginx)
|
||||
Tasks: 5
|
||||
Memory: 19.3M
|
||||
CGroup: /system.slice/nginx.service
|
||||
├─23163 nginx: master process /usr/sbin/nginx
|
||||
├─23164 nginx: worker process
|
||||
├─23165 nginx: worker process
|
||||
```
|
||||
|
||||
## 2 安装配置OMC
|
||||
|
||||
### 2.1 安装OMC软件包
|
||||
|
||||
安装OMC软件包
|
||||
|
||||
```bash
|
||||
# rpm -ivh OMC\ PSAP16.1.1.arm64.rpm
|
||||
```
|
||||
|
||||
安装后的软件包目录树(实际目录树会随版本不同有变化,以下仅供参考):
|
||||
|
||||
```bash
|
||||
# cd /usr/local
|
||||
# tree omc -L 2
|
||||
omc
|
||||
├── backup
|
||||
├── bin
|
||||
│ ├── cpsshkey.sh
|
||||
│ ├── crontask
|
||||
│ ├── importdb.sh
|
||||
│ ├── nehosts
|
||||
│ ├── omcsvc.sh
|
||||
│ ├── restagent
|
||||
│ └── tables.txt
|
||||
├── database
|
||||
├── etc
|
||||
│ ├── cm
|
||||
│ ├── crontask.yaml
|
||||
│ ├── db
|
||||
│ ├── default
|
||||
│ ├── restconf.yaml
|
||||
│ ├── schema
|
||||
│ └── tasks.yaml
|
||||
├── htdocs
|
||||
│ └── front
|
||||
├── license
|
||||
├── log
|
||||
│ ├── crontask.log -> /usr/local/omc/log/crontask.log-20230629
|
||||
│ ├── crontask.log-20230628
|
||||
│ ├── crontask.log-20230629
|
||||
│ ├── nbi_alarm
|
||||
│ ├── restagent.log -> /usr/local/omc/log/restagent.log-20230629
|
||||
│ ├── restagent.log-20230628
|
||||
│ └── restagent.log-20230629
|
||||
├── software
|
||||
└── upload
|
||||
#
|
||||
```
|
||||
|
||||
### 2.2 修改nginx服务的OMC配置(可选)
|
||||
|
||||
安装软件包成功后可以根据实际环境对nginx的OMC配置进行修改,前端Web的默认侦听端口是8888,除了侦听端口,其它不用修改
|
||||
|
||||
```bash
|
||||
# cd /etc/nginx/conf.d
|
||||
# cat omc.conf
|
||||
server {
|
||||
listen 8888 default_server;
|
||||
root /usr/local/omc/htdocs/front/;
|
||||
index index.html index.htm;
|
||||
server_name localhost;
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 2.3 修改OMC Web前端配置
|
||||
|
||||
根据实际环境修改如下文件的IP地址和端口,端口需要和OMC的配置文件一致, OMC后端ipv4服务侦听端口默认为3030, ipv6的默认侦听端口为6060:
|
||||
|
||||
```bash
|
||||
# sudo sed -i.bak 's/192.168.2.119:/192.168.0.229:/g' /usr/local/omc/htdocs/front/config.js
|
||||
```
|
||||
|
||||
### 2.4 修改OMC后端配置
|
||||
|
||||
说明:
|
||||
|
||||
```tips
|
||||
* 目录/usr/local/omc/etc/default下的文件是OMC程序的初始配置文件,不要修改
|
||||
* 拷贝default目录下的文件至/usr/local/omc/etc目录,根据使用环境修改配置文件
|
||||
```
|
||||
|
||||
```bash
|
||||
# cd /usr/local/omc/etc
|
||||
# cp default/* ../
|
||||
```
|
||||
|
||||
根据实际的运行环境对配置文件restconf.yaml, crontask.yaml, nbi_alarm.json, nbi_agent.json, 4a_agent.yaml及tasks.yaml进行修改, 特别是侦听端口和数据库配置信息(包括端口/用户/密码)
|
||||
|
||||
### 2.5 数据库配置
|
||||
|
||||
注意:第一次或全新安装执行该步骤, 该步骤会清除掉原有的omc数据库
|
||||
|
||||
```bash
|
||||
# /usr/local/omc/bin/importdb.sh install
|
||||
```
|
||||
|
||||
升级安装执行该步骤
|
||||
|
||||
```bash
|
||||
# /usr/local/omc/bin/importdb.sh upgrade
|
||||
```
|
||||
|
||||
### 2.6 防火墙配置
|
||||
|
||||
如果系统默认是打开防火墙,需要添加配置文件中配置的服务和端口(端口要和实际环境配置一致),如下:
|
||||
|
||||
```bash
|
||||
# firewall-cmd --add-port=33066/tcp --permanent
|
||||
# firewall-cmd --add-port=8443/tcp --permanent
|
||||
# firewall-cmd --add-port=8080/tcp --permanent
|
||||
# firewall-cmd --add-port=4443/tcp --permanent
|
||||
# firewall-cmd --add-port=8888/tcp --permanent
|
||||
# firewall-cmd --add-port=3030/tcp --permanent
|
||||
# firewall-cmd --add-port=4040/tcp --permanent
|
||||
# firewall-cmd --add-port=5050/tcp --permanent
|
||||
# firewall-cmd --add-port=6060/tcp --permanent
|
||||
# firewall-cmd --add-port=31232-31271/tcp --permanent
|
||||
# firewall-cmd --add-port=2222/tcp --permanent
|
||||
# firewall-cmd --add-port=6379/tcp --permanent
|
||||
# firewall-cmd --add-port=2152/udp --permanent
|
||||
# firewall-cmd --reload
|
||||
```
|
||||
|
||||
### 2.7 配置被管网元的SSH信任关系
|
||||
|
||||
为了便于OMC管理被管网元(包括登录网元,安装软件,备份配置文件和执行命令等操作), 第一次安装时需要配置被管网元与OMC的SSH信任关系,便于无密码SSH登录:
|
||||
|
||||
* 修改/usr/local/omc/bin目录下的nehosts文件(******替换为明文密码), 根据现网环境增加被管网元的ip, 用户和密码信息列表
|
||||
* 运行脚本cpsshkey.sh, 将公钥拷贝至被管网元
|
||||
* 运行ssh root@192.168.4.133验证是否可以无密码登录
|
||||
* 执行成功后, 为了防止密码泄露,清除掉nehosts文件的密码信息
|
||||
|
||||
```bash
|
||||
[root@ems bin]# cat nehosts
|
||||
# host user password
|
||||
# Example: 192.168.4.133 root password
|
||||
192.168.4.133 root ******
|
||||
192.168.4.134 root ******
|
||||
[root@ems bin]# ./cpsshkey.sh
|
||||
[root@ems bin]# ssh root@192.168.4.133
|
||||
```
|
||||
|
||||
## 3 启动和停止OMC
|
||||
|
||||
### 3.1 系统服务启动
|
||||
|
||||
```bash
|
||||
# systemctl enable restagent.service
|
||||
# systemctl enable crontask.service
|
||||
# systemctl enable sshsvc.service
|
||||
# systemctl enable captrace.service
|
||||
# systemctl daemon-reload
|
||||
```
|
||||
|
||||
执行上述命令后,它被设置为作为 systemd 服务运行。
|
||||
|
||||
### 3.2 手动启动/查询/停止OMC
|
||||
|
||||
您可以按如下方式启动,查询状态,停止和重新启动OMC, 以下命令可通过/usr/local/omc/bin/omcsvc.sh脚本一次性执行:
|
||||
|
||||
```bash
|
||||
# cd /usr/local/omc/bin
|
||||
# ./omcsvc.sh start/stop/restart/status
|
||||
```
|
||||
|
||||
单个OMC进程的执行命令如下, 启动/状态/停止/重启:
|
||||
|
||||
```bash
|
||||
# systemctl start restagent.service
|
||||
# systemctl start crontask.service
|
||||
# systemctl start sshsvc.service
|
||||
# systemctl start captrace.service
|
||||
```
|
||||
|
||||
```bash
|
||||
# systemctl status restagent.service
|
||||
# systemctl status crontask.service
|
||||
# systemctl status sshsvc.service
|
||||
# systemctl status captrace.service
|
||||
```
|
||||
|
||||
```bash
|
||||
# systemctl stop restagent.service
|
||||
# systemctl stop crontask.service
|
||||
# systemctl stop sshsvc.service
|
||||
# systemctl stop captrace.service
|
||||
```
|
||||
|
||||
```bash
|
||||
# systemctl restart restagent.service
|
||||
# systemctl restart crontask.service
|
||||
# systemctl restart sshsvc.service
|
||||
# systemctl restart captrace.service
|
||||
```
|
||||
|
||||
## 4 问题定位跟踪
|
||||
|
||||
OMC restagent程序的配置文件在restagent.yaml,trace级别的日志通常在调试系统时使用,正常运行级别为debug,如下配置项所示:
|
||||
|
||||
```yaml
|
||||
logger:
|
||||
file: /usr/local/omc/log/restagent.log
|
||||
level: debug
|
||||
duration: 24
|
||||
count: 90
|
||||
```
|
||||
|
||||
OMC crontask程序的配置文件在crontask.yaml,trace级别的日志通常在调试系统时使用,正常运行级别为debug,如下配置项所示:
|
||||
|
||||
```yaml
|
||||
logger:
|
||||
file: /usr/local/omc/log/crontask.log
|
||||
level: trace
|
||||
duration: 24
|
||||
count: 90
|
||||
```
|
||||
|
||||
OMC sshsvc程序的配置文件在sshsvc.yaml,日志配置项如下所示:
|
||||
|
||||
```json
|
||||
logger:
|
||||
file: /usr/local/omc/log/sshsvc.log
|
||||
level: debug
|
||||
duration: 24
|
||||
count: 30
|
||||
```
|
||||
|
||||
OMC captrace程序的配置文件在capconf.yaml,日志配置项如下所示:
|
||||
|
||||
```json
|
||||
logger:
|
||||
file: /usr/local/omc/log/captrace.log
|
||||
level: trace
|
||||
duration: 24
|
||||
count: 10
|
||||
```
|
||||
|
||||
## 5 管理核心网系统
|
||||
|
||||
通过浏览器输入:[http://192.168.0.229:8888](http://192.168.0.229:8888) (nginx代理模式)
|
||||
|
||||
或:http://192.168.0.229:8080 (非nginx代理模式)
|
||||
35
docs/reference/msd-data-cn-example.json
Normal file
35
docs/reference/msd-data-cn-example.json
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"控制": {
|
||||
"自动激活": true,
|
||||
"位置可信": true,
|
||||
"测试呼叫": false,
|
||||
"车辆类型": "passengerVehicleCategoryM1"
|
||||
},
|
||||
"消息标识符": 1,
|
||||
"乘员数量": 2,
|
||||
"最近车辆位置N1": {
|
||||
"纬度增量": 0,
|
||||
"经度增量": 10
|
||||
},
|
||||
"最近车辆位置N2": {
|
||||
"纬度增量": 0,
|
||||
"经度增量": 30
|
||||
},
|
||||
"时间戳": 1579992331,
|
||||
"车辆行驶方向": 45,
|
||||
"车辆识别号码": {
|
||||
"世界制造商标识": "ECA",
|
||||
"车辆描述段": "LLEXAM",
|
||||
"车辆标识段年份": "P",
|
||||
"车辆标识段序列工厂": "LE02020"
|
||||
},
|
||||
"车辆位置": {
|
||||
"位置纬度": 187996428,
|
||||
"位置经度": 18859320
|
||||
},
|
||||
"车辆推进存储类型": {
|
||||
"柴油罐存在": false,
|
||||
"电力储能": true,
|
||||
"汽油罐存在": true
|
||||
}
|
||||
}
|
||||
35
docs/reference/msd-data-en-expamle.json
Normal file
35
docs/reference/msd-data-en-expamle.json
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"Control": {
|
||||
"Automatic Activation": true,
|
||||
"Position Can Be Trusted": true,
|
||||
"Test Call": false,
|
||||
"Vehicle Type": "passengerVehicleCategoryM1"
|
||||
},
|
||||
"Message Identifier": 1,
|
||||
"Number Of Occupants": 2,
|
||||
"Recent Vehicle Location N1": {
|
||||
"Latitude Delta": 0,
|
||||
"Longitude Delta": 10
|
||||
},
|
||||
"Recent Vehicle Location N2": {
|
||||
"Latitude Delta": 0,
|
||||
"Longitude Delta": 30
|
||||
},
|
||||
"Timestamp": 1579992331,
|
||||
"Vehicle Direction": 45,
|
||||
"Vehicle Identification Number": {
|
||||
"World Manufacturer Identifier": "ECA",
|
||||
"Vehicle Descriptor Section": "LLEXAM",
|
||||
"Vehicle Identifier Section Year": "P",
|
||||
"Vehicle Identifier Section Serial Factory": "LE02020"
|
||||
},
|
||||
"Vehicle Location": {
|
||||
"Position Latitude": 187996428,
|
||||
"Position Longitude": 18859320
|
||||
},
|
||||
"Vehicle Propulsion Storage Type": {
|
||||
"Diesel Tank Present": false,
|
||||
"Electric Energy Storage": true,
|
||||
"Gasoline Tank Present": true
|
||||
}
|
||||
}
|
||||
35
docs/reference/msd_data.json
Normal file
35
docs/reference/msd_data.json
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"control": {
|
||||
"automaticActivation": true,
|
||||
"positionCanBeTrusted": true,
|
||||
"testCall": false,
|
||||
"vehicleType": "passengerVehicleCategoryM1"
|
||||
},
|
||||
"messageIdentifier": 1,
|
||||
"numberOfOccupants": 2,
|
||||
"recentVehicleLocationN1": {
|
||||
"latitudeDelta": 0,
|
||||
"longitudeDelta": 10
|
||||
},
|
||||
"recentVehicleLocationN2": {
|
||||
"latitudeDelta": 0,
|
||||
"longitudeDelta": 30
|
||||
},
|
||||
"timestamp": 1579992331,
|
||||
"vehicleDirection": 45,
|
||||
"vehicleIdentificationNumber": {
|
||||
"isovds": "LLEXAM",
|
||||
"isovisModelyear": "P",
|
||||
"isovisSeqPlant": "LE02020",
|
||||
"isowmi": "ECA"
|
||||
},
|
||||
"vehicleLocation": {
|
||||
"positionLatitude": 187996428,
|
||||
"positionLongitude": 18859320
|
||||
},
|
||||
"vehiclePropulsionStorageType": {
|
||||
"dieselTankPresent": false,
|
||||
"electricEnergyStorage": true,
|
||||
"gasolineTankPresent": true
|
||||
}
|
||||
}
|
||||
556
docs/reference/msd_详解.txt
Executable file
556
docs/reference/msd_详解.txt
Executable file
@@ -0,0 +1,556 @@
|
||||
A.1 ASN.1 definition of MSD
|
||||
|
||||
This module definition is appropriate for transmission of MSD via Pan-European eCall (via any means ofcommunication, see before)
|
||||
and may be used for transmission of MSD via EN 16102 (Operatingrequirements for third party support).
|
||||
|
||||
|
||||
MSDASN1Module
|
||||
-- Definition of the eCall related MSD message in ASN.1
|
||||
-- Any MSD message will encoded using this scheme, following the
|
||||
-- UPER encoding rules.
|
||||
|
||||
-- The MsD message is defined in CEN standard EN 15722.Comments in this definition are taken from that standard. In
|
||||
-- case of inconsistency in the comment,the text of EN 15722 prevails.
|
||||
|
||||
|
||||
DEFINITIONS
|
||||
AUTOMATIC TAGS ::=
|
||||
BEGIN
|
||||
|
||||
|
||||
-- Version of this ASN.l MD specification
|
||||
-- (inclusion of this element allows software developers to
|
||||
-- automatically read out the current version number from the ASN.1
|
||||
-- compilation for automatic inclusion into the msdVersion parameter
|
||||
-- of the MsD message,i.e. can reduce the chance of using an ASN.1
|
||||
-- description ofone version but saying it is another)
|
||||
|
||||
|
||||
CurrentVersion::INTEGER(3)
|
||||
|
||||
-- ECallMessage is the top level information element
|
||||
-- The ECallMessage structure supports only one message type (msd)
|
||||
-- Extendibility at this level is not allowed, thus ensuring that the
|
||||
-- msdVersion (message format version) can be extracted directly.
|
||||
-- Elements :
|
||||
-- msdVersion: MSD format version
|
||||
-- The format described in this document carries version 3
|
||||
-- msd: Minimum Set Of Data uplink from vehicle
|
||||
|
||||
-- The OCTET STRING(CONTAINING ,..)construct is used to ensure that any
|
||||
-- implementation can extract the msdVersion value from any version,
|
||||
-- without decoding errors.
|
||||
|
||||
|
||||
ECallMessage::SEQUENCEmsdVersionINTEGER {
|
||||
msdVersion INTEGER(0 .. 255),
|
||||
msd OCTET STRING(CONTAINING MMessage)
|
||||
}
|
||||
|
||||
-- The main uplink msd message from the vehicle
|
||||
-- Elements:
|
||||
-- msdStructure: The main MSD strueture
|
||||
-- optionalAdditionalData: Additional data
|
||||
|
||||
|
||||
-- Extendable in future versions at this level e.g. to add extra data
|
||||
--
|
||||
MSDMessage ::= SEQUENCE {
|
||||
msdStructure MSDStructure,
|
||||
optionalAdditionalData AdditionalData OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
-- The main MSD structure, excluding additional data
|
||||
-- Elements:
|
||||
-- messageIdentifier: Message identifier, starting with l for each
|
||||
-- new eCall session and to be incremented with
|
||||
-- every application layer MSD retransmission
|
||||
-- control: see ControlType
|
||||
-- vehicleIdentificationNumber: see VIN
|
||||
-- vehiclePropulsionStorageType: see VehiclePropulsionStorageType
|
||||
-- timestamp: Timestamp of incident event
|
||||
-- As seconds elapsed since midnight January lst,1970 UTC
|
||||
-- Failure value for time stamp set to "0"
|
||||
-- vehicleLocation: see VehicleLocation
|
||||
-- vehicleDirection: Direction of travel
|
||||
-- in 2 degrees steps from either magnetic or
|
||||
-- geographical north(0-358,clockwise)
|
||||
-- If direction of travel is invalid or unknown
|
||||
-- the value 255 shall be used
|
||||
-- Only values from 0 to 179 and 255 are valid
|
||||
-- recentVehiclelocationNl: location delta with respect to vehicleLocation
|
||||
-- recentVehicleLocationN2: location delta with respect to recentVehicleLocationN1, see VehicleLocationDelta
|
||||
-- numberOfOccupants: Number of occupants in the vehicle according to available information.
|
||||
-- If no information about the number of occupants is available,this parameter needs to be omitted or set to 255.
|
||||
|
||||
MSDStructure ::= SEQUENCE {
|
||||
messageldentifier INTEGER(0 .. 255)
|
||||
control ControlType,
|
||||
vehicleldentificationNumber VIN,
|
||||
vehiclePropulsionStorageType VehiclePropulsionstorageType,
|
||||
timestamp INTEGER(0 .. 4294967295)
|
||||
vehicleLocation VehicleLocation,
|
||||
vehicleDirection INTEGER(0 .. 179 | 255)
|
||||
recentVehicleLocationN1 VehicleLocationDelta,
|
||||
recentVehicleLocationN2 VehicleLocationDelta,
|
||||
numberOfOccupants INTEGER(0 .. 255) OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
-- The ControlType is a collection of the following elements:
|
||||
-- Elements:
|
||||
automaticActivation: true = Automatic activation,
|
||||
false = Manual activation
|
||||
-- testCall: true = Test call,false=Emergency
|
||||
-- positionCanBeTrusted: true = Position can be trusted,
|
||||
false = low confidence in position
|
||||
-- NOTE "Low confidence in position"
|
||||
shall mean that there is less than 95%
|
||||
confidence that exact position is within the limits of a radius of +150m(-150m)
|
||||
of reported position
|
||||
-- vehicleType : see VehicleType
|
||||
|
||||
|
||||
ControlType ::= SEQUENCE {
|
||||
automaticAetivation BOOLEAN,
|
||||
testCal1 BOOLEAN,
|
||||
positionCanBeTrusted BOOLEAN,
|
||||
vehicleType VehicleType
|
||||
}
|
||||
|
||||
-- Definition of the vehicle type reporting the incident.
|
||||
-- NOTE: Vehicle definitions category M,N according directive 2007/46/EC;
|
||||
category l according directive 2002/24/EC,other categories
|
||||
according tO UNECE UNECE TRANS/WP.29/78/Rev.4(2016) World Forum for
|
||||
Harmonization of Vehicle Regulations; Consolidated Resolution on the Construction of Vehicles(R.E.3)
|
||||
|
||||
-- NOTE: The normal encoding of the MSD is ASN. 1 UPER in which case the
|
||||
numerical values specified below are ignored
|
||||
|
||||
-- Extendable in future versions for new vehicle types. Implementations should anticipate on receiving an unknown value.
|
||||
|
||||
VehicleType ::= ENUMERATED {
|
||||
passengerVehicleCategoryM1 (1),
|
||||
busesAndCoachesCategoryM2 (2),
|
||||
busesAndCoachesCategoryM3 (3),
|
||||
lightCommercialVehiclesN1 (4),
|
||||
heavyDutyVehiclesCategoryN2 (5),
|
||||
heavyDutyVehiclesCategoryN3 (6),
|
||||
motorcyclesCategoryL1e (7),
|
||||
motorcyclesCategoryL2e (8),
|
||||
motorcyclesCategoryL3e (9),
|
||||
motorcyclesCategoryL4e (10),
|
||||
motorcyclesCategoryL5e (11),
|
||||
motorcyclesCategoryL6e (12),
|
||||
motorcyclesCategoryL7e (13),
|
||||
trailersCategory0 (14),
|
||||
agriVehiclesCategoryR (15),
|
||||
agriVehiclesCategoryS (16),
|
||||
agriVehiclesCategoryT (17),
|
||||
offRoadVehiclesCategoryG (18),
|
||||
specialPurposeMotorCaravanCategorySA (19),
|
||||
specialPurposeArmouredVehicleCategorysB(20),
|
||||
specialPurposeAmbulanceCategorySC (21),
|
||||
specialPurposeHearseCategorySD (22),
|
||||
otherVehicleCategory(23),
|
||||
...
|
||||
}
|
||||
|
||||
-- VIN ( vehicle identification number ) according ISO 3779
|
||||
-- isowmi: World Manufacturer Index (WMI)
|
||||
-- isovds: Vehicle Type Descriptor(VDS)
|
||||
-- Vehicle Identifier Section (VIS) consisting of
|
||||
-- isovisModelyear: Modelyear from Vehicle Identifier Section (VIS)
|
||||
-- isovisSeqPlant: Plant code + sequential number from Vehicle Identifier Section (VIS)
|
||||
|
||||
|
||||
VIN ::= SEQUENCE {
|
||||
isowmi PrintableString(SIZE(3))
|
||||
(FROM("A".."H"|"J".."N"|"P"|"R".."Z"|"0".."9")),
|
||||
isovds PrintableString(SIZE(6))
|
||||
(FROM("A".."H"|"J".."N"|"P"|"R".."Z"|"0".."9")),
|
||||
isovisModelyear PrintableString(SIZE(1))
|
||||
(FROM("A".."H"|"J".."N"|"P"|"R".."Z"|"0".."9")),
|
||||
isovisSeqPlant PrintableString(SIZE(7))
|
||||
(FROM("A".."H"|"J".."N"|"P"I"R".."Z"|"0".."9"))
|
||||
}
|
||||
|
||||
-- VehiclePropulsionStorageType is a collection of elements
|
||||
-- that contain information about the presence of propulsion
|
||||
-- storage inside the vehicle sending the MSD.
|
||||
--
|
||||
-- For each storage type the following coding applies:
|
||||
-- false = indicates a type of storage not present
|
||||
-- true = indicates type of storage which is present
|
||||
-- The following storage types are supported:
|
||||
-- Gasoline tank
|
||||
-- Diesel tank
|
||||
-- Compressed natural gas (CNG)
|
||||
-- Liquid propane gas(LPG)
|
||||
-- Electric energy storage (vehicle has electric propulsion and associated batteries)
|
||||
-- Hydrogen storage
|
||||
-- other storage
|
||||
-- If the type of energy storage is unknown, then all elements
|
||||
-- shall be set to false.
|
||||
-- Extendible in future versions for new fuel storage types
|
||||
|
||||
|
||||
VehiclePropulsionStorageType ::= SEQUENCE {
|
||||
gasolineTankPresent BOOLEAN DEFAULT FALSE,
|
||||
dieselTankPresent BOOLEAN DEFAULT FALSE,
|
||||
compressedNaturalGas BOOLEAN DEFAULT FALSE,
|
||||
liquidPropaneGas BOOLEAN DEFAULT FALSE,
|
||||
electricEnergyStorage BOOLEAN DEFAULT FALSE,
|
||||
hydrogenStorage BOOLEAN DEFAULT FALSE,
|
||||
otherStorage BOOLEAN DEFAULT FALSE,
|
||||
...
|
||||
}
|
||||
|
||||
-- VehicleLocation:
|
||||
-- The current location of the vehicle
|
||||
-- Elements:
|
||||
-- Position latitude (WGS84) in milliarcsec
|
||||
-- Position longitude (WGS84) in milliarcsec
|
||||
-- 32 bits (4 octets) allocated to make signed value handling easier
|
||||
--
|
||||
-- If latitude and/or longitude is invalid or unknown,
|
||||
-- the representation of value 2147483647 shall be transmitted.
|
||||
|
||||
VehicleLocation ::= SEQUENCE {
|
||||
-- Actual valid value range (-324000000 to 324000000)
|
||||
positionLatitude INTEGER(-2147483648..2147483647),
|
||||
-- Actual valid value range(-648000000 to 648000000)
|
||||
positionLongitude INTEGER(-2147483648..2147483647)
|
||||
}
|
||||
|
||||
-- VehicleLocationDelta:
|
||||
-- Description of (the delta of) a recent vehicle location
|
||||
-- before the incident
|
||||
|
||||
-- Latitude Delta (+ for North and - for South)
|
||||
-- Longitude Delta(+ for East and - for West)
|
||||
-- both with respect to a previous location.
|
||||
-- 1 Unit = 100 miliarcseconds, which is approximately 3m
|
||||
|
||||
VehicleLocationDelta ::= SEQUENCE {
|
||||
latitudeDelta INTEGER(-512..511),
|
||||
longitudeDelta INTEGER(-512..511)
|
||||
}
|
||||
|
||||
-- AdditionalData:
|
||||
-- Further additional bytes of data encoded as in a
|
||||
-- seperate ASN.1 definition
|
||||
|
||||
-- Elements:
|
||||
-- oid: Object identifier which uniquely identifies the format
|
||||
and meaning of the data which follows.
|
||||
-- data:Transparent optional additional data,
|
||||
according to the format referenced by the oid
|
||||
The user must ensure that the size of this element
|
||||
is restricted to ensure that the total ECallMessage is
|
||||
small enough for the relevant transmission medium.
|
||||
|
||||
|
||||
AdditionalData ::= SEQUENCE {
|
||||
oid RELATIVE-OID,
|
||||
data OCTET STRING
|
||||
}
|
||||
|
||||
|
||||
-- Several of the elements above are "extendable"
|
||||
-- according to the ASN.1 standard to facilitate future extensions
|
||||
-- whilst also maintaining backwards compatibility. Implementations must provision for such extensions
|
||||
|
||||
END
|
||||
|
||||
A.2 Syntax check of ASN.1 definition of MSD
|
||||
|
||||
ASN.1 Studio Version 9.0
|
||||
Copyright (C) 2018 OSS Nokalva,Inc. All rights reserved.
|
||||
This product is licensed for use by "Cheiron IT bv,Leiden,Holland - Standards Editor",
|
||||
License "66410E", only for project "CEN TC278 WG15 related standards work"
|
||||
|
||||
ASN.1 syntax check result: cO043I: 0 error messages, 0 warning messages and 0 informatory messages issued.
|
||||
|
||||
MSDv3: Compilation summary: The project MSDv3 includes 3 PDUs and 0 ASN.1 values.
|
||||
|
||||
A.3 Examples of ASN.1 encoded MSD
|
||||
The example below is shown in ASN.1 value encoding(plain text):
|
||||
value ECallMessage ::=
|
||||
{
|
||||
msdVersion 3,
|
||||
msd
|
||||
CONTAINING
|
||||
{
|
||||
msdStructure
|
||||
{
|
||||
messageIdentifier 1,
|
||||
control
|
||||
{
|
||||
automaticActivation TRUE,
|
||||
testCall FALSE,
|
||||
positionCanBeTrusted TRUE,
|
||||
vehicleType passengerVehicleCategoryM1
|
||||
},
|
||||
vehicleIdentificationNumber
|
||||
{
|
||||
isowmi "ECA",
|
||||
isovds "LLEXAM",
|
||||
isovisModelyear "P",
|
||||
isovisSeqPlant "LE02020"
|
||||
},
|
||||
vehiclePropulsionStorageType
|
||||
{
|
||||
|
||||
gasolineTankPresent TRUE,
|
||||
electricEnergyStorage TRUE
|
||||
},
|
||||
timestamp 1579992331,
|
||||
vehicleLocation
|
||||
{
|
||||
positionLatitude 187996428,
|
||||
positionLongitude 18859320
|
||||
},
|
||||
vehicleDirection 45,
|
||||
recentVehicleLocationN1
|
||||
{
|
||||
latitudeDelta 0,
|
||||
longitudeDelta 10
|
||||
},
|
||||
recentVehicleLocationN2
|
||||
{
|
||||
latitudeDelta 0,
|
||||
longitudeDelta 30
|
||||
},
|
||||
numberOfOccupants 2
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
msdVersion 3,
|
||||
msd
|
||||
CONTAINING
|
||||
{
|
||||
msdStructure
|
||||
{
|
||||
messageIdentifier 1,
|
||||
control
|
||||
{
|
||||
automaticActivation TRUE,
|
||||
testCall FALSE,
|
||||
positionCanBeTrusted TRUE,
|
||||
vehicleType passengerVehicleCategoryM1
|
||||
},
|
||||
vehicleIdentificationNumber
|
||||
{
|
||||
isowmi "ECA",
|
||||
isovds "LLEXAM",
|
||||
isovisModelyear "P",
|
||||
isovisSeqPlant "LE02020"
|
||||
},
|
||||
vehiclePropulsionStorageType
|
||||
{
|
||||
gasolineTankPresent TRUE,
|
||||
electricEnergyStorage TRUE
|
||||
},
|
||||
timestamp 1579992331,
|
||||
vehicleLocation
|
||||
{
|
||||
positionLatitude 187996428,
|
||||
positionLongitude 18859320
|
||||
},
|
||||
vehicleDirection 45,
|
||||
recentVehicleLocationN1
|
||||
{
|
||||
latitudeDelta 0,
|
||||
longitudeDelta 10
|
||||
},
|
||||
recentVehicleLocationN2
|
||||
{
|
||||
latitudeDelta 0,
|
||||
longitudeDelta 30
|
||||
},
|
||||
numberOfOccupants 2
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
The same example encoded in UPER (hexadecimal representation,38 bytes):
|
||||
0324101A 01C614A2873C52AB A870010010089AF166285C59 A4C86408 FE29C16C 01054010 F010
|
||||
|
||||
Annex B
|
||||
(informative)
|
||||
|
||||
ASN.1 Data representation PER and BER explained
|
||||
|
||||
B.1 What is ASN.1
|
||||
NOTE This introduction was inspired by the information found in http://www.w3.org/Protocols/HTTP-NG/asn1.html.Definitions,examples and encoding traces were created using OSS Nokalva ASN.1 Studio.
|
||||
ASN.1 is a notation for describing data structures;it is very much like a type declaration in Cor C++.
|
||||
One of the key components of ASN.1 are Procotol Data Units (PDUs).Let's take a look at the ASN.1 definition for the MSD.
|
||||
It contains the PDU ECallMessage',which is defined like so:
|
||||
|
||||
ECallMessage ::=SEQUENCE {
|
||||
msdVersion INTEGER(0 .. 255),
|
||||
msd MSDMessage
|
||||
}
|
||||
|
||||
This defines EcallMessage as an object with two members:
|
||||
-- msdVersion, which content is an integer value between 0 and 255,and msd,which is a complex object of type MSDMessage,defined later on
|
||||
Hence ASN.1 offers means of defining the type (i.e.INTEGER), the range (i.e.0.255) and more complex constructions.
|
||||
Further down the definition one can find additional functionality that ASN.1 had to offer:
|
||||
-- optional element: some elements can be declared optional, and thus be left out of a data encoding(see MSDStructure.recentVehicleLocationN1);
|
||||
-- enumeration: an element can contain enumerated data, in such a way that the encoding is very efficient without losing content (see VehicleType);
|
||||
—- strict range checking: not only ranges like 0 .. 255 are possible,but combined ranges as well(see VIN)
|
||||
|
||||
The ASN.1 definition is used to encode and decode data content.Several encoding rules exist,among which:
|
||||
-- Basic Encoding Rules (BER):the original rules for taking an ASN.1 data type, and turning it into a sequence of bits and bytes;
|
||||
-- Packed Encoding Rules (PER): instead of using a generic style of encoding that encodes all types in a
|
||||
uniform way,the PER specialise the encoding based on the data type to generate much more compact representations;
|
||||
|
||||
-- XML Encoding Rules (XER):an encoding using XML
|
||||
|
||||
|
||||
B.2 Encoding data using ASN.1
|
||||
The main purpose of any ASN.1 definition is to encode and decode data. This paragraph describes some of the basic procedures.
|
||||
|
||||
|
||||
The Basic Encoding Rules (BER) were the original rules for taking an ASN.1 data type,
|
||||
and turning it into a sequence of bits and bytes.BER uses a form of encoding commonly known as Tag-Length-Value.
|
||||
Each item is encoded as a tag,indicating what type it is,a length indicating the size of the object,and a value,
|
||||
which contains the actual contents of the object.
|
||||
|
||||
Tags are reasonably simple-in there simplest form they consist of a single byte;
|
||||
the highest two bits indicate the tag class:whether the tag is an official ISO tag,
|
||||
an application wide tag,a private tag,or a tag that only has meaning for this particular structure.
|
||||
The next bit is a flag to indicate whether the tagged object is a simple type,such as a number or a string,
|
||||
or a compound type made up from a bunch of other types.The remaining 5 bits are used to represent the tag number.
|
||||
If the tag is too big to fit in 5 bits,then these bits are set to all ones,
|
||||
and the tag number is encoded in the following bytes as a sequence of seven bit bytes.
|
||||
The high bit of these bytes is used as a flag to indicate whether there's more tag available.
|
||||
|
||||
|
||||
Lengths are also quite simple.There are two ways of encoding lengths - the definite form, and the indefinite form.
|
||||
For the definite form, if the length is less than 128, you just use a single byte,with the high bit set to zero.
|
||||
Otherwise the high bit is set to one,and the low seven bits set to the length of length.
|
||||
The length is then encoded in that many bytes.The indefinite form is encoded by sending a length field with a length of length of O-i.e.[1000|0000].
|
||||
The objectis ended by sending two zero bytes.
|
||||
|
||||
|
||||
DER is a restricted variant of BER for producing unequivocal transfer syntax for data structures described by ASN.1.
|
||||
DER is the same thing as BER with allbut one sender's options removed.It provides for exactly one way to encode an ASN.1 value.
|
||||
DER is intended for situations when a unique encodingis needed,such as in cryptography,
|
||||
and ensures that a data structure that needs to be digitally signed produces a unique serialized representation.
|
||||
DER can be considered a canonical form of BER. For example, in BER a Boolean value of true can be encoded as any of 255 non-zero byte values,
|
||||
while in DER there is only one way to encode a Boolean value of true.
|
||||
|
||||
The most significant DER encoding constraints are:
|
||||
-Length encoding shall use the definite form. Additionally,the shortest possible length encoding shall be used.
|
||||
-Bitstring,octetstring,and restricted character strings shall use the primitive encoding
|
||||
—Elements of a Set are encoded in sorted order,based on their tag value.
|
||||
|
||||
|
||||
The packed encoding rules use a different style of encoding.Instead of using a generic style of encoding that encodes all types in a uniform way,
|
||||
the PER specialise the encoding based on the data type to generate much more compact representations.
|
||||
Packed encoding rules have particular value for messages of known data structure (such as the MSD)
|
||||
|
||||
PER only generates tags when they are needed to prevent ambiguity this only occurs when ASN.1's version of union (CHOICE) is used.
|
||||
PER also only generates lengths when the size of an object can vary. Even then,PER tries to represent the lengths in the most compact form possible.
|
||||
The presence of optional elements in a sequence is indicated by a list of single bit flags placed at the start of a sequence-if the bit is set,then the option is present.
|
||||
PER encodings are not always aligned on byte boundaries-if the'aligned'variant of the rules is used,then strings *will*be aligned.
|
||||
The unaligned variant(UPER)treats the encoding as a string of bits, allowing things like booleans and small integers to be squished together in one byte.
|
||||
|
||||
Data can obviously also be encoded into an XML representation. Apart from XER,the 'basic XML encoding', one can choose to use the Canonical or the Extended XML encoding rules (CXER or EXER).
|
||||
|
||||
|
||||
B.3 Examples
|
||||
|
||||
This paragraph shows in depth examples using ASN.1 encoding rules.For clarity a basic example(source: https://en.wikipedia.org/wiki/ASN.1) is used,examples of MSD encodings are found elsewhere.
|
||||
|
||||
|
||||
The examples in this appendix will use the following definition:
|
||||
FooProtocol
|
||||
|
||||
DEFINITIONS::=BEGIN
|
||||
FooQuestion ::=SEQUENCE {
|
||||
trackingNumber INTEGER,
|
||||
question PrintableString
|
||||
}
|
||||
FooAnswer ::=SEQUENCE {
|
||||
questionNumber INTEGER,
|
||||
answer BOOLEAN
|
||||
}
|
||||
END
|
||||
|
||||
This definition gives us two PDU's:FooQuestion and FooAnswer. We'll create an instance of both:
|
||||
myQuestion FooQuestion ::= {
|
||||
trackingNumber 5,
|
||||
question "Anybody there?"
|
||||
}
|
||||
|
||||
theirAnswer FoOAnswer ::= {
|
||||
questionNumber 5,
|
||||
answer TRUE
|
||||
}
|
||||
|
||||
In the remainder we will find out how these are encoded using the different encoding rulesets.
|
||||
myQuestion encoded using DER or BER(definite length)gives the following hexadecimal representation:
|
||||
|
||||
30 13 02 01 05 13 0E 41 6E 79 62 6F 64 79 20 74 68 65 72 65 3F
|
||||
30 SEQUENCE
|
||||
13 of length .13 (19) bytes, containing
|
||||
02 INTEGER (type .02 (2))
|
||||
01 of length .01 (1) byte, containing
|
||||
05 value .05 (5)
|
||||
13 PrintableString(type .13 (19))
|
||||
OE of length .0E (14) bytes, containing
|
||||
41 character .41 (65,"A")
|
||||
6E character .6E (110,"n")
|
||||
79 character .79 (121,"y")
|
||||
62 character .62 (98,"b")
|
||||
...
|
||||
65 character .65 (101,"3")
|
||||
3F character .3F (63,"!")
|
||||
Using BER with indefinite length,the coding is slightly different:
|
||||
30 80 02 01 05 13 0E 41 6E 79 62 6F 64 79 20 74 68 65 72 65 3F 00 00
|
||||
Where.80 represents the indefinite length,and the encoded message is terminated by'.00.00'.
|
||||
|
||||
|
||||
If myQuestion is encoded using(aligned)PER the result differs 'drastically':
|
||||
01 05 0E 41 6E 79 62 6F 64 79 20 74 68 65 72 65 3F
|
||||
|
||||
The difference is caused by not including information about the data structure in the encoded content.
|
||||
As a result the encoding is 4 bytes less than when using BER encoding.
|
||||
To decode,one needs the encoding definition,to be able to decode like this:
|
||||
--TYPE INFORMATION: SEQUENCE
|
||||
--TYPE INFORMATION: INTEGER
|
||||
01 First byte: length = .01, 1 byte
|
||||
05 Value bytes (1 byte): .05 (5)
|
||||
--TYPE INFORMATION: PrintableString
|
||||
OE First byte: length= .0E, 14 bytes
|
||||
... Value bytes (14 bytes) =.41.6E.79.62.6F.64.79.20.74.68.65.72.65.3F
|
||||
The information in the bold lines is taken from the encoding schema.
|
||||
|
||||
Using unaligned PER(UPER) the encoded data gets changed completely and the result is 1 byte less than the aligned version:
|
||||
01050E 83 BB CE 2D F93C A0 E9 A32F 2C AF C0
|
||||
The difference is caused by the fact that a elements ofa PrintableString are made up from 7 bit characters and
|
||||
these are now no longer aligned on an 8-bit boundary by prepadding the bits with a 0.
|
||||
This table shows the different encoding of the beginning of the string"Are":
|
||||
.41 .6E .79 .62 result
|
||||
PER encoding 01000001 01101110 01111001 01100010 01000001011011100111100101100010
|
||||
UPER encoding 1000001 1101110 1111001 1100010 1000001110111011110011100010 83 BB CE
|
||||
|
||||
The number of bytes spared by using UPER is depending on how strict the schema is made and what data types are used.
|
||||
|
||||
When the XML Encoding Rules are used a rather simple XML representation can be created:
|
||||
<?xml version="1.0"encoding="UTF-8"?>
|
||||
<FooQuestion>
|
||||
<trackingNumber>5</trackingNumber>
|
||||
<question>Anybody there?</question>
|
||||
</FooQuestion>
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
Name: %{project_lname}
|
||||
Summary: 5GC OMC
|
||||
Version: 1.2506.2
|
||||
Version: 1.2508.1
|
||||
Release: %{release_date}
|
||||
Vendor: omc
|
||||
URL: https://www.omc.com/
|
||||
|
||||
Reference in New Issue
Block a user