Looking for VCDIFF (RFC 3284) algorithm implemented in LabVIEW

Hello forum,
I am looking to see if anyone knows of a publicly available implementation of the VCDIFF binary differencing algorithm in native LabVIEW (G) ? 
Here is a link to a paper on the RFC 3284 standard for those interested: http://tools.ietf.org/html/rfc3284
There are a number of open source implementations in C/C++, but I would like to locate one in LabVIEW if possible.
Regards!

Implementing binary algorithmes in LabVIEW and especially compression algorithmes, while possibe is not a very smart idea. Aside from possible perfomance problems when you start to shuffle around on bit level, there is also the issue about how to proof the correctness of your implementation. Those open source C/C++ solutions have been used, peer reviewed and what else many times and all that has uncovered various flaws and bugs during the process.There is only a very small adience that will go and use your LabVIEW algorithme and even a much smaller one who is able to do any significant form of peer review.
So all in all you are likely to end up with a somewhat to almost working implementation that nobody is going to use, for the gain of bragging that you did it in LabVIEW.
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions

Similar Messages

  • Looking for sample code of pwm output with Labview 7

    we are looking for sample code in LabView 7 for producing a pwm output. We are current using a 3rd party digital I/O board and just want to generate a pwm output on several of the bits.

    Hi Ray,
    There are several ways to do this, and in the example I created, I actually did not end up using shift registers. I've attached some example code that basically multiplies the period by the duty cycle percentage to achieve the number of milliseconds to be high and low.
    You would just need to insert your DIO code in each frame of the sequence structure.
    Hope that helps. Kind regards,
    -Sam F, DAQ Marketing Manager
    Learn about measuring temperature
    Learn how to take voltage measurements
    Learn how to measure current
    Attachments:
    70_PWM_Example.vi ‏23 KB

  • R/3 Looking for generic RFC to post internal table as CSV to SAP XI/PI

    Hi everybody,
    does anybody know a RFC to send a internal table to XI/PI?
    Thanks
    Regards Mario

    > do you really know all RFC to claim there is no such RFC?
    I appriciate this question.
    Well at least I don't know all RFCs.  But one thing I know if you are populating your data in your internal table by using some select query then you have to create your own ZRFC because for that there is no standard RFC.
    So this was the reason I said there is no such RFC. If you know some RFC then please let me know to add in my knowledge database.
    Regards,
    Sarvesh

  • Looking for Business Intelligence Material and Links

    Hi Friends, I am looking for best material links to implement the Oracle Business Intelligence.

    Oracle Technology Network is a good place to start.
    http://otn.oracle.com
    It will provide you with links to the BI documentation set.
    http://www.oracle.com/technology/documentation/bi_ee.html

  • Looking for Freelance/ Part Time LabVIEW opportunities in Midlands UK

    Hi All,
    Along my full time Mon - Fri job as Automation Software Engineer (Siemens TIA Portal, step7 simatic manager, WinCC Flex, s7-graph, Proagent and NI LabVIEW),
    I am looking for additional freelance/ contract opportunities in writing LabVIEW code for machine control and product testing purposes. I am not limited to coding, I can happily specify and install DAQ systems/PLC systems, sensors, do panel wiring, etc
    I am LabVIEW trained Controls Engineer with 3yrs experience; also beeing lucky to have completed over 9 different courses to date in NI Training Centre, Newbury. However CLD or CLAD is not something what I have acquired yet.
    Target audience includes machine builders and integrators requiring LabVIEW application written for their equipment. My work examples can be provided upon request which covers Test programs written in automotive industry for Digital and Analog IO control, LVDTs measurements, RS232 coms, Barcode Scanners, Printers, etc,
    I do have my own LTD with public liability covered, so no issues here.
    Best Regards
    Tom
    Warwickshire

    我们现有一项目需聘兼職LabVIEW工程師, 有意请电邮:[email protected]

  • Looking for information using labview and measuing Hydrogen\Oxygen duing Electrolysis tia sal2

    Greetings All
    I'm looking for any information on how to setup labview 7.1 to measure Hydrogen/Oxygen during electrolysis.  Can someone send us information on what equipment we would need.
    PS we don't have deep pockets we currently have labview 7.1 and we are testing with a usb 6008 currently.
    Thanks

    Hi sal2-
    In order to measure concentrations of these elements during processing you will first need to select an appropriate transducer.  Perhaps another user with more experience in electrolysis processing can suggest the external hardware.
    Once your transducer is properly configured you will just need to read the signals into your USB-6008 as voltage signals and scale them in software.  A great example of this is found in the NI Example Finder for LabVIEW (Help>>Find Examples) by browsing to Hardware Input and Output>>DAQmx>>Analog Measurements>>Voltage>>Cont Acq & Graph Voltage-IntClk.
    Thanks-
    Tom W
    National Instruments

  • Looking for great people who love LabVIEW

    JKI is looking for great people who are passionate
    about LabVIEW and its community, want to do great work, and are looking
    for an environment that shares their values. See here, to find out more about the job opening and what we're looking for in potential team members. See here, for more info about JKI and where we're going.
    Thank you,

    Jon chu wrote:
    I have LabVIEW project experience and I do love it. So I want to join JKI when I graduate in September 2007.
    Thank you.
    [email protected]
    Please check out our openings, here.  To apply, please email us at jobs (at) jameskring (dot) com,
    attaching examples of your LabVIEW work and a current resume in HTML,
    Word, Plain Text or PDF format. In
    the body of the email, explain why you would be a good fit for this job.

  • Sr. Test Engineer with CLD Looking for Employment in Bowling Green KY/Nashville TN

    I am a Sr. Test Engineer in Bowling Green KY looking for employment. I am a Certified LabVIEW developer, one of the few in KY/TN.
    For more information, please see my attached resume.
    I am not looking to relocate at this time.
    Thanks,
    Marcus
    Attachments:
    Marcus Anderson Public Resume.pdf ‏76 KB

    HI i have relevent experince in Labview PFA its my updated resume.forther details contact me at 8522950759
    Attachments:
    4751386.doc ‏41 KB
    4751386.doc ‏41 KB

  • Looking for a 2D Polygon Bevel Algorithm

    I am looking for a graphics algorithm to give two-dimensional polygons a 3D beveled edge look. The polygon should look like as though it is lit from the top-left. This is trivial for rectangular figures, but obviously much more complex for general polygons. The algorithm needs to support any type of polygon, including those with splines or other curved edges, as well as convex figures. Making matters even more complicated, it must also handle texture-filled polygons.
    A Java class that provides this functionality would be perfect. Short of that, an implementation in any language, or even a description of an algorithm, would be helpful.
    I created a java applet to illustrate the problem I am trying to solve - see the source below. This applet with source is also available at
    http://www.keithhilen.com/Java/bevel/
    Keith Hilen
    [email protected]
    Polygons.java :
    import java.applet.*;
    import java.awt.*;
    import java.awt.image.*;
    import java.awt.geom.*;
    public class Polygons extends Applet
    Image image;
    int polyWidth = 100;
    int polyHeight = polyWidth;
    int polyOfsX1 = 100;
    int polyOfsY1 = 100;
    int polyOfsX2 = 250;
    int polyOfsY2 = 100;
    int polyOfsX3 = 100;
    int polyOfsY3 = 240;
    int polyOfsX4 = 250;
    int polyOfsY4 = 240;
    Polygon octagon;
    Ellipse2D.Double ellipse;
    GeneralPath ornament;
    BufferedImage imageBuf1, imageBuf2, imageBuf3, imageBuf4;
    public void init()
    image = loadImage("background.jpg");
    createPolygons();
    createImageBufs();
    private Image loadImage(String name)
    MediaTracker tracker = new MediaTracker(this);
    Image image = getImage(getDocumentBase(), name);
    tracker.addImage(image, 0);
    for ( ; ; )
    try { tracker.waitForAll(); } catch (InterruptedException e) { }
    if (tracker.checkAll())
    break;
    return image;
    public void createPolygons()
    double sqrt2 = Math.sqrt(2);
    int m1 = (int) (polyWidth / (2 + sqrt2));
    int m2 = (int) (polyWidth * sqrt2 / (2 + sqrt2));
    octagon = new Polygon();
    octagon.addPoint(-m2/2, -(m1 + m2/2));
    octagon.addPoint(+m2/2, -(m1 + m2/2));
    octagon.addPoint(+(m1 + m2/2), -(m2/2));
    octagon.addPoint(+(m1 + m2/2), +(m2/2));
    octagon.addPoint(+m2/2, +(m1 + m2/2));
    octagon.addPoint(-m2/2, +(m1 + m2/2));
    octagon.addPoint(-(m1 + m2/2), +(m2/2));
    octagon.addPoint(-(m1 + m2/2), -(m2/2));
    ellipse = new Ellipse2D.Double(-polyWidth/2, -polyWidth/2, polyWidth, polyWidth*3/4);
    ornament = new GeneralPath();
    int l = polyWidth/2;
    int m = polyWidth/16;
    int s = polyWidth/32;
    ornament.moveTo(+0+0, -l+0);
    ornament.quadTo(+0+s, -l+0, +0+s, -l+s);
    ornament.quadTo(+m+0, -m+0, l-s, 0-s);
    ornament.quadTo(+l+0, +0-s, l0, +0+0);
    ornament.quadTo(+l+0, +0+s, l-s, 0+s);
    ornament.quadTo(+m+0, m0, +0+s, +l-s);
    ornament.quadTo(+0+s, l-0, 0+0, l0);
    ornament.quadTo(+0-s, l0, +0-s, +l-s);
    ornament.quadTo(-m+0, m0, -l+s, +0+s);
    ornament.quadTo(-l+0, +0+s, -l+0, +0+0);
    ornament.quadTo(-l+0, +0-s, -l+s, +0-s);
    ornament.quadTo(-m+0, -m+0, +0-s, -l+s);
    ornament.quadTo(+0-s, -l+0, -0+0, -l+0);
    public void createImageBufs()
    Graphics2D g2d;
    Composite saveAlpha;
    // Figure 1
    // Create image buf and get context
    imageBuf1 = new BufferedImage(polyWidth, polyHeight,
    BufferedImage.TYPE_INT_ARGB_PRE);
    g2d = (Graphics2D) imageBuf1.getGraphics();
    // Fill with transparent color
    saveAlpha = g2d.getComposite();
    g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.CLEAR,
    0.0f));
    g2d.fillRect(0, 0, polyWidth, polyHeight);
    g2d.setComposite(saveAlpha);
    // Draw figure
    g2d.translate(polyWidth/2, polyHeight/2);
    g2d.setClip(octagon);
    g2d.setColor(Color.blue);
    g2d.fillRect(-polyWidth/2, -polyHeight/2, polyWidth, polyHeight);
    // Figure 2
    // Create image buf and get context
    imageBuf2 = new BufferedImage(polyWidth, polyHeight,
    BufferedImage.TYPE_INT_ARGB_PRE);
    g2d = (Graphics2D) imageBuf2.getGraphics();
    // Fill with transparent color
    saveAlpha = g2d.getComposite();
    g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.CLEAR,
    0.0f));
    g2d.fillRect(0, 0, polyWidth, polyHeight);
    g2d.setComposite(saveAlpha);
    // Draw figure
    g2d.translate(polyWidth/2, polyHeight/2);
    g2d.setClip(octagon);
    g2d.drawImage(image, -polyWidth/2, -polyWidth/2, null);
    // Figure 3
    // Create image buf and get context
    imageBuf3 = new BufferedImage(polyWidth, polyHeight,
    BufferedImage.TYPE_INT_ARGB_PRE);
    g2d = (Graphics2D) imageBuf3.getGraphics();
    // Fill with transparent color
    saveAlpha = g2d.getComposite();
    g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.CLEAR, 0.0f));
    g2d.fillRect(0, 0, polyWidth, polyHeight);
    g2d.setComposite(saveAlpha);
    // Draw figure
    g2d.translate(polyWidth/2, polyHeight/2);
    g2d.setClip(ellipse);
    g2d.drawImage(image, -polyWidth/2, -polyWidth*5/8, null);
    // Figure 4
    // Create image buf and get context
    imageBuf4 = new BufferedImage(polyWidth, polyHeight, BufferedImage.TYPE_INT_ARGB_PRE);
    g2d = (Graphics2D) imageBuf4.getGraphics();
    // Fill with transparent color
    saveAlpha = g2d.getComposite();
    g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.CLEAR, 0.0f));
    g2d.fillRect(0, 0, polyWidth, polyHeight);
    g2d.setComposite(saveAlpha);
    // Draw figure
    g2d.translate(polyWidth/2, polyHeight/2);
    g2d.setClip(ornament);
    g2d.drawImage(image, -polyWidth/2, -polyWidth/2, null);
    public void paint(Graphics g)
    g.drawImage(imageBuf1, polyOfsX1 - polyWidth/2, polyOfsY1 - polyHeight/2, null);
    g.drawImage(imageBuf2, polyOfsX2 - polyWidth/2, polyOfsY2 - polyHeight/2, null);
    g.drawImage(imageBuf3, polyOfsX3 - polyWidth/2, polyOfsY3 - polyHeight/2, null);
    g.drawImage(imageBuf4, polyOfsX4 - polyWidth/2, polyOfsY4 - polyHeight/2, null);
    Polygons.html :
    <applet
    code=Polygons.class
    name=Polygons
    width=360
    height=300>
    </applet>

    Think you'll be lucky to find anything in the forum on push down automata. Do a search on google, perhaps with the keyword "parser" or "grammer checker" thrown in. There may well be whole books devoted to it!

  • Looking for an efficient data structur & search algorithm

    Hi all
    i have a list of digits (international phone network prefixes) with some hundreds to some thousends entries. An entry may be in the form
    ^00[1-9]{1}[0-9]{0,7}$
    I.e. this might be 001, 0041, 00317545, 00317548, 00317549 and so on. Regarding the last three examples, it might even be that there is an additonal 0031754.
    What i need a a data structur that allows to match these prefixes against a phonenumber.
    I.e. if i have the phonennumber 001123456789 it would match the prefix 001. If i had 00317549111 it would match 00317549.
    The easiest way would be to but all prefixes into an Vector or similar and loop over all entries, trying to match the phonenumber with startsWith(). But this wouldn't always result in a absolutely perfect match, since, i.e. for the phonenumber 00317549111 the check against the prefix 0031754 would return a match even if there was a more specific match with the prefix 00317549. But more than that, this simple algorithm is not very efficient.
    So i am looking for a more efficient way/pattern to do this. I thought about a kind of tree structure, starting with 00 in the top level, than provding [1-9] in the second level, and [0-9] from third level on. Then on every node it would either store if there is a matching prefix on that level, or if there is a prefix starting with that digits on a lower level or if there is no prefix on that level or any lower.
    I.e. when i have the phonenumber 00317549111 it would start at the top level with 00. That would be ok. On the next level it would check if there is a node for digit 3. If there is, it would go one level deeper and check if there is a node for digit 1. If yes, again it would go one level deeper to check if there is a node for digit 7. If that algorithm comes to a level where, for the request digit, it get's a prefix indicator rather than a node indicator, the algortihm would know, that a matching prefix was found and that there is no more specifig match on deeper levels.
    One thing i forgot to mention - the prefixes might be read once during startup/init and there it might take some time for building up the datastructur - i don't care about that. But, when running, then the maching process should be as efficient as possible, that's the most important point for me.
    What do you think about a pattern like this? Could this be efficient? Do you see other patterns, that might be easier to implement and that might be faster/need less memory?
    Thanks a lot for your help.
    Cheers, Frank

    I would really have gone for your first approach. With mperemsky5's approach you have the loop with (potential) n iterations (Let n be the length of the number) and in each iteration to compute the hash-code for the string which again takes time proportional to the strings length.
    The tree approach takes time equal to the length of the prefix and is imho not more complicated.
    Perhaps this way:
    public class DigitTree
      private class Node {
           private Object content;
           private Node[] children = new Node[10];
      private Node root = new Node();
      public DigitTree() {
      public void addPrefix(String prefix, Object value) {
           char[] numberChars = prefix.toCharArray();
           Node node = root;
           for (int i=0; i<numberChars.length; i++) {
                int number = numberChars[i] - '0';
                if (node.children[number] == null) node.children[number] = new Node();
                node = node.children[number];
           node.content = value;
      public Object match(String phonenumber) {
           char[] numberChars = prefix.toCharArray();
           Node node = root;
           for (int i=0; i<numberChars.length; i++) {
                int number = numberChars[i] - '0';
                if (node.children[number] == null) return code.content;
                node = node.children[number];
           return node.content;
    }The method addPrefix lets you add a prefix to the tree. The content-Object can hold a String or whatever to identify the prefix. If your data is not complete (i.e. if there are numbers for which no prefix exists) you might want to initialize the content-object of a node with a default value (e.g. "not found").
    The method match lets you look up a prefix for a given number and returns the Object associated with the prefix..
    The code was not tested.
    Greetings
    Thomas

  • Looking for Java Input Method implementations

    Hi,
    I have developed a Java-based research application for computational linguistics. I'm currently internationalizing this application. I'm looking for FREE implementations of the Java Input Method Framework. Could you please give me a hint?
    Thanks in advance,
    Wolfgang Lezius
    University of Stuttgart, Germany

    http://forum.java.sun.com/thread.jsp?forum=16&thread=270024 contains few useful links.

  • Hiding Sensitive Association Rule for Sanitization algorithm implementation

    Hello Sir,
    I am doing my research in the area of Data Mining and my problem is hiding industrial information using Hiding Sensitive Association Rule. If anybody having Sanitization process and algorithm implementation using Java.
    If anybody having relate materials, algorithms implementation, documentation and related web address. Please send to my mail id: [email protected]
    Regard
    Kannan
    Message was edited by:
    user591845

    And your version of Oracle is?
    If 10g look into using Transparent Data Encryption (TDE). You can find docs on it at http://tahiti.oracle.com.

  • Looking for 802.11 rfc in regards to client roaming

    Specifically, I'm looking for information in regards to the client determining when to roam.  Any ideas on spec documents?
    Thanks,
    Raun

    Raun,
    Yes there are basic rules the vendors follow but those rules are still vendor specific.
    Vendors usually depend on signal strength, delay, noise, packet loss...etc in order to decide when to roam. But each vendor takes different decision based on the equation they use to decide roaming.
    For example, if there are two APs show good signal to a client while the clients is moving from one AP toward another, one client may decide to roam because there is a new signal that is stronger. Another client however may decide not to roam if the connection to the old AP is still OK although the new signal strength is higher.
    If you want you need to look into vendors documents about how they decide roaming. some vendors allow you to modify roamign aggressiveness though:
    Roaming Aggressiveness
    This setting allows you to define how aggressively your Wi-Fi client roams to improve connection to an access point. Click Use default value to balance between not roaming and performance.
    Lowest: Your wireless client will not roam. Only significant link quality degradation causes it to roam to another access point.
    Medium-Low/Medium-High: Allow Roaming.
    Medium: Balanced setting between not roaming and performance.
    Highest: Your Wi-Fi client continuously tracks the link quality. If any degradation occurs, it tries to find and roam to a better access point.
    Reference: http://www.intel.com/support/wireless/wlan/sb/CS-025393.htm
    Another link may help: http://howto.techworld.com/mobile-wireless/438/make-your-wlan-roam-faster/
    HTH
    Amjad

  • New(?) pattern looking for a good home

    Hi everyone, this is my second post to sun forums about this, I initially asked people for help with the decorator and strategy pattern on the general Java Programming forum not being aware that there was a specific section for design pattern related questions. Since then I refined my solution somewhat and was wondering if anyone here would take a look. Sorry about the length of my post, I know it's best to keep it brief but in this case it just seemed that a fully functional example was more important than keeping it short.
    So what I'd like to ask is whether any of you have seen this pattern before and if so, then what is it called. I'm also looking for some fresh eyes on this, this example I wrote seems to work but there are a lot of subtleties to the problem so any help figuring out if I went wrong anywhere is greatly appreciated. Please do tell me if you think this is an insane approach to the problem -- in short, might this pattern have a chance at finding a good home or should it be put down?
    The intent of the pattern I am giving below is to modify behavior of an object at runtime through composition. In effect, it is like strategy pattern, except that the effect is achieved by wrapping, and wrapping can be done multiple times so the effect is cumulative. Wrapper class is a subclass of the class whose instance is being wrapped, and the change of behavior is accomplished by overriding methods in the wrapper class. After wrapping, the object "mutates" and starts to behave as if it was an instance of the wrapper class.
    Here's the example:
    public class Test {
         public static void main(String[] args) {
              double[] data = { 1, 1, 1, 1 };
              ModifiableChannel ch1 = new ModifiableChannel();
              ch1.fill(data);
              // ch2 shifts ch1 down by 1
              ModifiableChannel ch2 = new DownShiftedChannel(ch1, 1);
              // ch3A shifts ch2 down by 1
              ModifiableChannel ch3A = new DownShiftedChannel(ch2, 1);
              // ch3B shifts ch2 up by 1, tests independence from ch3A
              ModifiableChannel ch3B = new UpShiftedChannel(ch2, 1);
              // ch4 shifts ch3A up by 1, data now looks same as ch2
              ModifiableChannel ch4 = new UpShiftedChannel(ch3A, 1);
              // print channels:
              System.out.println("ch1:");
              printChannel(ch1);
              System.out.println("ch2:");
              printChannel(ch2);
              System.out.println("ch3A:");
              printChannel(ch3A);
              System.out.println("ch3B:");
              printChannel(ch3B);
              System.out.println("ch4:");
              printChannel(ch4);
         public static void printChannel(Channel channel) {
              for(int i = 0; i < channel.size(); i++) {
                   System.out.println(channel.get(i) + "");
              // Note how channel's getAverage() method "sees"
              // the changes that each wrapper imposes on top
              // of the original object.
              System.out.println("avg=" + channel.getAverage());
    * A Channel is a simple container for data that can
    * find its average. Think audio channel or any other
    * kind of sampled data.
    public interface Channel {
         public void fill(double[] data);
         public double get(int i);
         public double getAverage();
         public int size();
    public class DefaultChannel implements Channel {
         private double[] data;
         public void fill(double[] data) {
              this.data = new double[data.length];
              for(int i = 0; i < data.length; i++)
                   this.data[i] = data;
         public double get(int i) {
              if(i < 0 || i >= data.length)
                   throw new IndexOutOfBoundsException("Incorrect index.");
              return data[i];
         public double getAverage() {
              if(data.length == 0) return 0;
              double average = this.get(0);
              for(int i = 1; i < data.length; i++) {
                   average = average * i / (i + 1) + this.get(i) / (i + 1);
              return average;
         public int size() {
              return data.length;
    public class ModifiableChannel extends DefaultChannel {
         protected ChannelModifier modifier;
         public void fill(double[] data) {
              if (modifier != null) {
                   modifier.fill(data);
              } else {
                   super.fill(data);
         public void _fill(double[] data) {
              super.fill(data);
         public double get(int i) {
              if(modifier != null)
                   return modifier.get(i);
              else
                   return super.get(i);
         public double _get(int i) {
              return super.get(i);
         public double getAverage() {
              if (modifier != null) {
                   return modifier.getAverage();
              } else {
                   return super.getAverage();
         public double _getAverage() {
              return super.getAverage();
    public class ChannelModifier extends ModifiableChannel {
         protected ModifiableChannel delegate;
         protected ModifiableChannel root;
         protected ChannelModifier tmpModifier;
         protected boolean doSwap = true;
         private void pre() {
              if(doSwap) { // we only want to swap out modifiers once when the
                   // top call in the chain is made, after that we want to
                   // proceed without it and finally restore doSwap to original
                   // state once ChannelModifier is reached.
                   tmpModifier = root.modifier;
                   root.modifier = this;
                   if(delegate instanceof ChannelModifier)
                        ((ChannelModifier)delegate).doSwap = false;
         private void post() {
              if (doSwap) {
                   root.modifier = tmpModifier;
              } else {
                   if(delegate instanceof ChannelModifier)
                             ((ChannelModifier)delegate).doSwap = true;
         public ChannelModifier(ModifiableChannel delegate) {
              if(delegate instanceof ChannelModifier)
                   this.root = ((ChannelModifier)delegate).root;
              else
                   this.root = delegate;
              this.delegate = delegate;
         public void fill(double[] data) {
              pre();
              if(delegate instanceof ChannelModifier)
                   delegate.fill(data);
              else
                   delegate._fill(data);
              post();
         public double get(int i) {
              pre();
              double result;
              if(delegate instanceof ChannelModifier)
                   result = delegate.get(i);
              else
                   result = delegate._get(i);
              post();
              return result;
         public double getAverage() {
              pre();
              double result;
              if(delegate instanceof ChannelModifier)
                   result = delegate.getAverage();
              else
                   result = delegate._getAverage();
              post();
              return result;
         public int size() {
              //for simplicity no support for modifying size()
              return delegate.size();
    public class DownShiftedChannel extends ChannelModifier {
         private double shift;
         public DownShiftedChannel(ModifiableChannel channel, final double shift) {
              super(channel);
              this.shift = shift;
         @Override
         public double get(int i) {
              return super.get(i) - shift;
    public class UpShiftedChannel extends ChannelModifier {
         private double shift;
         public UpShiftedChannel(ModifiableChannel channel, final double shift) {
              super(channel);
              this.shift = shift;
         @Override
         public double get(int i) {
              return super.get(i) + shift;
    Output:ch1:
    1.0
    1.0
    1.0
    1.0
    avg=1.0
    ch2:
    0.0
    0.0
    0.0
    0.0
    avg=0.0
    ch3A:
    -1.0
    -1.0
    -1.0
    -1.0
    avg=-1.0
    ch3B:
    1.0
    1.0
    1.0
    1.0
    avg=1.0
    ch4:
    0.0
    0.0
    0.0
    0.0
    avg=0.0

    jduprez wrote:
    Hello,
    unless you sell your design better, I deem it is an inferior derivation of the Adapter pattern.
    In the Adapter pattern, the adaptee doesn't have to be designed to support adaptation, and the instance doesn't even know at runtime whether it is adapted.
    Your design makes the "modifiable" class aware of the modification, and it needs to be explicitly designed to be modifiable (in particular this constrains the implementation hierarchy). Overall DesignPattern are meant to provide flexibility, your version offers less flexibility than Adapter, as it poses more constraint on the modifiable class.
    Another sign of this inflexibility is your instanceof checks.
    On an unrelated note, I intensely dislike your naming choice of fill() vs _fill()+, I prefer more explicit names (I cannot provide you one as I didn't understand the purpose of this dual method, which a good name would have avoided, by the way).
    That being said, I haven't followed your original problem, so I am not aware of the constraints that led you to this design.
    Best regards,
    J.
    Edited by: jduprez on Mar 22, 2010 10:56 PMThank you for your input, I will try to explain my design better. First of all, as I understand it the Adapter pattern is meant to translate one interface into another. This is not at all what I am trying to do here, I am trying to keep the same interface but modify behavior of objects through composition. I started thinking about how to do this when I was trying to apply the Decorator pattern to filter some data. The way I would do that in my example here is to write an AbstractChannelDecorator that delegates all methods to the Channel it wraps:
    public abstract class AbstractChannelDecorator implements Channel {
            protected Channel delegate;
    ...// code ommitted
         public double getAverage() {
              return delegate.getAverage();
    ...// code ommitted
    }and then to filter the data I would extend it with concrete classes and override the appropriate methods like so:
    public class DownShiftedChannel extends AbstractChannelDecorator {
         ...// code ommitted
         public double get(int i) {
              return super.get(i) - shift;
           ...// code ommitted
    }(I am just shifting the data here to simplify the examples but a more realistic example would be something like a moving average filter to smooth the data).
    Unfortunately this doesn't get me what I want, because getAverage() method doesn't use the filtered data unless I override it in the concrete decorator, but that means I will have to re-implement the whole algorithm. So that's pretty much my motivation for this, how do I use what on the surface looks like a Decorator pattern, but in reality works more like inheritance?
    Now as to the other points of critique you mentioned:
    I understand your dislike for such method names, I'm sorry about that, I had to come up with some way for the ChannelModifier to call ModifiableChannel's super's method equivalents. I needed some way to have the innermost wrapped object to initiate a call to the topmost ChannelModifier, but only do it once -- that was one way to do it. I suppose I could have done it with a flag and another if/else statement in each of the methods, or if you prefer, the naming convention could have been fill() and super_fill(), get() and super_get(), I didn't really think that it was that important. Anyway, those methods are not meant to be used by any other class except ChannelModifier so I probably should have made them protected.
    The instanceof checks are necessary because at some point ChannelModifier instance runs into a delegate that isn't a ChannelModifier and I have to somehow detect that, because otherwise instead of calling get() I'd call get() which in ModifiableChannel would take me back up to the topmost wrapper and start the whole call chain again, so we'd be in infinite recursion. But calling get() allows me to prevent that and go straight to the original method of the innermost wrapped object.
    I completely agree with you that the example I presented has limited flexibility in supporting multiple implementations. If I had two different Channel implementations I would need two ModifiableChannel classes, two ChannelModifiers, and two sets of concrete implementations -- obviously that's not good. Not to worry though, I found a way around that. Here's what I came up with, it's a modification of my original example with DefaultChannel replaced by ChannelImplementation1,2:
    public class ChannelImplementation1 implements Channel { ... }
    public class ChannelImplementation2 implements Channel { ... }
    // this interface allows implementations to be interchangeable in ChannelModifier
    public interface ModifiableChannel {
         public double super_get(int i);
         public double super_getAverage();
         public void setModifier(ChannelModifier modifier);
         public ChannelModifier getModifier();
    public class ModifiableChannelImplementation1
              extends ChannelImplementation1
              implements ModifiableChannel {
         ... // see DefaultChannel in my original example
    public class ModifiableChannelImplementation2
              extends ChannelImplementation1
              implements ModifiableChannel { ...}
    // ChannelModifier is a Channel, but more importantly, it takes a Channel,
    // not any specific implementation of it, so in effect the user has complete
    // flexibility as to what implementation to use.
    public class ChannelModifier implements Channel {
         protected Channel delegate;
         protected Channel root;
         protected ChannelModifier tmpModifier;
         protected boolean doSwap = true;
         public ChannelModifier(Channel delegate) {
              if(delegate instanceof ChannelModifier)
                   this.root = ((ChannelModifier)delegate).root;
              else
                   this.root = delegate;
              this.delegate = delegate;
         private void pre() {
              if(doSwap) {
                   if(root instanceof ModifiableChannel) {
                        ModifiableChannel root = (ModifiableChannel)this.root;
                        tmpModifier = root.getModifier();
                        root.setModifier(this);
                   if(delegate instanceof ChannelModifier)
                        ((ChannelModifier)delegate).doSwap = false;
         private void post() {
              if (doSwap) {
                   if(root instanceof ModifiableChannel) {
                        ModifiableChannel root = (ModifiableChannel)this.root;
                        root.setModifier(tmpModifier);
              } else {
                   if(delegate instanceof ChannelModifier)
                             ((ChannelModifier)delegate).doSwap = true;
         public void fill(double[] data) {
              delegate.fill(data);
         public double get(int i) {
              pre();
              double result;
              if(delegate instanceof ModifiableChannel)
    // I've changed the naming convention from _get() to super_get(), I think that may help show the intent of the call
                   result = ((ModifiableChannel)delegate).super_get(i);
              else
                   result = delegate.get(i);               
              post();
              return result;
         public double getAverage() {
              pre();
              double result;
              if(delegate instanceof ModifiableChannel)
                   result = ((ModifiableChannel)delegate).super_getAverage();
              else
                   result = delegate.getAverage();
              post();
              return result;
         public int size() {
              return delegate.size();
    public class UpShiftedChannel extends ChannelModifier { ...}
    public class DownShiftedChannel extends ChannelModifier { ... }

  • CLAD with MS in Electronics/Electrical engg looking for better opportunities

    Priyanka Chaudhary
    ob/4 wardens' residence medical boys hostel campus, near white church colony, Indore(M.P)-452001
    [email protected]
    OBJECTIVE:
    ==========
    Seeking position as Labview Developer
    EDUCATION
    ==========
    Master of Science in Electrical Engineering
    University of Kentucky, Lexington, KY.( G.P.A. 3.5/4.0)
    May 2010
    B.E. Electronics and Communications Engineering
    Rajiv Gandhi Technical University, India
    First Class with Honors G.P.A. 4.0/4.0
    June 2007
    SKILL SET
    ==========
    Programming Languages: Labview (2011,2010,8.6),Simulink,VHDL, Verilog , C , C++, VC++, MATLAB C#,HTML, ASP.Net 4.0, Assembly Language
    Development and Simulation Tools: Labview, Xilinx ISE, ModelSim, MATLAB, MS office Suite, VS .Net
    Hardware: NI cRIOs, NI CDAQ, NI C-form thermocouple ,IEPE and strain gauge modules etc.,8085/8086 Processors, 8051/8951 Microcontrollers
    WORK EXPERIENCE
    ===============
    1)Assistant Manager, VE Commercial Vehicles Ltd. (OEM), Pithampur, July 2010-Present
    -Certified Labview Associate Developer (CLAD) [Serial Number:100-311-4045; Issue date: Dec 29,2011;Expiration date: Dec 28 2013]
    -Part of the software development team in the Vehicle Validation and testing Division
    -Developed and deployed software in Labview for Testing Rigs required in the Fatigue and Endurance Labs.
    -Attended Labview Core1 & Core2 training and preparing for Certified Labview Associate Developer exam (CLAD).
    -Projects include:
    --software development for Clutch endurance test using Master/Slave architecture;
    --system identification, iteration and drive-file generation from RLD for Cabin testing on Moog Controller;
    --Test Sequence generation for suspension leaf spring endurance and Front Axle endurance tests;
    --R&D of Stewart’s Platform(Multi-Axis Shaker Table) in Simulink using Pro-E/CAD model and validation of the model parameters for Rig development in Labview.
    --Single-handedly designed and deployed endurance test application on FPGA target using Labview 2011 using Modbus as communication protocol between variable frequency drives(ABB) and motors.
    -Designed software utility manuals for rig operators.
    2) IT consultant, Libsys Consultancy, Chicago, USA ,Sep 2010-March 2011
    -Worked as Dot net developer apprentice/consultant for client (Thomson Reuters ) in Minnesotta,USA.
    -Worked on Models –View-Controllers architecture to design Web applications.
    3)Graduate Research Assistant, University of Kentucky, May 2008 - Aug 2010
    Thesis : Spheroid detection in 2D images using Circular Hough Transform
    -Collaborated with National Cancer Institute and the dept. of Opthalmology to prepare High Content –High Throughput Screening Assay (3D-ECSA) analysis platform.
    -Ran an automated test bench with a motorized camera (VC++, MFC) for the assay analysis and image acquisition.
    -Synthesized data stochastically similar to original, to increase the databank.
    -Developed algorithm (MATLAB) to detect spheroids in data images using Circular Hough Transform.
    -Demonstrated measures to classify identified spheroids according to shape and symmetry.
    -Involved extensive application of Image Processing techniques.
    4)Graduate Assistant, Graduate Housing Resident Manager, University of Kentucky,Feb 2010- May 2010
    Responsibilities include, resolution of conflicts, inspections, attending to resident requests and acting as a bridge between the 100+ residents and housing body.
    ACADEMIC PROJECTS
    ==================
    1)Design and implementation of 2 special purpose processors,Spring 2008
    -Designed two special purpose processors in VHDL in Xilinx ISE
    -These were non-programmable and were designed to execute a repetitive custom logic
    -Simulation was done in ModelSim and tested on Xilinx Virtex 5.1 FPGA.
    2)Wireless Datacommunication between terminals using Frequency hopped spread spectrum,Spring 2007
    -Prepared and etched PCBs for circuit base;
    -Soldered HT-12 encoders/decoders, transceivers and PLL ICs to the PCBs to form a FHSS transceiver circuit
    -Involved electronics and communication principles.
    -Demonstrated the working of the units for duplex communication
    PUBLICATIONS
    =============
    Correlation based swarm trackers for 3-dimensional manifold mesh formation
    SPIE April 13,2009. Vol:7340 2009
    RELEVANT COURSEWORK
    ===================
    Graduate:
    Digital Signal Processing, Deterministic systems, Real-time Embedded systems, VHDL, Antenna Design, Solid state electronics,
    Electromagnetic field theory.
    Undergraduate:
    Mobile Communications, Satellite Communications, Fiber Optics, Microwave Circuits, Data Compression and Encryption, Microprocessors and Microcontrollers, Microelectronics, Digital Logic Design, Electronics
    Attachments:
    Priyanka_Chaudhary_resume_LABVIEW.pdf ‏130 KB

    Message Edité par salimo le 11-04-2009 04:36 PM
    ~~~~~~~~~~~~~~~~~~Looking for a LABVIEW JOB (In EUROPE)>~~~~~~~~~~~~~~~~~~
    **The Best Way To Predict**The**Future Is To Invent It**

Maybe you are looking for

  • Getting carryforward bal in F.08

    Dear Members : Running GL Acc Balances (F.08) is not showing carry-forward balance for P&L stmt type accounts - this inspite after running balance carry forward (F.16). But F.08 does show carry-forward balances for balance sheet type accnts. Could yo

  • Plugin Load problem with photoshop CS4

    Hi all, i want to migrate my filter plugin from 32bit to 64bit environment in adobe photoshop CS4. Firstly i have tried to build one sample filter plugin(Dissolve). i have build it sucessfully and placed the plugin inside the Filter subfolder of plug

  • Code Inspection Error

    Dear friends,                       While checking code inspector in mhy program i m getting following information msg. how to avoid it. Message code 0002 Program YFIIN_POST_INCOM_PAYMENTS Include YFIIN_POST_INCOM_PAYMENTS Row 333 Column 8 Call Trans

  • Imac won't startup

    My imac won't startup only apple on gray screen and spinning gear. what can I do to make it work. I was using techtool to optimize and on restart it showed up with a can't find finder, it seemed to be stuck in operating system 9.0. I normally start u

  • RFC LOG

    Dear Abapers, Non SAP ERP COSMOS is sending some data ,and SAP is receiving the same  through an RFC and saved in SAP database tables. Now I want to see these data before saving it in SAP as the data is something weared. So for this i will have to wr