APEX Software
Training
Introduction
or
APECS from 10.000 ft above
the ground
Reinhold Schaaf
for the Max-Planck-Institut f眉r Radioastronomie Bonn
Main packages
Communication in distributed, heterogeneous,
multilanguage software systems
Patterns, services and libraries for
control systems
Basic control of antenna hardware
CORBA objects for
Antenna control Astronomical coordinate systems Observing patternsAPEX specific part of control system
CORBA
Two CORBA
Acronyms
Common
Object
Request
Broker
Architecture
Object
Management
Group
An open membership, not-for-profit consortium that produces and maintains computer industry specifications for interoperable enterprise applications.
A basic
CORBA concept
Object:
00n identifiable, encapsulated
entity that provides one or more services that can be requested by a
client.00/font>
Example:
A running instance of the FitsWriter program is an object that provides two methods (services):
- start
- stop
Another
basic CORBA concept
Interface Definition Language (IDL):
00he language used to describe
the interfaces that client objects call and object implementations provide00/font>
Example:
Interface description of FitsWriter (Python!)
in /soft/apex/APEX/idl/apexFW.idl:
module apexFW {
interface FitsWriter {
long start(in long scanNum,
in long obsNum,
in string pickledScan);
long stop(in string status);
};
};
CORBA
Services
Used in APECS:
Naming ServiceAllows location of objects
Notification ServiceDistribution of events
Logging ServiceDistribution of logging events
Interface RepositoryManagement of interface definitions
CORBA
Naming Service
FitsWriter registers itself at Naming
Service:
...
myFW = onlineFitsWriter()
myFWS = myFW._this()
ns = acsCORBA.nameService()
name = [(CosNaming.NameComponent(\
00/font>Online
APEX FitsWriter00/font>, 000)]
ns.bind(name, myFWS)
...
ObsEngine uses Naming Service to get
FitsWriter:
...
ns = acsCORBA.nameService()
name = [(CosNaming.NameComponent(\
00/font>Online
APEX FitsWriter00/font>, 000)]
fw = ns.resolve(name)
fw.start(00
...
Example for the power of CORBA:
Bring me the FitsWriter, wherever it is!
ORB
Object Request Broker
Responsible for the communication of requests across OS and languange borders
ACS Packages
C++ container
Notification channels
Basic Access
Control
Interface
Management and Access
Control Interface
BACI
Basic Access Control Interface
BACI Example
Example:
FFTS is represented by 3 DOs:
APEX:FFTS APEX:FFTS:BAND1 APEX:FFTS:BAND2Methods of these DOs are defined in IDL files, e.g.
APEX:FFTS:integrationTime
cmdIntegrationTime
configure
00/font>
APEX:FFTS:BAND1/2:numSpecChan
cmdNumSpecChan
configure
...
BACI 00
DO pattern
Example:
Similar to Composition Design Pattern
COBs in
APECS
Two general types of COBs:
CAN COBs Part of TICS: Translation of CORBA requests to CAN commands CAN used for communication with VERTEX software SCPI COBs Translation of CORBA requests to SCPI commands (UDP) Used for communication with all non-Vertex hardware controllers Automatic code generation from IDLCAN
CAN - Controller Area Network
SCPI
SCPI - Standard Commands for Programmable
Instrumentation
Example:
Request:
APEX:FFTS:BAND1:CMDNUMSPECCHAN
1024
Reply:
APEX:FFTS:BAND1:CMDNUMSPECCHAN
1024 2005-11-07T12:17:38.310+000
In case of error:
APEX:FFTS:BAND1:CMDNUMSPECCHAN ERROR HARDWARE-FAILURE 2005-11-07T12:17:38.310+000
CAN COBs
Diagnostic tool:
CAN logger
Diagnostic tool:
Python module apexObsUtils
SCPI COBs
Diagnostic tool:
udp-telnet
Diagnostic tool:
Python module apexObsUtils
Activators
- Containers
Components reside in Containers, which
manage various technical aspects (connection to CDB, life cycle) and provide runtime environment for components group together related componentsSCPI COBs
SCPI COBs with Containers
Containers
in APECS
febe APEX:HET345 APEX:CONDOR 00/font> febe2 APEX:LABOCA APEX:MACS 00/font> opt OPT:CLOCK OPT:OPTPOINT opttel APEX:OPTTEL
The abm1 container
runs on ABM; all other containers on INSTRUMENTS
abm0: Simulation mode
abm1: Real antenna
MACI
Management and Access
Control Interface
MACI Manager, acquainted with all DOs, CDB, and CORBA services
Notification
Channels
NCs in
APECS
Positional Data
Sampled every 48 ms
Archiving Data
Sampling rate
defined in CDB
NCs in APECS
APECS 00Top level overview
APECS
Deployment
MonClients
ObsClients
More to come:
ObsLogger Client Calibrator ClientServers
APECS
Software Training VMWare Images
APECS
Software Training
APEX system
Simulated mode:
Walk through startAPECSServers, startAPECSMonClients, and startAPECSObsClients to explore deployment and understand processes on each machine Explore aspects not contained in VMWare image (e.g. DB2) Experience real-world problems and solve themFull mode:
Try out CAN bus logger