Export translations
Views
Special page
From OpenSCADAWiki
Jump to:
navigation
,
search
Settings
Group
About
Documents
Documents/API
Documents/DAQ
Documents/FAQ
Documents/How to
Documents/How to/Build from source
Documents/How to/Crash report
Documents/How to/Create module
Documents/How to/Create multi language project
Documents/How to/Cyclic programming
Documents/How to/Debug
Documents/How to/Install
Documents/How to/Live disk
Documents/How to/Release
Documents/How to/Transferring project configuration
Documents/How to/Violations, alarms and notifications
Documents/Program manual
Documents/Quick start
Documents/Release 0.8.0
Documents/Release 0.8.0/Update10
Documents/Release 0.8.0/Update11
Documents/Release 0.8.0/Update12
Documents/Release 0.8.0/Update13
Documents/Release 0.8.0/Update14
Documents/Release 0.8.0/Update15
Documents/Release 0.8.0/Update16
Documents/Release 0.8.0/Update17
Documents/Release 0.8.0/Update18
Documents/Release 0.8.0/Update19
Documents/Release 0.8.0/Update20
Documents/Release 0.8.0/Update3
Documents/Release 0.8.0/Update4
Documents/Release 0.8.0/Update5
Documents/Release 0.8.0/Update6
Documents/Release 0.8.0/Update7
Documents/Release 0.8.0/Update8
Documents/Release 0.8.0/Update9
Documents/Release 0.9
Documents/Release 0.9/Update 7
Documents/Release 0.9/Update1
Documents/Release 0.9/Update2
Documents/Release 0.9/Update3
Documents/Release 0.9/Update4
Documents/Release 0.9/Update5
Documents/Release 0.9/Update6
Documents/Release 0.9/Updating 0.8.0 LTS
Documents/Terms
Documents/User API
Functions and demands
Home
Libs
Libs/Devices
Libs/Documents
Libs/Electrical elements
Libs/Generic list
Libs/LowLevelDevices
Libs/Main
Libs/Main graphical elements
Libs/Mnemo elements
Libs/Prescriptions
Libs/Regulation elements
Libs/Service procedures
Libs/Technological apparatuses
Modules
Modules/BFN
Modules/BlockCalc
Modules/Comedi
Modules/DAQGate
Modules/DBArch
Modules/DBF
Modules/DBGate
Modules/DCON
Modules/DiamondBoards
Modules/FireBird
Modules/FLibComplex1
Modules/FLibMath
Modules/FLibSYS
Modules/FSArch
Modules/GPIO
Modules/HTTP
Modules/ICP DAS
Modules/JavaLikeCalc
Modules/LDAP
Modules/LogicLev
Modules/ModBus
Modules/MySQL
Modules/OPC UA
Modules/PostgreSQL
Modules/QTCfg
Modules/QTStarter
Modules/SelfSystem
Modules/Serial
Modules/Siemens
Modules/SMH2Gi
Modules/SNMP
Modules/Sockets
Modules/SoundCard
Modules/SQLite
Modules/SSL
Modules/System
Modules/SystemTests
Modules/UserProtocol
Modules/VCAEngine
Modules/Vision
Modules/WebCfg
Modules/WebCfgD
Modules/WebUser
Modules/WebVision
Sub-projects
Sub-projects/Automatic Builder of OpenSCADA
Sub-projects/Automation Linux distributive
Sub-projects/Embedding and PLC
Sub-projects/Server
Sub-projects/VCA
User:RomanSavochenko
Using
Using/HouseSpirit
Using/Kramatorsk Ball Mills
Using/Kramatorsk Water
Using/Model AGLKS
Using/Model Boiler
Using/OpenWrt TELEOFIS RTU968
Using/Yaroslavskij broiler
Works
Works/Road map
Works/Technical Support
Works/Technical Support/Agreement
Works/To do
Language
aa - Afar
ab - Abkhazian
ace - Achinese
ady - Adyghe
ady-cyrl - адыгабзэ
aeb - Tunisian Arabic
aeb-arab - تونسي
aeb-latn - Tûnsî
af - Afrikaans
ak - Akan
aln - Gheg Albanian
am - Amharic
an - Aragonese
ang - Old English
anp - Angika
ar - Arabic
arc - Aramaic
arn - Mapuche
arq - Algerian Arabic
ary - Moroccan Arabic
arz - Egyptian Arabic
as - Assamese
ase - American Sign Language
ast - Asturian
av - Avaric
avk - Kotava
awa - Awadhi
ay - Aymara
az - Azerbaijani
azb - تۆرکجه
ba - Bashkir
bar - Bavarian
bbc - Batak Toba
bbc-latn - Batak Toba
bcc - Southern Balochi
bcl - Bikol Central
be - Belarusian
be-tarask - Belarusian (Taraškievica orthography)
bg - Bulgarian
bgn - Western Balochi
bho - Bhojpuri
bi - Bislama
bjn - Banjar
bm - Bambara
bn - Bengali
bo - Tibetan
bpy - Bishnupriya
bqi - Bakhtiari
br - Breton
brh - Brahui
bs - Bosnian
bto - Iriga Bicolano
bug - Buginese
bxr - буряад
ca - Catalan
cbk-zam - Chavacano de Zamboanga
cdo - Min Dong Chinese
ce - Chechen
ceb - Cebuano
ch - Chamorro
cho - Choctaw
chr - Cherokee
chy - Cheyenne
ckb - Central Kurdish
co - Corsican
cps - Capiznon
cr - Cree
crh - Crimean Turkish
crh-cyrl - Crimean Turkish (Cyrillic script)
crh-latn - Crimean Turkish (Latin script)
cs - Czech
csb - Kashubian
cu - Church Slavic
cv - Chuvash
cy - Welsh
da - Danish
de - German
de-at - Austrian German
de-ch - Swiss High German
de-formal - German (formal address)
diq - Zazaki
dsb - Lower Sorbian
dtp - Central Dusun
dty - डोटेली
dv - Divehi
dz - Dzongkha
ee - Ewe
egl - Emilian
el - Greek
eml - Emiliano-Romagnolo
en - English
en-ca - Canadian English
en-gb - British English
eo - Esperanto
es - Spanish
et - Estonian
eu - Basque
ext - Extremaduran
fa - Persian
ff - Fulah
fi - Finnish
fit - Tornedalen Finnish
fj - Fijian
fo - Faroese
fr - French
frc - Cajun French
frp - Arpitan
frr - Northern Frisian
fur - Friulian
fy - Western Frisian
ga - Irish
gag - Gagauz
gan - Gan Chinese
gan-hans - Simplified Gan script
gan-hant - Traditional Gan script
gd - Scottish Gaelic
gl - Galician
glk - Gilaki
gn - Guarani
gom - Goan Konkani
gom-deva - Goan Konkani (Devanagari script)
gom-latn - Goan Konkani (Latin script)
got - Gothic
grc - Ancient Greek
gsw - Swiss German
gu - Gujarati
gv - Manx
ha - Hausa
hak - Hakka Chinese
haw - Hawaiian
he - Hebrew
hi - Hindi
hif - Fiji Hindi
hif-latn - Fiji Hindi (Latin script)
hil - Hiligaynon
ho - Hiri Motu
hr - Croatian
hrx - Hunsrik
hsb - Upper Sorbian
ht - Haitian Creole
hu - Hungarian
hy - Armenian
hz - Herero
ia - Interlingua
id - Indonesian
ie - Interlingue
ig - Igbo
ii - Sichuan Yi
ik - Inupiaq
ike-cans - Eastern Canadian (Aboriginal syllabics)
ike-latn - Eastern Canadian (Latin script)
ilo - Iloko
inh - Ingush
io - Ido
is - Icelandic
it - Italian
iu - Inuktitut
ja - Japanese
jam - Jamaican Creole English
jbo - Lojban
jut - Jutish
jv - Javanese
ka - Georgian
kaa - Kara-Kalpak
kab - Kabyle
kbd - Kabardian
kbd-cyrl - Адыгэбзэ
kg - Kongo
khw - Khowar
ki - Kikuyu
kiu - Kirmanjki
kj - Kuanyama
kk - Kazakh
kk-arab - Kazakh (Arabic script)
kk-cn - Kazakh (China)
kk-cyrl - Kazakh (Cyrillic script)
kk-kz - Kazakh (Kazakhstan)
kk-latn - Kazakh (Latin script)
kk-tr - Kazakh (Turkey)
kl - Kalaallisut
km - Khmer
kn - Kannada
ko - Korean
ko-kp - 한국어 (조선)
koi - Komi-Permyak
kr - Kanuri
krc - Karachay-Balkar
kri - Krio
krj - Kinaray-a
ks - Kashmiri
ks-arab - Kashmiri (Arabic script)
ks-deva - Kashmiri (Devanagari script)
ksh - Colognian
ku - Kurdish
ku-arab - كوردي (عەرەبی)
ku-latn - Kurdish (Latin script)
kv - Komi
kw - Cornish
ky - Kyrgyz
la - Latin
lad - Ladino
lb - Luxembourgish
lbe - лакку
lez - Lezghian
lfn - Lingua Franca Nova
lg - Ganda
li - Limburgish
lij - Ligurian
liv - Livonian
lmo - Lombard
ln - Lingala
lo - Lao
loz - Lozi
lrc - Northern Luri
lt - Lithuanian
ltg - Latgalian
lus - Mizo
luz - Southern Luri
lv - Latvian
lzh - Literary Chinese
lzz - Laz
mai - Maithili
map-bms - Basa Banyumasan
mdf - Moksha
mg - Malagasy
mh - Marshallese
mhr - Eastern Mari
mi - Maori
min - Minangkabau
mk - Macedonian
ml - Malayalam
mn - Mongolian
mo - молдовеняскэ
mr - Marathi
mrj - Western Mari
ms - Malay
mt - Maltese
mus - Creek
mwl - Mirandese
my - Burmese
myv - Erzya
mzn - Mazanderani
na - Nauru
nah - Nāhuatl
nan - Min Nan Chinese
nap - Neapolitan
nb - Norwegian Bokmål
nds - Low German
nds-nl - Low Saxon
ne - Nepali
new - Newari
ng - Ndonga
niu - Niuean
nl - Dutch
nl-informal - Nederlands (informeel)
nn - Norwegian Nynorsk
nov - Novial
nrm - Nouormand
nso - Northern Sotho
nv - Navajo
ny - Nyanja
oc - Occitan
olo - Livvi-Karelian
om - Oromo
or - Oriya
os - Ossetic
pa - Punjabi
pag - Pangasinan
pam - Pampanga
pap - Papiamento
pcd - Picard
pdc - Pennsylvania German
pdt - Plautdietsch
pfl - Palatine German
pi - Pali
pih - Norfuk / Pitkern
pl - Polish
pms - Piedmontese
pnb - Western Punjabi
pnt - Pontic
prg - Prussian
ps - Pashto
pt - Portuguese
pt-br - Brazilian Portuguese
qu - Quechua
qug - Chimborazo Highland Quichua
rgn - Romagnol
rif - Riffian
rm - Romansh
rmy - Romani
rn - Rundi
ro - Romanian
roa-tara - tarandíne
ru - Russian
rue - Rusyn
rup - Aromanian
ruq - Megleno-Romanian
ruq-cyrl - Megleno-Romanian (Cyrillic script)
ruq-latn - Megleno-Romanian (Latin script)
rw - Kinyarwanda
sa - Sanskrit
sah - Sakha
sat - Santali
sc - Sardinian
scn - Sicilian
sco - Scots
sd - Sindhi
sdc - Sassarese Sardinian
sdh - Southern Kurdish
se - Northern Sami
sei - Seri
ses - Koyraboro Senni
sg - Sango
sgs - Samogitian
sh - Serbo-Croatian
shi - Tachelhit
shi-latn - Tašlḥiyt
shi-tfng - ⵜⴰⵛⵍⵃⵉⵜ
si - Sinhala
sk - Slovak
sl - Slovenian
sli - Lower Silesian
sm - Samoan
sma - Southern Sami
sn - Shona
so - Somali
sq - Albanian
sr - Serbian
sr-ec - Serbian (Cyrillic script)
sr-el - Serbian (Latin script)
srn - Sranan Tongo
ss - Swati
st - Southern Sotho
stq - Saterland Frisian
su - Sundanese
sv - Swedish
sw - Swahili
szl - Silesian
ta - Tamil
tcy - Tulu
te - Telugu
tet - Tetum
tg - Tajik
tg-cyrl - Tajik (Cyrillic script)
tg-latn - Tajik (Latin script)
th - Thai
ti - Tigrinya
tk - Turkmen
tl - Tagalog
tly - Talysh
tn - Tswana
to - Tongan
tokipona - Toki Pona
tpi - Tok Pisin
tr - Turkish
tru - Turoyo
ts - Tsonga
tt - Tatar
tt-cyrl - Tatar (Cyrillic script)
tt-latn - Tatar (Latin script)
tum - Tumbuka
tw - Twi
ty - Tahitian
tyv - Tuvinian
tzm - Central Atlas Tamazight
udm - Udmurt
ug - Uyghur
ug-arab - Uyghur (Arabic script)
ug-latn - Uyghur (Latin script)
uk - Ukrainian
ur - Urdu
uz - Uzbek
uz-cyrl - ўзбекча
uz-latn - oʻzbekcha
ve - Venda
vec - Venetian
vep - Veps
vi - Vietnamese
vls - West Flemish
vmf - Main-Franconian
vo - Volapük
vot - Votic
vro - Võro
wa - Walloon
war - Waray
wo - Wolof
wuu - Wu Chinese
xal - Kalmyk
xh - Xhosa
xmf - Mingrelian
yi - Yiddish
yo - Yoruba
yue - Cantonese
za - Zhuang
zea - Zeelandic
zh - Chinese
zh-cn - Chinese (China)
zh-hans - Simplified Chinese
zh-hant - Traditional Chinese
zh-hk - Chinese (Hong Kong)
zh-mo - 中文(澳門)
zh-my - 中文(马来西亚)
zh-sg - Chinese (Singapore)
zh-tw - Chinese (Taiwan)
zu - Zulu
qqq - Message documentation
Format
Export for off-line translation
Export in native format
{{DISPLAYTITLE:Модули/Sockets}}<languages/> {| class="wikitable" |- ! Модуль !! Имя !! Версия !! Лицензия !! Источник !! Языки !! Платформы !! Тип !! Автор !! Описание |- <section begin=info /> | [[Special:MyLanguage/Modules/Sockets|Sockets]] || Сокеты | 4.9 || GPL2 || tr_Sockets.so || en,uk,ru,de || x86,x86_64,ARM <section end=info /> | Транспорт || {{Author|Роман Савоченко|Максим Кочетков (2014)}} || Предоставляет транспорт основанный на сокетах. Поддерживаются сетевые и UNIX сокеты. Сетевой сокет поддерживает TCP, UDP и RAWCAN протоколы. |} Модуль предоставляет в программу поддержку транспортов, основанных на сокетах. Поддерживаются входные и выходные транспорты, основанные на сетевых сокетах TCP, UDP, UNIX и RAWCAN. Добавить новые входные и выходные сокеты можно посредством конфигурации [[Special:MyLanguage/Documents/Program_manual#Transports|транспортной подсистемы]] в любом конфигураторе OpenSCADA. __TOC__ == {{Anch|InTr|Входные транспорты}} == Сконфигурированный и запущенный входной транспорт открывает серверный сокет для ожидания соединения клиентов, кроме инициативного подключения. В случае с UNIX сокетом создаётся файл UNIX сокета. Сокеты TCP и UNIX являются многопоточными, т.е. при подключении клиента к сокетам данных типов создаётся клиентский сокет и новый поток, в котором производиться обслуживание клиента. Серверный сокет, в этот момент, переходит к ожиданию запросов от нового клиента. Таким образом достигается параллельное обслуживание клиентов. RAWCAN сокет осуществляет прием CAN кадров из интерфейса согласно настроенному фильтру. Each input transport is associated with one or several available transport protocols, to which input messages are transmitted. Together with the transport protocols, the mechanism of combining fragmented pieces when sending requests is supported. Read about the passive acquisition mechanism and initiative connections you can in the corresponding part of the "[[Special:MyLanguage/Documents/DAQ#PassiveAndInitiative|Data acquisition in OpenSCADA]]" document. [[File:Sockets_in.png|center|frame|Fig.1. The generic configuration dialogues of the input socket.]] Using the main dialog you can set: * State of the transport, that is: status, "Connect", name of the storage (containing the configuration) and information about the active connections. * Identifier, name and description of the transport. * Address of the transport. The format of the address is listed in the table below. * Selecting of the transport protocols. :[[File:at.png]] Empty value of the protocols selection switches the transport mode to creating the associated output transports for each connection ID read from to that input. * State "Connect", in which the transport must be switched at start up. Using the additional dialog you can set: * Priority of the transport tasks. * [TCP] System input buffer size in kilobytes of the socket. Set to 0 for disabling the user size. Actual size you can see in the status. * [TCP] Maximum segment size (MSS) in bytes, for limit the transmitted packages size (segments TCP) on bad link channels. Set to 0 for disabling the user limit for size. Actual size you can see in the status. * [TCP|UNIX|RAWCAN] Queue length of the sockets * [TCP|UNIX|RAWCAN,!INIT] Maximum number of clients and Maximum number of clients per host. * [TCP|UNIX|RAWCAN,!INIT] Keep alive requests — closing the connection after specified number of the requests. Zero value for disabling — never closes. * [TCP|UNIX|RAWCAN] Keep alive timeout, seconds — closing the connection after missing requests within a specified time. Zero value for disabling — never closes. :[[File:at.png]] Disabling this feature is not recommended because the TCP/IP network property does not guarantee the server notification about the disconnection, say in the event of a power failure on the client. As a result, the opened client connections can remain <span style="color:red">forever</span>, and when the limit is reached the server will stop accepting new ones! * [TCP,INIT|ASSOC] Timeouts, tries of the initiative connection and the associated output transports, empty for default and separated by '||'. Format of the timeouts and tries is corresponded to ones of the output transport. * Protocols' specific custom parameters. * Reset all the additional parameters to default values and cleanup the protocols' specific custom parameters. Features of the formation of the input socket address are given in the table below: {| class="wikitable" |- ! Socket type !! Address |- |TCP|| '''[TCP:]{addr}[:{port}[,{port2}[,{portN}]][:{mode}[:{IDmess}]]]'''<br/> where: * ''addr'' – address for socket to be opened, empty or "*" address opens socket for all interfaces. There may be as the symbolic representation as well as IPv4 "'''127.0.0.1'''" or IPv6 "'''[::1]'''". * ''port'', ''port2'', ''portN'' – network ports on which the socket is sequential opened (at busy the first ones), indication of the character name of the port, according to ''/etc/services'' is available. * ''mode'' – mode of the input socket working: ** '''0''' — force closing the connection after the session reception-response. ** '''1'''(default) — do not close, only by the KeepAlive parameters. ** '''2''' — initiative connection. Enables the mode of connecting this input transport to remote host (address instead of local) and switching to the listening state of this host. The "Keep alive timeout" value is used as the timeout of the re-connection of this transport in the absence of activity in order to restore the possibly lost connection. * ''IDmess'' — identification message of the initiative connection — the mode 2. Example: "'''TCP::10001:1'''" — the TCP socket is available on all interfaces, opened on port 10001 and the connection does not break. |- |UDP|| '''UDP:{addr}:{port}'''<br/> where: * ''addr'' — the same as in the TCP; * ''port'' — the same as in the TCP.<br/> Example: "'''UDP:localhost:10001'''" — the UDP-socket is only available on the "localhost" interface and opened on the port 10001. |- |RAWCAN|| '''RAWCAN:{if}:{mask}:{id}'''<br/> where: * ''if'' — name of the CAN interface; * ''mask, id'' — mask and identifier of filtering the CAN frames.<br/> Example: "'''RAWCAN:can0:0:0'''" — is receiving all CAN frames at the interface "can0". |- |UNIX|| '''UNIX:{name}:{mode}'''<br/> where: * ''name'' — file name of the UNIX socket; * ''mode'' — the same as in the TCP.<br/> Example: "'''UNIX:/tmp/oscada:1'''" — UNIX-socket is available through the file "/tmp/oscada" and it doesn't close the connection. |} RAWCAN имеет некоторые особенности в формировании посылки, а именно: * идентификатор полученного CAN фрейма помещается в поле отправителя (''sender''), а данные в поле запроса (''request''); * признаком расширенного идентификатора-отправителя является наличие старшего бита (0x80000000). == Выходные транспорты == Сконфигурированный и запущенный выходной транспорт открывает соединение с указанным сервером. При разрыве соединения выходной транспорт останавливается. Для возобновления соединения транспорт нужно снова запустить, что все протоколы делают автоматически. Транспорт поддерживает прямое определение нескольких адресов сервера и обработку всех IP-адресов в которые резолвится символьный адрес, что позволяет строить [[Special:MyLanguage/Documents/DAQ#Redundancy|вертикальное резервирование]] непосредственно транспортом, который будет автоматически подключаться к первому доступному серверу. [[File:Sockets_out.png|center|frame|Fig.2. The generic configuration dialogues of the output socket.]] Using the main dialog you can set: * State of the transport, that is: status, "Connect" and name of the storage, containing the configuration. * Identifier, name and description of the transport. * Address of the transport. The format of the addresses is listed in the table below. Using the additional dialog you can set: * Connection timings in the format "'''{conn}:{next}[:{rep}]'''", where: ** ''conn'' — maximum connection waiting time, in seconds; ** ''next'' — maximum time for waiting the continue of the response, in seconds; ** ''rep'' — minimum delay time for next request, in seconds. : Can be prioritatile specified into the address field as the second global argument, as such "'''localhost:123||5:1'''". * Attempts of the requesting both for this transport and protocol, for full requests. : Can be prioritatile specified into the address field as the third global argument, as such "'''localhost:123||5:1||3'''". * [TCP] Maximum segment size (MSS) in bytes, for limit the transmitted packages size (segments TCP) on bad link channels. Set to 0 for disabling the user limit for size. Actual size you can see in the status. * Protocols' specific custom parameters. * Reset all the additional parameters to default values and cleanup the protocols' specific custom parameters. Адрес выходных сокетов различного типа формируются следующим образом: {| class="wikitable" |- ! Тип сокета !! Адрес |- | TCP/UDP || '''[TCP:]{addr}[,{addrN}]:{port}'''<br/> '''UDP:{addr}[,{addrN}]:{port}'''<br/> где: * ''addr'' — адрес к которому осуществляется подключение. Допускаются как символьное, так и IPv4 "'''127.0.0.1'''" или IPv6 "'''[::1]'''" представление адреса. * ''port'' — сетевой порт к которому осуществляется подключение. Возможно указание символьного имени порта согласно ''/etc/services''. Пример: "'''TCP:127.0.0.1:7634'''" — соединится с портом 7634 на хосте 127.0.0.1. |- | RAWCAN || '''RAWCAN:{if}:{mask}:{id}'''<br/> где: * ''if'' — имя CAN интерфейса; * ''mask, id'' — маска и идентификатор CAN кадров. Пример: "'''RAWCAN:can0:0:0'''" — принимать все CAN кадры на интерфейсе "can0". |- | UNIX || '''UNIX:{name}'''<br/> где: * ''name'' — имя файла UNIX сокета. Пример: "'''UNIX:/tmp/oscada'''" — соединится с UNIX-сокетом через файл "/tmp/oscada". |} RAWCAN имеет некоторые особенности в формировании посылки, а именно: * отправка CAN фреймов (прозрачно) в транспорт осуществляется в виде структуры ''struct can_frame''. Размер структуры 16 байт, где: 4 байта — идентификатор, 4 байта — длина, 8 байт — данные. Например, посылка: '''15 CD 5B 07 08 00 00 00 11 12 13 14 15 16 17 18'''. Где: ** идентификатор: 123456789 (0x75BCD15) => '''15 CD 5B 07''', добавить 0x80 в последнем байте если нужен расширенный; ** длина: '''08 00 00 00''' (восемь байт); ** данные: '''11 12 13 14 15 16 17 18'''.
Navigation menu
OpenSCADA
Site
Download
Old Wiki
OpenSCADA Wiki
Home
About OpenSCADA
Functions and demands
Tasks
Using
Fund
Recent changes
Random page
Search
Tools
Special pages
Printable version
MediaWiki
Help
Personal tools
English
Log in