package fcs

import org.lsst.ccs.subsystems.fcs.*
import org.lsst.ccs.subsystems.fcs.testbench.*
import org.lsst.ccs.subsystems.fcs.common.*
import org.lsst.ccs.subsystems.fcs.simulation.*
import org.lsst.ccs.subsystems.fcs.drivers.*
import org.lsst.ccs.description.groovy.CCSBuilder



import static org.lsst.gruth.jutils.MapArgs.*

CCSBuilder builder = ["fcs"]
//********************************************************************************//
//Carousel variables
//********************************************************************************//
//for each socket we define a position on the carousel : positionOnCarouselSocket
//and the position of the socket when it is at STANDBY position.
def positionOnCarouselSocket1 = 0
def positionOnCarouselSocket2 = 72
def positionOnCarouselSocket3 = 144
def positionOnCarouselSocket4 = 216
def positionOnCarouselSocket5 = 288
def standbyPositionSocket1 = 0
def standbyPositionSocket2 = 288
def standbyPositionSocket3 = 216
def standbyPositionSocket4 = 144
def standbyPositionSocket5 = 72


//Carousel Can Open Devices (CAN-CBX-AI814)
def adcName = "ai814"

//Carousel clamps controllers name
def clampXminusControllerName = "clampXminusController" //controller to unlock clamp on the side Xminus
def clampXplusControllerName =  "clampXplusController" //controller to unlock clamp on the side Xplus
//********************************************************************************//

//********************************************************************************//
//Autochanger variables
//********************************************************************************//
def acPlutoGatewayName = "acPlutoGateway" // to monitor the autochanger sensors
//********************************************************************************//

//********************************************************************************//
//Loader variables
//********************************************************************************//
def loaderTcpProxyName = "loaderTcpProxy"
def loaderPlutoGatewayName = "loaderPlutoGateway" // to monitor the loader sensors
//********************************************************************************//

builder.
        main ( org.lsst.ccs.subsystems.fcs.FcsMainModule,
                argMap(
                        ref("bridge"),   
                        ref("bridgeToLoader"),
                        ref("filterManager"),
                        ref("carousel"),
                        ref("autochanger"),
                        ref("loader"),
                        ))
                 



            
            //begin description of Main submodules
            {  
