/MSCB ODB tree: Difference between revisions

From MidasWiki
Jump to navigation Jump to search
(Created page with "<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4"> * Midas Documentation * Feature Listing * Application_lis...")
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 10: Line 10:
* [[mhttpd |MIDAS web server (mhttpd)]]  
* [[mhttpd |MIDAS web server (mhttpd)]]  
* mhttpd [[MSCB Page]]
* mhttpd [[MSCB Page]]
* [https://midas.psi.ch/mscb/ MSCB Slow Control Bus]
</div>
</div>


= Purpose =
= Purpose =
The <span style="color:purple; font-style:italic;">/MSCB</span> ODB tree contains data for the MSCB (MIDAS Slow Control Bus) system.
The <span style="color:purple; font-style:italic;">/MSCB</span> ODB tree contains data for the  
This tree is optional, and only required if the MSCB (MIDAS Slow Control Bus) system is in use. Provided MSCB support has been [[MSCB Page|built in]] to [[mhttpd]], the data from this tree is displayed on the [[MSCB Page]].  
[https://midas.psi.ch/mscb/ MSCB System].
 
This tree is optional, and only required if the MSCB system is in use. Provided MSCB support has been [[MSCB Page|built in]] to [[mhttpd]], the data from this tree is displayed on the [[MSCB Page]].  
 




= Creating the /MSCB tree =
= Creating the /MSCB tree =
The <span style="color:purple; font-style:italic">/MSCB</span> ODB tree is an optional tree that may be [[ODB#Creating ODB keys|created by the user]], but they are also created automatically by [[mhttpd]] if the  <span style="color:purple; font-style:italic;">/MSCB/Submaster</span> key is not present in the ODB. In this case, the equipment list is scanned, and all MSCB devices and addresses are collected from locations such as
The <span style="color:purple; font-style:italic">/MSCB</span> ODB tree is an optional tree that may be [[ODB#Creating ODB keys|created by the user]], but they are also created automatically by [[mhttpd]] if the  <span style="color:purple; font-style:italic;">/MSCB/Submaster</span> key is not present in the ODB. In this case, the equipment list is scanned, and all MSCB devices and addresses are collected from locations such as
: <span style="color:purple; font-style:italic;">/Equipment/<name>/Settings/Devices/Input/Device</span>
; <span style="color:purple; font-style:italic;">/Equipment/<name>/Settings/DD/<name>/MSCB Device</span>
or
which is the location for MSCB submasters used by the mscbdev.c and mscbhvr.c device drivers (found in the midas package at path
: <span style="color:purple; font-style:italic;">/Equipment/<name>/Settings/Devices/<name>/MSCB Device</span>
../midas/drivers/device). Once the tree is created, it will not be touched again by [[mhttpd]] (unless  <span style="color: #444444; background-color: #CCCCCC; font-style:italic; font-size: 90; padding:0.25em;
which are the locations for MSCB submasters used by the mscbdev.c and mscbhvr.c device drivers (found in the midas package at path
padding-left: 0.5em;padding-right: 0.5em;border:1px solid #808080;border-radius: 5px;margin-bottom:1px;">Rescan</span> on the [[MSCB Page]] is pressed) so devices can be removed or [[ODB#Reorder ODB keys|reordered]] by hand.
../midas/drivers/device). Once the tree is created, it will not be touched again by [[mhttpd]], so devices can be removed or [[ODB#Reorder ODB keys|reordered]] by hand.




= Example =
= Example =
The following example using the [[odbedit]] command <span style="color:saddlebrown; font-style:bold; ">"ls"</span> command shows the /MSCB ODB tree from the MEG experiment. This data is displayed on the [[MSCB Page]] in Figure 1.   
The following example using the [[odbedit]] command <span style="color:saddlebrown; font-style:bold; ">"ls"</span> command shows the /MSCB ODB tree from the Deap experiment. This data is displayed on the [[MSCB Page#Introduction|MSCB Page]].   
[local:MEG:R]/MSCB>ls -r
MSCB
    Submaster
        mscb004
            Pwd                xxxxx
            Comment            BTS
            Address            1
        mscb034
            Pwd                xxxxx
            Comment            XEC HV & LED
            Address
                                0
                                1
                                2


[local:deap:Stopped]/>ls -l /MSCB/Submaster/mscb520
Key name                        Type    #Val  Size  Last Opn Mode Value
---------------------------------------------------------------------------
Pwd                            STRING  1    32    31h  0  RWD
Comment                        STRING  1    32    31h  0  RWD  SCBs
Address                        INT    28    4    31h  0  RWD
                                        [0]            0
                                        [1]            1
                                        [2]            2
                                        [3]            3
                                        [4]            4
                                        [5]            5
                                        .................
                                        [27]            27
Node comment                    STRING  28    32    31h  0  RWD
                                        [0]            aaa
                                        [1]            bbb
                                        [2]            DEAPCOND410
                                        [3]            DEAPCOND410
                                        [4]            DEAPCOND410
                                        [5]            DEAPCOND410
                                        ...........................
                                        [27]            DEAPCOND410
       
= Keys in the /MSCB tree =
= Keys in the /MSCB tree =



Latest revision as of 17:04, 6 July 2015

Links

Purpose

The /MSCB ODB tree contains data for the MSCB System. This tree is optional, and only required if the MSCB system is in use. Provided MSCB support has been built in to mhttpd, the data from this tree is displayed on the MSCB Page.


Creating the /MSCB tree

The /MSCB ODB tree is an optional tree that may be created by the user, but they are also created automatically by mhttpd if the /MSCB/Submaster key is not present in the ODB. In this case, the equipment list is scanned, and all MSCB devices and addresses are collected from locations such as

/Equipment/<name>/Settings/DD/<name>/MSCB Device

which is the location for MSCB submasters used by the mscbdev.c and mscbhvr.c device drivers (found in the midas package at path ../midas/drivers/device). Once the tree is created, it will not be touched again by mhttpd (unless Rescan on the MSCB Page is pressed) so devices can be removed or reordered by hand.


Example

The following example using the odbedit command "ls" command shows the /MSCB ODB tree from the Deap experiment. This data is displayed on the MSCB Page.

[local:deap:Stopped]/>ls -l /MSCB/Submaster/mscb520
Key name                        Type    #Val  Size  Last Opn Mode Value
---------------------------------------------------------------------------
Pwd                             STRING  1     32    31h  0   RWD
Comment                         STRING  1     32    31h  0   RWD  SCBs
Address                         INT     28    4     31h  0   RWD
                                       [0]             0
                                       [1]             1
                                       [2]             2
                                       [3]             3
                                       [4]             4
                                       [5]             5
                                       .................
                                       [27]            27
Node comment                    STRING  28    32    31h  0   RWD
                                       [0]             aaa
                                       [1]             bbb
                                       [2]             DEAPCOND410
                                       [3]             DEAPCOND410
                                       [4]             DEAPCOND410
                                       [5]             DEAPCOND410
                                       ...........................
                                       [27]            DEAPCOND410
        

Keys in the /MSCB tree

Submaster subtree

  • Type: DIR

The Submaster subtree contains one or more <submaster-name> subtree(s) for the MSCB submasters present in the system.




<submaster-name> subtree

  • Type: DIR
  • Default:

The <submaster-name> subtree contains information for one of the MSCB submaster(s) present in the system. There will be a <submaster-name> subtree for each MSCB submaster present.




Pwd

  • Type: STRING [32]
  • Default:

This key in the <submaster-name> subtree may contain an optional password needed by that submaster. Leave blank if no password.




Comment

  • Type: STRING [32]
  • Default:

This key in the <submaster-name> subtree may contain an optional comment describing that submaster.




Address

  • Type: INT Array
  • Default:

This key in the <submaster-name> subtree is a variable-length array containing the node addresses for that submaster. The length of the array is determined by the number of nodes present.




Node comment

  • Type: STRING[32] Array
  • Default:

This key in the <submaster-name> subtreeis an optional variable-length array that may contain a comment for each node. The length of the array is determined by the number of nodes present.