Code Monkey home page Code Monkey logo

e3-require's Introduction

Deprecation notice

2020-08-26: This remote has been deprecated. Moved to https://gitlab.esss.lu.se/e3/e3-require.

e3-require

Setup

e3-require (master)$ make init
e3-require (master)$ make vars
e3-require (master)$ make build
e3-require (master)$ make install

Update shell environment

e3-require (master)$ make requireconf

Execute iocsh.bash

 e3-require (master)$ source tools/setE3Env.bash 

Set the ESS EPICS Environment as follows:
THIS Source NAME    : setE3Env.bash
THIS Source PATH    : /home/jhlee/e3/e3-require/tools
EPICS_BASE          : /epics/base-3.15.5
EPICS_HOST_ARCH     : linux-x86_64
E3_REQUIRE_LOCATION : /epics/base-3.15.5/require/3.0.0
PATH                : /epics/base-3.15.5/require/3.0.0/bin:/epics/base-3.15.5/bin/linux-x86_64:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/jhlee/bin
LD_LIBRARY_PATH     : /epics/base-3.15.5/lib/linux-x86_64:/epics/base-3.15.5/require/3.0.0/lib/linux-x86_64:/epics/base-3.15.5/require/3.0.0/siteLibs/linux-x86_64

Enjoy E3!

jhlee@faiserver: e3-require (master)$ iocsh.bash 
#
# Start at "2018-W35-Aug28-0012-23-CEST"
#
# Version information:
# European Spallation Source ERIC : iocsh.bash (v0.3.1-6690f8a.PID-9225)
#
# --->--> snip -->--> 
# Please Use Version and other environment variables
# in order to report or debug this shell
#
# HOSTDISPLAY=""
# WINDOWID="54535878"
# PWD="/home/jhlee/e3/e3-require"
# USER="jhlee"
# LOGNAME="jhlee"
# EPICS_HOST_ARCH="linux-x86_64"
# EPICS_BASE="/epics/base-3.15.5"
# E3_REQUIRE_NAME="require"
# E3_REQUIRE_VERSION="3.0.0"
# E3_REQUIRE_LOCATION="/epics/base-3.15.5/require/3.0.0"
# E3_REQUIRE_BIN="/epics/base-3.15.5/require/3.0.0/bin"
# E3_REQUIRE_DB="/epics/base-3.15.5/require/3.0.0/db"
# E3_REQUIRE_DBD="/epics/base-3.15.5/require/3.0.0/dbd"
# E3_REQUIRE_INC="/epics/base-3.15.5/require/3.0.0/include"
# E3_REQUIRE_LIB="/epics/base-3.15.5/require/3.0.0/lib"
# E3_SITEAPPS_PATH="/epics/base-3.15.5/require/3.0.0/siteApps"
# E3_SITELIBS_PATH="/epics/base-3.15.5/require/3.0.0/siteLibs"
# E3_SITEMODS_PATH="/epics/base-3.15.5/require/3.0.0/siteMods"
# EPICS_DRIVER_PATH="/epics/base-3.15.5/require/3.0.0/siteMods"
# EPICS_CA_AUTO_ADDR_LIST="no"
# EPICS_CA_ADDR_LIST="10.0.6.172 10.0.6.60"
# PATH="/epics/base-3.15.5/require/3.0.0/bin:/epics/base-3.15.5/bin/linux-x86_64:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/jhlee/bin"
# LD_LIBRARY_PATH="/epics/base-3.15.5/lib/linux-x86_64:/epics/base-3.15.5/require/3.0.0/lib/linux-x86_64:/epics/base-3.15.5/require/3.0.0/siteLibs/linux-x86_64"
# --->--> snip -->--> 
#
# Set REQUIRE_IOC for its internal PVs
epicsEnvSet REQUIRE_IOC "E3R:FAISERVER"
#
# Set E3_IOCSH_TOP for the absolute path where iocsh.bash is executed.
epicsEnvSet E3_IOCSH_TOP "/home/jhlee/e3/e3-require"
#
# 
# Load require module, which has the version 3.0.0
# 
dlload /epics/base-3.15.5/require/3.0.0/lib/linux-x86_64/librequire.so
dbLoadDatabase /epics/base-3.15.5/require/3.0.0/dbd/require.dbd
require_registerRecordDeviceDriver
Loading module info records for require
# 
# Set the IOC Prompt String One 
epicsEnvSet IOCSH_PS1 "6690f8a.faiserver.9240 > "
#
# 
iocInit
Starting iocInit
############################################################################
## EPICS R3.15.5-E3-3.15.5-patch
## EPICS Base built Aug 27 2018
############################################################################
iocRun: All initialization complete
6690f8a.faiserver.9240 > 



TODO

e3-require's People

Contributors

jeonghanlee avatar kazantzidis avatar simon-ess avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

e3-require's Issues

USR_DEPENDENCIES doesn't propagate into driver.makefile

Once, dependent module is installed in E3 environment, driver.makefile automatically searches all modules directories in order to add them into include when the target module compilation. It works after we have the entire structure. However, it doesn't work when we call the first dependence module in the target compilation.

I have to propagte USR_DEPENDENCIES no matter when we setup that target module.

USR_DEPENDENCIES exists in EEE not in PSI driver.makefile.

-DT_A=${T_A} doesn't return T_A properl to require

linux-x86_64 is going to 1-x86_64 within the require function, and it overwrites EPICS_HOST_ARCH in iocsh when require is executed at the first.

T_A doesn't be defined at the first time in iocsh, however, it is defined when require is executed first time. It also have the broken T_A information.

Hint is in require.c....

have to touch the source codes ..... sigh...

prompt with info about EPICS version

Hi Han,
if you add the below two lines on setE3Env.sh the prompt will show the EPICS version if it sourced. This is useful when you have multiple shell windows open to be sure that actually you are running in the correct environment.

.................
IFS='-' read -ra base <<< "$EPICS_BASE"
PS1="[\d \t] $(tput setaf 4)\u@centos7VM:\w $ [$(tput sgr0)](EPICS-${base[1]})> "

iocsh uses a lots of internal variables

The iocsh shell uses the a lot of predefined internal variables, for example,

  • REQUIRE
  • EPICS_MODULES
  • BASE
  • Others

We should define them all in order to match our e3-env environment in order to execute iocsh script correctly.

require db template cannot be loaded properly

Some prequirements are expected in require.c

IOC should define in the first, and the following errors

dbLoadTemplate(moduleversion.template, "IOC=E3Test")
dbLoadTemplate: error opening sub file moduleversion.template: No such file or directory
dbLoadTemplate(iocAdminSoft.substitutions, "IOC=E3Test:IocStat")
dbl > ".//E3Test_PVs.list"
iocInit
Starting iocInit
############################################################################
## EPICS R3.15.4-EEE-3.15.4 $$Date$$
## EPICS Base built Oct 19 2017
############################################################################
require: record E3Test:MODULES not found
require: record E3Test:VERSIONS not found
require: record E3Test:MOD_VER not found

If I set the absolute path in....

dbLoadTemplate(/epics/modules/require/0.0.1/R3.15.4/db/moduleversion.template, "IOC=E3Test")
Substitution file error: syntax error
line 1: 'record'

Here is dbl output:

(null):iocStats_VER
(null):require_VER
(null):MODULES
(null):MOD_VER
(null):VERSIONS

Remove generated e3.cfg

When we install e3 and move them other path, or mount it with the different directory path name. We cannot source "setE3Env.bash" properly, because of the generated e3.cfg.

After the installation, we know exactly where setE3Env.bash is, so we might guess, where is. So we can use them in order to identify EPICS_BASE, REQUIRE, and REQUIRE_VERSION.

setE3env.bash

  • use the existent LD_LIBRARY_PATH
  • use the existent PATH
  • add :${HOME}/.local/bin:${HOME}/bin in PATH
  • and so on...

in case we have to upgrade the new version of require

In case we have to upgrade the new version of require, what kind of actions should we have to do for entire E3 environment?

Do we have any automatic way to build the entire modules (existent in E3) with new require version?

If so, if one would like to use old require instead of new require, what can we do? How we can distinguish between them? Impossible to distinguish them?

Again, Chicken or the egg? we have to define the procedure properly not to happen this case in future.

Check the physical directories

Some environment variables are actually "directories". It should be existent in disk or others. So far, we don't have logics to check them.

For example,

  • Installed EPICS Bases are 3.15.4, 3.15.5
  • however, we allows an user to select any epics versions in setE3Env.bash.
  • if they select non-existent EPICS base with existent REQUIRE, how iocsh can stop them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.