Hi Lewis,
The reason I wanted to use annotations is so that I could use AOP to
instrument my classes intead with CA code intead of repeatedly writing
it for each PV backed object. For example, if you wanted to implement a
callback that would be executed when an PV monitor fired you would
typically do the following in JCA/CAJ.
1. Create a context.
2. Create a channel to the PV you want to monitor.
3. Create the monitor and map it to the java method you would like to
callback to.
4. Convert PV types to Java types when necessary.
5. Execute pendIO calls when necessary.
6. Write code to tear down the channel once you're done.
I feel like this is a manual process that could be automated for the
majority of cases. If you just define the mapping of the callback
method to the PV you are monitoring (with annotations in my case) you
can use AOP to instrument your class with the rest of the code. The
monitor case is almost identical to a Message Driven Bean/POJO in the
J2EE world except your using a PV name instead of a JMS destination
name. I also like the fact that my Java abstractions are decoupled from
the CA code, which makes things like JUnit testing much easier.
I'll definitely take a look at the project you pointed out.
Thanks,
Mitch
On 01/11/2011 09:40 AM, J. Lewis Muir wrote:
At a minimum, it would provide an EpicsPv
object and make it easy to get and set values, easy to register interest
in a value change, do blocking puts, and more. I've written such an
implementation, but there are a lot of changes and improvements it needs
before I'd make it publicly available.
- Replies:
- Re: PV Mapping Using Java Annotations J. Lewis Muir
- References:
- PV Mapping Using Java Annotations Mitch McCuiston
- Re: PV Mapping Using Java Annotations J. Lewis Muir
- Navigate by Date:
- Prev:
RE: PV Mapping Using Java Annotations Carcassi, Gabriele
- Next:
Re: PV Mapping Using Java Annotations Mitch McCuiston
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
<2011>
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: PV Mapping Using Java Annotations J. Lewis Muir
- Next:
Re: PV Mapping Using Java Annotations J. Lewis Muir
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
<2011>
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|