~ubuntu-branches/ubuntu/precise/flightgear/precise

« back to all changes in this revision

Viewing changes to src/Network/generic.hxx

  • Committer: Bazaar Package Importer
  • Author(s): Ove Kaaven
  • Date: 2011-01-30 15:46:35 UTC
  • mfrom: (3.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20110130154635-rlynmg9n5hzxq5xe
Tags: 2.0.0-3
* Recommend fgfs-aircraft-base and fgfs-models-base.
  Closes. #610276.
* Added note about scenery SharedModels.tgz to README.Debian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
 
39
39
public:
40
40
 
41
 
    FGGeneric(string&);
 
41
    FGGeneric(vector<string>);
42
42
    ~FGGeneric();
43
43
 
44
44
    bool gen_message();
47
47
    // open hailing frequencies
48
48
    bool open();
49
49
 
 
50
    void reinit();
 
51
 
50
52
    // process work for this port
51
53
    bool process();
52
54
 
57
59
    bool getExitOnError() { return exitOnError; }
58
60
protected:
59
61
 
60
 
    enum e_type { FG_BOOL=0, FG_INT, FG_DOUBLE, FG_STRING };
 
62
    enum e_type { FG_BOOL=0, FG_INT, FG_FLOAT, FG_DOUBLE, FG_STRING, FG_FIXED };
61
63
 
62
64
    typedef struct {
63
65
     // string name;
70
72
 
71
73
private:
72
74
 
 
75
    string file_name;
 
76
    string direction;
 
77
 
73
78
    int length;
74
79
    char buf[ FG_MAX_MSG_SIZE ];
75
80
 
85
90
    bool binary_mode;
86
91
    enum {FOOTER_NONE, FOOTER_LENGTH, FOOTER_MAGIC} binary_footer_type;
87
92
    int binary_footer_value;
 
93
    int binary_record_length;
 
94
    enum {BYTE_ORDER_NEEDS_CONVERSION, BYTE_ORDER_MATCHES_NETWORK_ORDER} binary_byte_order;
88
95
 
 
96
    bool gen_message_ascii();
 
97
    bool gen_message_binary();
 
98
    bool parse_message_ascii();
 
99
    bool parse_message_binary();
89
100
    void read_config(SGPropertyNode *root, vector<_serial_prot> &msg);
90
101
    bool exitOnError;
91
102
};