Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: rcs/nml/NMLFormatConverter.java


1   package rcs.nml;
2   
3   /*
4   * 
5   * This interface was added  to eliminate a circular dependancy.
6   * Previously NMLmsg depended on NMLFormatConverter and NMLFormat 
7   */
8   
9   /**
10  * interface each NMLmsg should use to implement it's update function.
11  */
12  public abstract  class NMLFormatConverter
13  {
14    /**
15     * Message being updated.
16     */
17    public  Object msg_to_update = null;
18    /**
19     * The type of message being converted.
20     */
21    public  int msg_type = 0;  
22  
23    public boolean stat_msg_updated = false;
24    public boolean cmd_msg_updated = false;
25    public boolean error_in_update = false;
26    
27    
28    public abstract  byte update(byte x);
29    public abstract  void update(byte x[],int num_elements);
30    public abstract  char update(char x);
31    public abstract  void update(char x[],int num_elements);
32    public abstract  short update(short x);
33    public abstract  void update(short x[],int num_elements);
34    public abstract  int update(int x);
35    public abstract  void update(int x[],int num_elements);
36    public abstract  long update(long x);
37    public abstract  void update(long x[],int num_elements);
38    public abstract  float update(float x);
39    public abstract  void update(float x[],int num_elements);
40    public abstract  double update(double x);
41    public abstract  void update(double x[],int num_elements);
42  
43    public String toString()
44    {
45      return super.toString()+ " = "+getClass().getName()+" {\n"+
46        "msg_type="+msg_type+";\n"+
47        "msg_to_update="+msg_to_update+";\n"+
48        "stat_msg_updated="+stat_msg_updated+";\n"+
49        "cmd_msg_updated="+cmd_msg_updated+";\n"+
50        "error_in_update="+error_in_update+";\n}";
51    }
52  }