Transcript Java - ESO

Atacama
Large
Millimeter
Array
ACS Training
Notification Channel - Java API
Getting Started
At the console open up:
ACS/LGPL/CommonSoftware/acscourse/ws/src/alma/ACSCOURSE_MOUNT/MountSupplier.java
ACS/LGPL/CommonSoftware/acscourse/ws/src/alma/ACSCOURSE_MOUNT/MountConsumer.java
SWC/LSO, October 2002
ACS Training
2
What files needs to be created?
•
•
An IDL file containing the definition of a struct the NC will
send/receive.
An instance of the supplier or consumer objects (or a derived
class…)
SWC/LSO, October 2002
ACS Training
3
What is Gained By Using Java
•
•
•
•
A complete implementation of the ACS API.
An extremely powerful Supplier class when compared to C++.
It’s harder to write buggy code (i.e., segfaults relating to the C++
API occur often).
Simulations outside of CORBA using the Publisher/Receiver
classes. Please see the notification channel document for specific
details.
SWC/LSO, October 2002
ACS Training
4
Supplier Example
Please see:
acscourse/ws/src/alma/ACSCOURSE_MOUNT/MountSupplier.java
SWC/LSO, October 2002
ACS Training
5
Consumer Example
Please see:
acscourse/ws/src/alma/ACSCOURSE_MOUNT/MountConsumer.java
Also, please open:
jcontexmpl/src/alma/demo/EventConsumerImpl/EventConsumerImpl
SWC/LSO, October 2002
ACS Training
6
Makefile Targets
There is nothing special that has to be used for the Java NC API. Simply
compile the Java files using the “normal” Java targets.
SWC/LSO, October 2002
ACS Training
7
What Methods are Available in the
Consumer and Supplier Classes?
Exactly the same methods discussed in the Python Notification Channel presentation.
For specific details, take a look at automatically generated documentation available at:
www.eso.org/~almamgr/AlmaAcs/OnlineDocs/ACS_docs/java/namespacealma_1_1acs_1_1nc.html
SWC/LSO, October 2002
ACS Training
8
Questions about the Java NC
API???
SWC/LSO, October 2002
ACS Training
9
Demo
SWC/LSO, October 2002
ACS Training
10
Advanced Concepts:
Adding Suppliers/Consumers to
your Component
SWC/LSO, October 2002
ACS Training
12