Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


DOCUMENT N.

CS-20070604.1.b1.41

CREATION DATE

04/06/2007

LAST MOD. DATE

25/03/2009, 12/05/09, 03/07/09, 06/07/09, 15/03/10, 21/07/10, 21/10/10

REPLACES DOCUMENT N.


SEE ALSO DOCUMENT N.

-

NR. OF PAGES


AUTHORS

A. Stecchi, F. Galletti

Abstract

At the present time, the DAFNE Control System employs a common memory space for exchanging information. Commands, data and error reports are written to and read from this space.

...

Header packet

Code Block
themeFadeToGreyConfluence
Bytes              Name
-----              ----
4                  packet Length
4                  Transaction ID
4                  Unit ID

...

command:           A number associated to a specific service.
arguments:         Any data (string or binary stream) needed for the execution of the command (e.g. element name, set value, etc...) The arguments size can be calculated from the packet length as: arguments size = (packet length) - 4

Command

Name

Associated function and parameters

0x00000000

DO_NOT_USE

0x00000000 must NOT be used

0x00000001

FETCH

fetch the STA or DYN fork: <elementName>,STA|DYN

0x00000002

SEND CMD 1 TO 3

send a command from the console to the DEVIL: <command_string>

0x00000003

FETCH_BUFFER

fetch n bytes from a buffer global variable: <#OfBytes>

0x00000004

ECHO

send n bytes ang get the same n byte back: <byte_string>

0x00000005

FETCH_BLOCK

fetch STA or DYN fork (full array): <elementName>,STA|DYN

(the elementName is used by the servlet just to recognize the proper class and can be any elementName belonging to that class in that DEVIL)

0x00000006

GET_ALIVE_COUNT

read the DEVIL alive counter: no arguments

0x000000xx

to be defined

to be defined

0x000000ff

DO_NOT_USE

0x000000ff must NOT be used

Ok packet

Code Block
Bytes              Name
-----              ----
4                  packet code, always = 0x00000000

...

This global VI keeps a list of the DEVILs (with the TCP_DCS protocol) invoked by each window, with the associated connection IDs. The GConnList1_eth VI provides by itself all the services needed to manage the data.

service

required inputs

description

init

none

initializes the array of clusters to an empty array

register

windowName

appends a new component to the array:

windowName: the windowName value

DEVIL array: empty array

connID array: empty array

search

windowName

searches the windowName string into all the array components. If there is a match, then the component and its index are returned. If there is no match, an empty component and -1 are returned instead

get

index

If the index is in range (0, array dimension), then the corresponding component is returned. If the index is not in range, an empty component and -1 are returned instead

update

windowName

element

replaces the component corresponding to windowName with the element value

remove

windowName

removes the component corresponding to windowName

The GConnList1_eth is initiated at startup time by the DANTE top-bar.

...

For the elements that require a VME-to-VME connection, the connectionManager_eth gets the RTDBAddresses for the static and the dynamic forks by calling the usual getRTDBAddress routine.
An example of use of the connectionManager_eth: let us suppose to pass the following elementList array to the VI

elementList

QUATM004

QUATM005

CHHTB101

CHHTB102

...

the VI returns 4 arrays aligned one another.  

VME/ETH

T

F

F

T

...

RTDBStaAdd

A0FF0000

F4A05000

F4DE1000

A0FF0000

...

RTDBDynAdd

A0FF0000

F4A06000

F4DE2000

A0FF0000

...

classID

21

21

15

15

...

 Looking at the example, we see that the first element QUATM004 is controlled by a DEVIL with ethernet connection (VME/ETH = T). For this element, the two corresponding components of the RTDBStaAdd and RTDBDynAdd arrays are equal each other and contain the same TCP_DCS connection ID.

...