IOC SHELL ADDITIONS Eric Norum September 3, 2003.

Slides:



Advertisements
Similar presentations
Introduction to C++ An object-oriented language Unit - 01.
Advertisements

Programming III SPRING 2015 School of Computer and Information Sciences Francisco R. Ortega, Ph.D. McKnight Fellow and GAANN Fellow LECTURE #3 Control.
Programming C/C++ on Eclipe Trình bày : Ths HungNM C/C++ Training.
Structure of a C program
Copyright © 2008 Pearson Addison-Wesley. All rights reserved. Chapter 12 Separate Compilation Namespaces Simple Make Files (Ignore all class references.
Working with JavaScript. 2 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page Working with Variables.
OOP Spring 2007 – Recitation 21 Object Oriented Programming Spring 2007 Recitation 2.
1. 2 FUNCTION INLINE FUNCTION DIFFERENCE BETWEEN FUNCTION AND INLINE FUNCTION CONCLUSION 3.
Programming C/C++ on Eclipe Trình bày: Ths HungNM C/C++ Training.
Macro & Function. Function consumes more time When a function is called, the copy of the arguments are passed to the parameters in the function. After.
Input/Output Controller (IOC) Overview Andrew Johnson Computer Scientist, AES Controls Group.
ORNL is managed by UT-Battelle for the US Department of Energy EPICS State Notation Language (SNL), “Sequencer” Kay Kasemir, SNS/ORNL Many slides from.
First Screen : First window form will always remain open, for the user to select menu options. 1.
Methods and You. Up to this point, I have covered many different data types with you. Variables can be considered the nouns of an English sentence. If.
chap13 Chapter 13 Programming in the Large.
1 CS 192 Lecture 5 Winter 2003 December 10-11, 2003 Dr. Shafay Shamail.
Introduction Use of makefiles to manage the build process Declarative, imperative and relational rules Environment variables, phony targets, automatic.
GNU Compiler Collection (GCC) and GNU C compiler (gcc) tools used to compile programs in Linux.
Adv. UNIX: large/131 Advanced UNIX v Objectives of these slides: –learn how to write/manage large programs consisting of multiple files, which.
Chapter 13 Programming in the Large Dr. Jiung-yao Huang Dept. Comm. Eng. Nat. Chung Cheng Univ. TA: 鄭筱親 陳昱豪.
CHAPTER 2 PART #1 C++ PROGRAM STRUCTURE 1 st semester H 1 King Saud University College of Applied studies and Community Service Csc 1101 By:
142 F -1 Functions chapter 3 of the text int main(void) { double x,y,z; … x = cube(y/3.0); … printf(“%f cubed is %f”,x,cube(x)); … return 0; } double cube(double.
1 CISC181 Introduction to Computer Science Dr. McCoy Lecture 7 Clicker Questions September 22, 2009.
ICS 431 – Operating System. a command-line interpreter. a program that interprets commands and acts as an intermediary between the user and the inner.
Chapters 1-5 Review C++ Class. Chapter 1 – the big picture Objects Class Inheritance Reusability Polymorphism and Overloading.
Shell Advanced Features. Module 8 Shell Advanced Features ♦ Introduction In Linux systems, the shells are often referred to as command line interfaces.
Week 2-3 Control flow (review) Conditional statements If, else, else if, switch-case, break Loop constructs for, while, do-while, break, continue, label--go;
C Functions Three major differences between C and Java functions: –Functions are stand-alone entities, not part of objects they can be defined in a file.
BEGINNING PROGRAMMING.  Literally – giving instructions to a computer so that it does what you want  Practically – using a programming language (such.
March 2006 Copyright, 2006 Oxford Consulting, Ltd C++ Templates Templates F Part of the ongoing development of the C++ language F Integral part.
Makefiles. Multiple Source Files (1) u Obviously, large programs are not going to be contained within single files. u C provides several techniques to.
Stanford Linear Accelerator Center New SNL Ideas Possible Next Steps Ron Chestnut – PSI, May, 2001 With ideas from B. Dalesio and M. Clausen.
Functions in C CSE 2451 Rong Shi. Functions Why use functions? – Reusability Same operation, different data – Abstraction Only need to know how to call.
KIC/Computer Programming & Problem Solving 1.  Header Files  Storage Classes  Scope Rules  Recursion Outline KIC/Computer Programming & Problem Solving.
© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming Introduction to simple functions.
Weekly C-minar Week 0. Today: Steps of the compile Basic inclusion/syntax rules Low-cost containment Debugging.
Chapter 12: Programming in the Large By: Suraya Alias 1-1.
Adv. UNIX:pre/111 Advanced UNIX v Objectives of these slides: –look at the features of the C preprocessor Special Topics in Comp. Eng.
Session 2: PHP Language Basics iNET Academy Open Source Web Development.
CSIS 123A Lecture 7 Static variables, destructors, & namespaces.
Function PrototypetMyn1 Function Prototype We can declare a function before we use or define it by means of a function prototype. A function prototype.
Building Programs from Existing Information Solutions for programs often can be developed from previously solved problems. Data requirements and solution.
Generic Programming and Library Design Brian Bartman
Pre-Compiler Directives for TTCN-3 Ina Schieferdecker in response to CR5089 and 5090.
Functions and Program Structure CSE 2031 Fall June 2016.
2.1 First C Program. First Program Open visual studio, click new file Save as “programName.c” – Program must start with letter and have no spaces – Must.
Unit 10 Code Reuse. Key Concepts Abstraction Header files Implementation files Storage classes Exit function Conditional compilation Command-line arguments.
Topic Pre-processor cout To output a message.
CHAPTER 2 PART #1 C++ PROGRAM STRUCTURE
C Functions -Continue…-.
Introduction to PL/SQL Programing
CISC105 – General Computer Science
INC 161 , CPE 100 Computer Programming
Chapter 2 part #1 C++ Program Structure
Functions CIS 40 – Introduction to Programming in Python
Intro to PHP & Variables
Tejalal Choudhary “C Programming from Scratch” Function & its types
Preprocessor C program → Modified C program → Object Code
Variables In programming, we often need to have places to store data. These receptacles are called variables. They are called that because they can change.
Functions Chapter 3 of the text Motivation:
The Linux Command Line Chapter 7
Object Oriented Programming (OOP) LAB # 5
Register Variables Declaring a variable as a "register" variable is an advisory to the compiler to keep the normal location of the variable in a register,
CSC 253 Lecture 7.
Documentation and Style
For this assignment, copy and past the XHTML to a notepad file with the .html extension. Then add the code I ask for to complete the problems.
See requirements for practice program on next slide.
Method exercises Without IF
Templates Generic Programming.
Functions Reasons Concepts Passing arguments to a function
Presentation transcript:

IOC SHELL ADDITIONS Eric Norum September 3, 2003

Command-line macro expansion $(var) or ${var} replaced with value of var environment variable No expansion inside single quotes or following a backslash (\) Environment variable values can be set with IOC shell epicsEnvSet command Application build creates envPaths with lines like: epicsEnvSet(IOC,"iocmyExample") epicsEnvSet(TOP,"/home/phoebus/NORUME/myExample") epicsEnvSet(EPICS_BASE,"/home/phoebus/NORUME/EPICS/base") epicsEnvSet(ASDSTD,"/home/phoebus/NORUME/EPICS/support/asdStd")

Fine Points Indirect definitions are possible –epicsEnvSet var1 ‘${var2}’ –epicsEnvSet var2 someName –epicsEnvSet someName someDir/Path –epicsEnvSet anotherName anotherDir/Path –cd ${var1} –epicsEnvSet var2 anotherName –cd ${var1}

Easier Access to ‘Debugging’ Variables In your device/record/sequencer code you have some variables you wish to set/view from the IOC shell: static double myDeviceParameter; static int myDeviceDebugFlag ;

Step 1 - Export variables Add #include to the list of headers included by your source Add an epicsExportAddress declaration for each variable: epicsExportAddress(int,myDeviceDebugFlag); epicsExportAddress(double,myDeviceParameter);

Step 2 - Add variables to database definition Add an variable declaration for each variable to some database description file included by the application: variable(myDeviceDebugFlag) variable(myDeviceParameter,double) A missing type specifier is taken to be int

Step 3 - Use the IOC shell var command to set/view var myDeviceDebugFlag 3 var myDeviceParameter 1.3 var myDebugFlag var