Experimental Physics and
| |||||||||||||||
|
I have a radiation monitor device simulation program which displays the real time dose rate for 6 channels GM tubes. Unfortunately the program only run in windows platform. I intent to grasp the real time dose rate to epics for linux.
The protocol is described in details below:
The communication is based on TCP protocol and the basic information form is JSON and there are six elements in the form, five of which is fixed, the sixth element is extensive (JSON form in {"..."})
The request command is:
[<ACT>,<SID>,<CID>,<TID>,<DEV>,{"cmd":"X",...}]
The respond form is:
[<ACK>,<SID>]
ACT=Action
SID=Session ID "random value by information sponsor used for identify the communication"
CID=DevID "Device ID"
TID=Target ID "always 0 in the case".
DEV=Device type "AREA_Y1 is host name"
{"cmd":"X",...} is interactive data form.
Send message:
["S","123456","MTS-AY-01",0,"AREA_Y1",{...}]
the correct respond is:
["S","123456", "MTS-AY-01",0,"AREA_Y1",{...}](with data) or ["OK","123456"](without data)
error respond:
["NA","123456"]
The interactive data form (the sixth element in the above request command) is:
{"cmd":"X", "addr":"A","length":"YY", "data":[xxxx,xxxx,xxxx,....]}
cmd: a char
addr: 1-16 channel of GM tubes, the correspond address is A/B/C/D/E/F/G/H...
length: the length of data in the [xxxx,xxxx,xxxx,...]
data: see below.
a) Get measurement information (cmd:"T")
Upload real time measurement value of each detectors
*client to server:
{"cmd":"T","addr":"A","length":"7","data":[0,0,0.1]}
1: int, device status, 0 is normal.
2: int, channel 1 status, 0 is normal.
3: float, the real time dose rate of channel 1.
*server to client:
["OK","123456"] or ["NA", "123456"]
b) Get device paramaters (cmd:"R")
*server to client:
{"cmd":"R","addr":"0","length":"0","data":""}
*client to server:
{"cmd":"R","addr":"0","length":"23","data":["192.168.1.1",8000,6,10]}
1: string, ip address of server
2: int, port of server
3: int, time interval (s) of data restore
4: int, alarm recovery time (s)
My question:
If I want to get the measurement real time value and device parameters, could the communication between server and client be implemented by stream device?
Thank you, an example is appreciated.
| ||||||||||||||
ANJ, 16 Feb 2021 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |